Windows 10 running TigerVNC server: how to establish reverse connection from command line

319 views
Skip to first unread message

jhube...@gmail.com

unread,
May 19, 2020, 5:48:09 PM5/19/20
to TigerVNC User Discussion/Support
Hello!

I am running TigerVNC server 1.10.80 on Windows 10, and am trying to establish a "reverse" connection to a listener from the command line. 

If I right-click on the TigerVNC server icon in the Windows System Tray and select "Add New Client..", I can enter the IP address of the listener in the dialog box that pops up and the reverse connection is established.

But I would like to do this from the command line.  If I try "vncconfig -connect www.xxx.yyy.zzz" (where www.xxx.yyy.zzz is the listener's ip address), the options dialog box pops up, but no connection to the listener is established. I have also tried "winvnc4 -connect www.xxx.yyy.zzz, but that doesn't seem to work either.

Any ideas how to make a reverse connection from the command line in Windows?  Ultimately, i want to set up a task so that anytime someone logs into the computer running the TigerVNC server, a reverse connection is established to the listener, but in order to do this, I need to issue something from the command line.

Thanks!

Pierre Ossman

unread,
May 20, 2020, 4:43:25 AM5/20/20
to jhube...@gmail.com, TigerVNC User Discussion/Support
On 19/05/2020 23:48, jhube...@gmail.com wrote:
>
> But I would like to do this from the command line. If I try "vncconfig
> -connect www.xxx.yyy.zzz" (where www.xxx.yyy.zzz is the listener's ip
> address), the options dialog box pops up, but no connection to the listener
> is established. I have also tried "winvnc4 -connect www.xxx.yyy.zzz, but
> that doesn't seem to work either.
>

"winvnc4.exe -connect" is supposed to work, so I guess something is broken.

Does it work fine if you do the reverse connection graphically?

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

jhube...@gmail.com

unread,
May 20, 2020, 10:20:18 AM5/20/20
to TigerVNC User Discussion/Support
After some more testing, here is what I have found:

When winvnc4.exe starts as a service when the computer starts, I can establish the reverse connection graphically by right clicking on the icon in the system tray, but the command line does not work.

If I DO NOT start winvnc4.exe as a service, but open a command prompt, cd to the TigerVNC folder, type "winvnc4" (to start the server), then type "winvnc4 -connect www.xxx.yyy.zzz", the reverse connection will be established.

Also, from a command prompt, "winvnc4 -server" does nothing....the winvnc server is not started.  The "winvnc4" command has to be typed alone with no other parameters in order for the server to start.

So, it seems that when winvnc4 is started as a service with the computer, subsequent winvnc4 commands from the command prompt cannot control the server service.

I have tried command prompts with/without administrator rights, but the behavior is the same.

Also, it seems odd that the "winvnc -server" command does not work from the command line.

Thanks!

Pierre Ossman

unread,
May 22, 2020, 2:45:33 AM5/22/20
to jhube...@gmail.com, TigerVNC User Discussion/Support
On 20/05/2020 16:20, jhube...@gmail.com wrote:
> After some more testing, here is what I have found:
>
> When winvnc4.exe starts as a service when the computer starts, I can
> establish the reverse connection graphically by right clicking on the icon
> in the system tray, but the command line does not work.
>
> If I DO NOT start winvnc4.exe as a service, but open a command prompt, cd
> to the TigerVNC folder, type "winvnc4" (to start the server), then type
> "winvnc4 -connect www.xxx.yyy.zzz", the reverse connection will be
> established.
>
> Also, from a command prompt, "winvnc4 -server" does nothing....the winvnc
> server is not started. The "winvnc4" command has to be typed alone with no
> other parameters in order for the server to start.
>
> So, it seems that when winvnc4 is started as a service with the computer,
> subsequent winvnc4 commands from the command prompt cannot control the
> server service.
>
> I have tried command prompts with/without administrator rights, but the
> behavior is the same.
>
> Also, it seems odd that the "winvnc -server" command does not work from the
> command line.
>

Thanks for the investigation. It sounds like there is still some
permission issue. The WinVNC code predates all the new stuff like UAC,
so there is probably something missing.

Unfortunately no one is maintaining WinVNC right now, so it's not likely
it will get fixed anytime soon. :/
Reply all
Reply to author
Forward
0 new messages