TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
747 stars 137 forks source link

vncserver options -once & -idletimeout not work ? #351

Closed chiefliu closed 1 year ago

chiefliu commented 1 year ago

I want each vncserver only serves only once. After a vnc connection is finished ,the server should be terminated too, so I started vncserver with the option -once to achieve this goal. But the vncserver is never stopped after one connection is finished. The -once description is : Terminate server after one session. Also I tried the option -idletimeout in order to close the server when there is no vnc connections for X seconds. But the server is not terminated either.

After run ps -ef | grep Xvnc the process info is :

start with command vncserver -once

./Xvnc :3 -desktop TurboVNC: ubuntu:3 (chief) -auth /home/chief/.Xauthority -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/chief/.vnc/passwd -x509cert /home/chief/.vnc/x509_cert.pem -x509key /home/chief/.vnc/x509_private.pem -rfbport 5903 -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1 -deferupdate 1 -dridir /usr/lib/x86_64-linux-gnu/dri -registrydir /usr/lib/xorg -once

start with command vncserver -idletimeout 10

./Xvnc :4 -desktop TurboVNC: ubuntu:4 (chief) -auth /home/chief/.Xauthority -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/chief/.vnc/passwd -x509cert /home/chief/.vnc/x509_cert.pem -x509key /home/chief/.vnc/x509_private.pem -rfbport 5904 -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1 -deferupdate 1 -dridir /usr/lib/x86_64-linux-gnu/dri -registrydir /usr/lib/xorg -idletimeout 10

If these options are not supported or there is any problem under my work ?

dcommander commented 1 year ago

-once is an X.org option, not a TurboVNC option, and it applies to the obsolete XDMCP protocol. In other words, when the usage screen says Terminate server after one session, it means an XDMCP session, not a VNC session. Note that TurboVNC-specific command-line options are listed under headers such as:

TurboVNC connection options
===========================
TurboVNC input options
======================

All other options are X.org options, which are largely out of our control.

There is no VNC equivalent to the -once option. The problem with such an option is that it would shut down the server even if the user disconnected accidentally (due to a network problem, for instance) rather than purposefully.

I confirm that -idletimeout does not work properly. I will investigate that.