I have installed TigerVNC Viewer 64-bit v1.8.0 in Windows 7 through Cygwin database. I am trying to call it from Cygwin terminal by vncviewer command as:
vncviewer -via gatewayAddress 127.0.0.1::5901
However, I get the following message:
TigerVNC Viewer 64-bit v1.8.0
Built on: 2017-12-30 22:04
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Can't open display:
After searching a bit, I concluded in starting Xming server and seting DISPLAY variable in Cygwin: export DISPLAY=localhost:0
With those actions it worked like a charm.
However, when I do it through vncviewer.exe executable (note that previously I have performed local port forwarding in another terminal as GUI it doesn't seem to provide an analogous option as vncviewer in command line by "-via" option) it doesn't need Xming server.
So, the question is, since VNC use another protocol than X, why should I need Xming server? Is there a way to run from terminal without it? I tried "-display=1" option but with no luck.
VNC server is running like this on a server where I don't have root permissions: /usr/bin/Xvnc :1 -desktop desktopName -auth /usr/local/desktopName/.Xauthority -geometry 1500x1000 -rfbwait 30000 -rfbauth /usr/local/desktopName/.vnc/passwd -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -pn nolisten tcp -localhost -SecurityTypes None -AlwaysShared
Last, an another question. How to make vncviewer to connect to remote desktop without typing every time my password. I found some info in Arch linux wiki (https://wiki.archlinux.org/index.php/TigerVNC):
"Passwordless authentication
The -passwd switch allows one to define the location of the server's ~/.vnc/passwd file. It is expected that the user has access to this file on the server through SSH or through physical access. In either case, place that file on the client's file system in a safe location, i.e. one that has read access ONLY to the expected user.
$ vncviewer -passwd /path/to/server-passwd-file"
Though, I am not sure what "place that file on the client's file system" action serves. Could you please help?
Thank you in advance,
Chris