Files
q-tools/vnc/vnckill
Ville Rantanen 83ba2dde48 more verbose
2016-09-07 10:33:16 +03:00

15 lines
279 B
Bash
Executable File

#!/bin/bash
function helpexit() {
echo "Kill your current VNC session"
exit
}
[[ "$1" = "-h" ]] && helpexit
dn=$( echo $UID | sed 's/.*\(....\)$/\1/' )
vncserver -kill :$dn || echo "vnc may have not been running"
rm -f /tmp/.X${dn}-lock
rm -f /tmp/.X11-unix/X${dn}