Forcibly Close an Established Connection Server-Side

62 views
Skip to first unread message

Andrew

unread,
Apr 1, 2022, 5:53:18 PM4/1/22
to TurboVNC User Discussion/Support
Is there a way with TurboVNC to forcibly close an established connection from the system running the Xvnc process? For example, as an admin I may want to kill an existing viewer connection without impacting the running Xvnc process. 

Thank you for any input. 

-Andrew

DRC

unread,
Apr 1, 2022, 6:22:18 PM4/1/22
to turbovn...@googlegroups.com
Not a straightforward way. You could disconnect all connected viewers
by doing something like this, but it's admittedly a hack:

NOTE: {n} is the TurboVNC session's display number.

# /opt/TurboVNC/bin/tvncconfig -display :{n} -set Disconnect=1
# Xvfb :42 &
# DISPLAY=:42 /opt/TurboVNC/bin/vncviewer -password
`/opt/TurboVNC/bin/vncpasswd -o -display :{n} 2>&1 | cut -f2 -d:`
-noshared :{n}

(Press Ctrl-C to stop the TurboVNC Viewer process.)

# pkill Xvfb
# /opt/TurboVNC/bin/tvncconfig -display :{n} -set Disconnect=0

It is feasible to implement a feature that would allow you to list and
dump specific viewers, but it would be a significant effort. (I'm
always willing to implement features like that if someone pays for my
labor, though.)

DRC
Reply all
Reply to author
Forward
0 new messages