gpulover icon

/etc/init.d/vncserver

gpulover | PRO | 04/09/18 05:25:13 PM UTC | 0 ⭐ | 552 👁️ | Never ⏰ | []
Bash |

560 B

|

None

|

0 👍

/

0 👎

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="CHANGE____"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1440x900"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" #-localhost"
. /lib/lsb/init-functions
 
case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;
 
stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;
 
restart)
$0 stop
$0 start
;;
esac
exit 0

Comments