19621799f29aa8dd9d924dbdc505ea0e4338f1a2
[grml-etc.git] / etc / skel / .xinitrc.d / grml_vnc
1 #!/bin/sh
2 # Filename:      ~/.xinitrc.d/grml_vnc
3 # Purpose:       enable vnc if configured via bootoption
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 if [ "$XINIT_GRML_VNC" = "false" ] ; then
10    exit 0
11 fi
12
13 # if the vnc bootoption sets up the password let's start the vnc server
14 if [ -e $HOME/.vnc/passwd ]; then
15    test -f $HOME/.vnc/options && OPTIONS=$(cat $HOME/.vnc/options)
16    /usr/bin/x11vnc -bg -forever -noxdamage -o $HOME/.vnc/x11vnc.log -rfbauth \
17                    $HOME/.vnc/passwd -auth $HOME/.Xauthority -display $DISPLAY $OPTIONS
18 fi
19
20 ## END OF FILE #################################################################