Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Command line option problems (256colors, 8bit, etc)

Post Reply
Guest

Command line option problems (256colors, 8bit, etc)

Post by Guest »

I run the viewer using full command line options. Most of the options work, but certain ones don't. For example, /nostatus, /notoolbar, and /encoding <type> all work fine. But when I try and add /256colors, /8bit, -256colors, or -8bit, it doesn't work. I always get full colors. I even tried adding the /noauto flag as well with no luck. Any ideas?
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

I think you don't use the current version of UltraVNC 1.01
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Guest

Post by Guest »

Unfortunately, I am.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

your are right, sorry, is a bug ! bug of command line viewer
vncviewer 1.0.1 (6 aug 2005)
vncviewer 1.13 beta (26 september 2005) ignore -config configfile.vnc !!!

even with this work around below fail too !
server.vnc (configfile)
8bit=4 (8 grey colors) is ignored inside the configfile "server.vnc"

start vncviewer GUI (without command line)
connect vncviewer to your host and select your settings from Connection Options
then save yours prefered settings to server.vnc
[topic=1982][/topic]

modify your saved file server.vnc

and next time load:
"C:\Program Files\UltraVNC\vncviewer.exe" -config server.vnc
Last edited by redge on 2005-10-08 03:50, edited 1 time in total.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Guest

Post by Guest »

Thanks for your reply. I am, however, a little confused about the resolution. Will the 1.13 beta version fix this problem? I would like to avoid using the config file since I am calling the vncviewer.exe program from another program. I'd much rather specify all the commands from the command line if possible.

It seems as though there is a problem on line 383 in VNCOptions.cpp where:

m_Use8Bit = rfbPFFullColors;

should be:

m_Use8Bit = rfbPF256Colors;

However, this doesn't appear to explain why specifying "-8bit" on the command line doesn't work. In any event, how should I proceed? Is there a patch (I'd be willing to do it myself if you told me the lines of code to modify)? Again, I'd like to continue to use the viewer by means of the command line without the config file if I can. Thanks.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

funny bug command line :o

vncviewer 1.0.1 (6 aug 2005)
vncviewer.exe hostname -8bits
(viewer try to connect to 8bits instead of hostname !!!)


vncviewer beta 13 (26 september 2005)
vncviewer.exe hostname -8bits
(infinity loop, close viewer then automatically re-opened !)

now,
vncviewer beta 13 will not help you to resolve issue about command line !
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Guest

Post by Guest »

Isn't it "8bit" and not "8bits"?
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

yes, is "8bit" but I'm just surprised about the result with 8bits
the problem,
the command vncviewer read and load the wrong value, there a mistake on the code, but where ? :o

vncviewer must read hostname (because there "-" and load -8bits like a hostname !!!

[-variable]
[hostname]

are you understand my :o ?
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Guest

Post by Guest »

I debugged the code and realized that the first problem is, as I mentioned above, that the "256color" switch sets the wrong value to the m_Use8Bit variable (this is a real bug). However, upon further inspection I realized that the "-8bit" with the "-noauto" flag should give me the desired results. When I tried this again, it did work like I wanted. I must have tried the "-8bit" flag without the "-noauto" flag which causes the "-8bit" flag to be ignored.

So in summary, there is a small bug as denoted above. Also, there is a small quirk where you have to use the "-noauto" flag so that certain command line arguments aren't ignored.

Thanks for the help.
Guest

Post by Guest »

I believe the problem with the "-8bits" is because it doesn't match any of the given options in the "SetFromCommandLine" function. Thus, it goes to the bottom "else"statement which processes the "-8bits" as the hostname. You should just add a small check in that last "else" statement that puts up an error message if the argument begins with a "-". If it does, you can be sure that it's not a hostname, but a spelling mistake.
Da GMan
Posts: 4
Joined: 2006-11-01 07:14

Re: Command line option problems (256colors, 8bit, etc)

Post by Da GMan »

Hi Guys

Has this ever been solved, I still have the same problem with the stable version 1.0.2. I save the connection info but on reconnect it defaults back to 256 colors. I have tried to edit the xx.vnc file and tried different values in the 8bit=x but still no avail. Would like to save some slow connections as 8 Dark colors or 4 Grey Colors to make the connection usable.

Thx
Da GMan
Post Reply