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

Always hextile connecting to localhost?

Post Reply
aegrotatio
8
8
Posts: 13
Joined: 2010-03-07 23:16

Always hextile connecting to localhost?

Post by aegrotatio »

I have several SSH tunnels that I connect to remote hosts with. I have UltraVNC set up for "Auto select best settings" but it never changes from "hextile" encoding. Is this because the viewer is hard-coded not to use better-performing encodings when connected to localhost? If so, how can this behavior be disabled? If it can't be disabled, can it be patched to allow it to be disabled?

I noticed that Ultra/Ultra2 and Hitachi ZYWRLE can show videos much, much more smoothly over my remote link through the SSH tunnel and I'm curious why the UltraVNC viewer won't select anything but "hextile" when used this way.

Thanks.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: Always hextile connecting to localhost?

Post by B »

I don't know, but as workarounds you might try (a) running a repeater on localhost and attaching to that or (b) using the new and impressive NAT2NAT Reloaded as part of your tunneling.
aegrotatio
8
8
Posts: 13
Joined: 2010-03-07 23:16

Re: Always hextile connecting to localhost?

Post by aegrotatio »

I think an adjustment to "Auto" to add an option to honor "Auto" even when going to localhost is better than adding extra layers of complexity. I'll have a look at the source to see what's really happening.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: Always hextile connecting to localhost?

Post by B »

Recompiling the code for a specific use case is less complex than a repeater or NAT tunnel? Okay, to each his or her own... :)
BigChimip
8
8
Posts: 13
Joined: 2011-10-10 09:04

Re: Always hextile connecting to localhost?

Post by BigChimip »

I think it could be if the specific use case turns out to be... more general ;)

In other words, if there is no longer a reason for restricting local connections to hextile, that code restriction could be removed, and code complexity reduced ;)

By the way, aegrotatio, have you figured out where in the source this happens (or if this is fixed in 1.0.9.6.1)? I'm connecting to localhost as well (through an ssl tunnel), so I'm very interested.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: Always hextile connecting to localhost?

Post by B »

Let me clarify that I do NOT think restricting local connections to hextile makes any sense -- and I would be very surprised if any version of any VNC product did that. It's not been my experience. (Then again, I've not checked it while running to localhost, merely LAN connections.) Are you confirming the behavior?
BigChimip
8
8
Posts: 13
Joined: 2011-10-10 09:04

Re: Always hextile connecting to localhost?

Post by BigChimip »

Hi B,
Thanks for the clarification.

Actually, I have no idea what kind of encoding is used.
I start vncviewer with -ultra2.
(Using my checkride wrapper programs at https://bitbucket.org/reiniero/checkride)

***edit: removed superfluous log***
Last edited by BigChimip on 2011-10-18 03:57, edited 2 times in total.
BigChimip
8
8
Posts: 13
Joined: 2011-10-10 09:04

Re: Always hextile connecting to localhost?

Post by BigChimip »

Ok, got a winvc log as well.
It helps if you do something like this in ultravnc.ini:

Code: Select all

[admin]
...
DebugMode=2
DebugLevel=10
path=c:\windows\temp
:D
winvnc log at http://pastebin.ca/2090842 (obfuscated user, got rid of some vistahook messages)

On the winvnc side I do something like (in FreePascal though, not batch script):

Code: Select all

rem install service
winvnc -install
rem wait
rem connect; apparently -servicehelper doesn't work here!?!?
winvnc -autoreconnect -connect 127.0.0.1::65000
to get a reverse connection.

On the vncviewer side I call something like:

Code: Select all

vncviewer -listen 65001 -64colors -encoding ultra2 -enablecache -disablesponsor -autoacceptincoming -autoacceptnodsm -loglevel 10 -logfile c:\windows\temp\bla.log
(and stunnel tunnels the connection between the machine with an SSL tunnel)
Last edited by BigChimip on 2011-10-18 03:58, edited 1 time in total.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: Always hextile connecting to localhost?

Post by B »

And?

You're leaving us lazy folks in suspense -- did it maintain the ultra2 encoding or not?
BigChimip
8
8
Posts: 13
Joined: 2011-10-10 09:04

Re: Always hextile connecting to localhost?

Post by BigChimip »

:D <embarrassed grin>
I can't figure out from the logs what encoding is actually used.

I'd thought you lazy folks could take a look :D (or, alternatively & better, indicate what to look for in the logs)
BigChimip
8
8
Posts: 13
Joined: 2011-10-10 09:04

Re: Always hextile connecting to localhost?

Post by BigChimip »

Sometimes you can overlook the obvious. Clicking the "Show Status Window" icon on the VNCViewer toolbar showed: Encoder: HexTile.
Show Connection Options: Format and Encoding was set to Auto select best settings (hextile selected but grayed out) Use Cache Encoding was unselected and also grayed out.

So yes, I confirm what aegrotatio said.

Maybe there is a command line option somewhere to disable Auto select best settings. Yep: /quickoption 8 (see SessionDialog.cpp in vncviewer code; look for m_quickoption = 8, also VNCoptions.cpp
This does sometimes change the options to ultra2, cached updates.
Note: you'll probably have to specify -noauto on the command line to force your options, or, alternatively, play with the various -quickoption n options:

Code: Select all

quickoption 1: auto mode (zrle, full colors, cache)
quickoption 2: LAN (hextile, full colors, no cache)
quickoption 3: medium (zrle, 256 colors, no cache)
quickoption 4: modem (zrle, 64 colors, cache)
quickoption 5: slow (zrle, 8 colors, cache)
quickoption 7: ULTRA_LAN (ultra enc, full color)
quickoption 8: apparently manual
apparently you can also disable auto mode by specifying -noauto
Next problem: not all combinations seem to work.
This:

Code: Select all

vncviewer -listen 65001 -quickoption 8 -8bit -encoding ultra2 -enablecache -disablesponsor -autoacceptincoming -autoacceptnodsm -loglevel 10 -logfile C:\<somewhere>TMP00015.tmp
seems to give a crash in WinVNC: an unhandled Win32 exception occurred in WinVNC [724]
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: Always hextile connecting to localhost?

Post by B »

Nice work, Big. I have crashes too whenever I tried changing to the Ultra encoding via the GUI (in 1.0.8.x).
Post Reply