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

VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post Reply
YY
200
200
Posts: 996
Joined: 2006-11-13 15:11

VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by YY »

Have tested the -autoreconnect, -reconnectcounter features of VNCview 10961 (Apr.26).

Basically it works, but there's bugs.

1. No matter what value I setted on timeout, either at GUI or Cmdline, the vncviewer always reconnect at 10 seconds (the default) interval.

2. When there appears the "-autoreconnect" option in the cmdline, the vncviewer will incorrectly use this interval value as the host name to be connected. e.g.:

  vncviewer.exe -connect 127.0.0.1 -autoreconnect 60 -reconnectcounter 3. or

  vncviewer.exe -connect 127.0.0.1 -reconnectcounter 3 -autoreconnect 60

the viewer will try a connect to a host named "60"

However, the viewer will work properly if the "-connect host" is at the end of the command:

  vncviewer.exe -autoreconnect 60 -reconnectcounter 3 -connect 127.0.0.1



Or, if the -autoreconnect not exist inside the cmdline, the operation is normal too, e.g.:

  vncviewer.exe -connect 127.0.0.1 -reconnectcounter 3



Other than the above, I feel the term "timeout" at the GUI is a little misleading. In my opinion, I will call it as "Reconnect Interval"
Last edited by YY on 2011-04-29 08:20, edited 1 time in total.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by Rudi De Vos »

Seems i added --autoreconnect instead of -autoreconnect.
-autoreconnect is not recognized as option and ignored.

modified in source, for next update
YY
200
200
Posts: 996
Joined: 2006-11-13 15:11

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by YY »

Have tested the 10961 (Apr.28)


1. the "-autoreconnect" option in the cmdline ... OK

2. timeout ... still not working correctly.

   - When the timeout is input at GUI, the the vncviewer always reconnect at 10 seconds (the default) interval.

   - When the timeout is input at Cmdline, the actual reconnect interval is about (3 x input_value).
    such that:

    vncviewer.exe -connect 127.0.0.1 -autoreconnect 3
    actual reconnect interval = 10 seconds

    vncviewer.exe -connect 127.0.0.1 -autoreconnect 7
    actual reconnect interval = 20 seconds
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by redge »

like winvnc, -autoreconnect need to be before -connect
anyway, i admit that should not care whatever the order for winvnc and vncviewer.

wrong
vncviewer.exe -connect 127.0.0.1 -autoreconnect 60 -reconnectcounter 3

good
vncviewer.exe -autoreconnect 60 -reconnectcounter 3 -connect 127.0.0.1
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
YY
200
200
Posts: 996
Joined: 2006-11-13 15:11

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by YY »

redge wrote:wrong
vncviewer.exe -connect 127.0.0.1 -autoreconnect 60 -reconnectcounter 3

good
vncviewer.exe -autoreconnect 60 -reconnectcounter 3 -connect 127.0.0.1
I didn't see any difference.

Both command works exactly the same way, and having the same bug.

As your example, rather than having a timeout (reconnect interval) of 60 (seconds) as specified in the commandline, but the actual result is about 170-180 seconds.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by Rudi De Vos »

Actual, -connect does not exist as parameter, unknown options are ignored
vncviewer use the parameter without prefix as destination

vncviewer -autoreconnect 60 -reconnectcounter 3 127.0.0.1 OK
vncviewer -autoreconnect 60 127.0.0.1 -reconnectcounter 3 OK
vncviewer -autoreconnect 60 -reconnectcounter 3 -unknownoption 127.0.0.1 OK

vncviewer.exe 127.0.0.1 -autoreconnect 60 -connectcounter 3 (-connectcounter is wrong, it's -autoreconnectcounter) FAIL
vncviewer try to connect to 3
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by redge »

you right, -connect is only reverse command of winvnc :-/

vncviewer /help (28 April)
/autoreconnect delayInSeconds
/reconnectcounter number_reconnect_attempt

synopsis
vncviewer [options] [host][:display]
vncviewer [options] [host][::port]
vncviewer [options] -listen [display]

based above synopsis, command line should be:
vncviewer.exe -autoreconnect -reconnectcounter 3 host (both fail)
vncviewer.exe -autoreconnect 60 -reconnectcounter 3 host (autoreconnect success, reconnectcounter fail)
somewhere a bug.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by Rudi De Vos »

Retested version 30april
vncviewer.exe -autoreconnect 60 -reconnectcounter 10 host
(show 10)
wait 60
1ste try, (this also use a few seconds before timeout)
(show 9)
wait 60
next try

Seems to work for me...
Only 60 seconds is long, viewer pause for 60 seconds before trying the first reconenect...
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by redge »

my test was wrong -autoreconnect fail because forbidden (with border effect it lock forever the connection of server.)
only single -autoreconnect per side.
i must update doc for prevent lockup case:

waiting
if server have -autoreconnect (direct or ID mode), vncviewer should ignore but NOT lock server
otherwise, this make all later tests fail at all.

yes, re-tested with server and viewer 30 April
direct connection + securevnc OK
only -reconnectcounter allowed with vncviewer + id
too many tests make me confusing a lot
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
YY
200
200
Posts: 996
Joined: 2006-11-13 15:11

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by YY »

Have test VNCviewer 10961 (Apr.30)

It now works properly ... both via GUI or via CMDline.


But as redge said, somewhere there is bug.

I will say, the problem is due to the VNCviewer not retrieve the option argruments properly and correctly. IT WILL NOT PROPERLY RUNNING IF THERE ARE EXTRA SPACE BETWEEN OPTION/PARAMETER

Since SPACE character is not easy to be displayed, I use the following symbol to show what I had excuted in the commandline
:
□ to represent each one SPACE key,
[ENTER] to represent the ENTER key



- vncviewer.exe□127.0.0.1□-autoreconnect[ENTER]
 Error: "You must specify an autoreconnect delay (default is 10)


- vncviewer.exe□127.0.0.1□-autoreconnect□[ENTER]
 Connect to the server without error


- vncviewer.exe□127.0.0.1□-autoreconnect□□[ENTER]
 Fail to connect to the server (trying to connect to a Nul remote host)


- vncviewer.exe□127.0.0.1□□-autoreconnect□[ENTER]
 Fail to connect to the server (trying to connect to a Nul remote host)




Similar problem are existing on -reconnectcounter and other options too.
Can this be fixed ?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by Rudi De Vos »

Sorry, i don't gonna change this.
The syntax is clear
vncviewer [host] [-auotreconnect nr]
YY
200
200
Posts: 996
Joined: 2006-11-13 15:11

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by YY »

OK! I will note down this characteristic.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: VNCview 10961 (Apr.26) -autoreconnect, -reconnectcounter

Post by Rudi De Vos »

Seems that documentation is a bigger issue then the bugs...
Post Reply