X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=experiments%2Fvnc%2Finit.d%2Fvncserver.004;fp=experiments%2Fvnc%2Finit.d%2Fvncserver.004;h=9e95549c69280790d365e5d4e5080119e3a45b12;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=0000000000000000000000000000000000000000;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/experiments/vnc/init.d/vncserver.004 b/experiments/vnc/init.d/vncserver.004 new file mode 100755 index 00000000..9e95549c --- /dev/null +++ b/experiments/vnc/init.d/vncserver.004 @@ -0,0 +1,28 @@ +#!/bin/bash +PATH="$PATH:/usr/bin/" +export USER="fred" +DISPLAY="1" +DEPTH="16" +GEOMETRY="1200x800" +XAUTHORITY="/home/$USER/.Xauthority.vnc" +OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" +. /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 "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}" +su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" +;; + +restart) +$0 stop +$0 start +;; +esac +exit 0 +