#!/bin/sh # create $HOME/.Xserverrc to override variable settings in this file, # i.e.: # # GEOMETRY=240x320 # DISPLAY=:0 # If you want to choose your own clients, create an executable script # $HOME/.Xclients, i.e.: # # #!/bin/sh # icewm & # aterm & # # Make sure to background all programs using "&". PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/X11:/usr/games DISPLAY=:1 export DISPLAY PATH AUTH_FILE=/etc/vncpasswd [ -f $AUTH_FILE ] && AUTH="-rfbauth $AUTH_FILE" [ ."$DISPLAY" = .":0" ] && rm -f /tmp/.X0-lock [ ."$DISPLAY" = .":1" ] && rm -f /tmp/.X1-lock [ ."$DISPLAY" = .":2" ] && rm -f /tmp/.X2-lock # Determine appropriate geometry for the virtual display if [ -f /proc/deviceinfo/product ] then PRODUCT=`cat /proc/deviceinfo/product` else PRODUCT=unknown fi case "$PRODUCT" in SL-C*) GEOMETRY=640x480 ;; *) GEOMETRY=640x640 ;; esac if [ -f $HOME/.Xserverrc ] then . $HOME/.Xserverrc fi # Run the VNC server in the background Xvnc -geometry $GEOMETRY \ -depth 16 -pixelformat RGB565 \ $AUTH \ $DISPLAY & # Give it some time to initialize before launching clients sleep 5 # Client programs get run from the home directory cd $HOME # Load application resource defaults [ -f .Xdefaults ] && xrdb .Xdefaults # If there's a .Xdefaults file, run that and ignore the rest of this file. [ -x .Xclients ] && exec ./.Xclients # No customizations - so load some default clients. icewm & # open terminals case "$PRODUCT" in SL-C*) aterm -fn 8x13bold +sb -bg black -fg white -geometry 70x30-5+5 & ;; *) aterm -cr '#33cc33' +sb -fn 5x7 -geometry 61x32+0+340 & aterm -cr '#33cc33' +sb -fn 5x7 -geometry 45x40-0+300 & aterm -cr '#33cc33' +sb -fn 6x13 -geometry 51x17-0+0 & aterm -cr '#33cc33' +sb -fn 6x13 -geometry 38x22+0+0 & ;; esac # autohide mouse pointer unclutter & # wait for icewm to finish initializing - FIXME sleep 10 # set background color xsetroot -solid '#123' # Show the help file. Rename HELP.txt to something else if you don't want this, # or create your own .Xclients file. # HELP_FILE="HELP.txt" if [ -f "$HELP_FILE" ]; then case "$PRODUCT" in SL-C*) aterm -fn 8x13bold +sb -geometry 38x28+5+50 \ -e less "$HELP_FILE" & ;; *) aterm -cr '#33cc33' +sb -fn 6x13 -geometry 38x22+0+0 \ -e less "$HELP_FILE" & ;; esac fi