X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=experiments%2Fvnc%2Finit.d%2Fvncserver.002;fp=experiments%2Fvnc%2Finit.d%2Fvncserver.002;h=73bdec08c099506105978aaad9d7080648c2f74c;hb=52fa1f567127cd47e446c68deb29a6d6fe20ce82;hp=0000000000000000000000000000000000000000;hpb=e1127a793a9bfe64df1b3a5209c86bb66505fe28;p=feisty_meow.git diff --git a/experiments/vnc/init.d/vncserver.002 b/experiments/vnc/init.d/vncserver.002 new file mode 100755 index 00000000..73bdec08 --- /dev/null +++ b/experiments/vnc/init.d/vncserver.002 @@ -0,0 +1,27 @@ +#!/bin/bash +PATH="$PATH:/usr/bin/" +export USER="fred" +DISPLAY="1" +DEPTH="16" +GEOMETRY="1200x800" +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 +