Hi,
How to create, and then connect to, persistent VNC session from Windows VNC viewer using TigerVNC viewer client on Windows? I am trying to connect to my server running openSUSE of course. Does vncmanager use different ports then standard 5900, 5901, … range?
Initially, I used VNC server configured for One Time Sessions, as described here:
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html#sec.vnc.one-time
And it worked well!
But I quickly discovered that logging of closes all my unfinished work, close applications, disconnects network downloads, etc. So I decided to try persistent connection and have a similar experience Windows users have with RDP (and it’s very pleasant, smooth, out of the box experience I have to admit).
Yesterday, I configured VNC Session Initiated Using vncmanager using YAST as described here:
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html#vnc.persistent.vncmanager
But now TigerVNC Windows client cannot connect to myserver:5901.
It returns: unable connect to socket: Connection refused (10061).
It’s not a network issue, server responds to ping and I can ssh there too.
I use gdm as my Display Manager; gdm is “X Display Manager Control Protocol” (XDMCP) capable Display Manager, so I expect to be shown login screen as I was with One Time VNC sessions; and it worked great.
Is TigerVNC Windows client even capable of starting a new persistent, vncmanager driven session?
If not, please can you recommend another Windows client capable of doing so?
Have I misunderstood how persistent sessions are supposed to work? How can they be initiated?
Solved. It works for me now.
After **restarting **system several times, and trying same setup with console Yast, it started to work. I noticed it works exactly after setting “with vnc manager” option in the console Yast, via ssh from Windows, restarting just DM through that console Yast - I was able to VNC again. But the sessions still weren’t permanent despite vncmanager service was clearly running!
The second crucial bit was - **vncmanager-controller **tool MUST be used. Only there one can actually mark current session as permanent. And that’s it.
Manual at https://en.opensuse.org/VNC rather confusingly states that “vncmanager-controller tool can be used” but that’s misleading, for permanent sessions it’s a must, even with vncmanager the sessions are still by default one time only.
TigerVNC Windows client (vncviewer) is capable of joining persistent session. Using standard server and port number, usually 5901, same as with one time sessions; if persistent session exists user is presented with choice of start a new session or join existing session; on a simple screen with two grey buttons, exactly like on this screenshot, except in my case it was inside TigerVNC and session was Plasma.
Just to clarify:
- assuming you opened new VNC session; still by default one time only
- vncmanager is driving service behind VNC
- launch, via KDE start menu for example, tool vncmanager-controller
- set “Persistent, visible” and (recommended) “require user login”
- then you can safely close VNC viewer and still everything what was running will keep running - Kdenlive video encoding, application build, browser driven download, YouTube video, …
I tested it by having a separate ssh connection to my server and was watching using ps and top command line tools that everything was still even after I closed and disconnected my TigerVNC client; which was not the case previously when one time sessions were used.
How to verify that vncmanager is the driving service behind VNC:
$ ps ax | grep -i vncmanager
/usr/bin/vncmanager
/usr/bin/vncmanager-controller --tray --start-setup
$ systemctl status vncmanager
● vncmanager.service - VNC manager
Loaded: loaded (/usr/lib/systemd/system/vncmanager.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2019-02-17 21:08:10 GMT; 2h 33min ago
Main PID: 1177 (vncmanager)
Tasks: 8 (limit: 4915)
CGroup: /system.slice/vncmanager.service
├─1177 /usr/bin/vncmanager
└─1916 /usr/bin/Xvnc -log *:syslog:30,TcpSocket:syslog:-1 -inetd -MaxDisconnectionTime=5 -securitytypes=none -displayfd 10 -geometry 102>
$ systemctl status xvnc.socket
● xvnc.socket - Xvnc Server
Loaded: loaded (/usr/lib/systemd/system/xvnc.socket; disabled; vendor preset: disabled)
Active: inactive (dead)