Skip to main content

Remote Desktop

VNCServer

Quelle: https://www.raspberrypi.org/forums/viewtopic.php?t=225655#p1385116

/home/user/.vnc/xstartup

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

init.d Skript

Quelle: https://codeclinic.de/2014/01/raspberry-pi-tutorial-vnc-bei-raspbian-einrichten-teil-1/

    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides:          tightvncserver
    # Required-Start:    $local_fs
    # Required-Stop:     $local_fs
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start/stop tightvncserver
    ### END INIT INFO

    # More details see:
    # https://codeclinic.de/2014/01/raspberry-pi-tutorial-setting-vnc-default-desktop

    ### Customize this entry
    # Set the USER variable to the name of the user to start tightvncserver under
    export USER='pi'
    ### End customization required

    eval cd ~$USER
    case "$1" in
      start)
        su $USER -c '/usr/bin/tightvncserver :1'
        echo "Starting TightVNC server for $USER "
        ;;

      stop)
        pkill Xtightvnc
        echo "Tightvncserver stopped"
        ;;
      *)
        echo "Usage: /etc/init.d/tightvncserver {start|stop}"
        exit 1
        ;;
    esac
    exit 0