Start VNC at boot

Overview Forums Sticky Finger’s Kali-Pi Start VNC at boot

This topic contains 0 replies, has 1 voice, and was last updated by  roadwarrior 1 week, 3 days ago. This post has been viewed 12 times

  • Author
    Posts
  • #13749

    roadwarrior
    Participant

    I am having issues getting the VNC server to automatically start at boot. I tied setting it up with rc.local and with init.d but it just wont start at boot. I tried with automatically logging in and booting to the command (sticky menu) and automatically logging in and booting to Desktop but no luck.

    For the init.d startup I creted the file /etc/init.d/tightvncserver with:

    #!/bin/sh
    # /etc/init.d/tightvncserver
    # Set the VNCUSER variable to the name of the user to start tightvncserver under
    VNCUSER='pi'
    case "$1" in
      start)
        su $VNCUSER -c '/usr/bin/tightvncserver :1'
        echo "Starting TightVNC server for $VNCUSER"
        ;;
      stop)
        pkill Xtightvnc
        echo "Tightvncserver stopped"
        ;;
      *)
        echo "Usage: /etc/init.d/tightvncserver {start|stop}"
        exit 1
        ;;
    esac
    exit 0

    Then:

    sudo chmod 755 /etc/init.d/tightvncserver
    sudo update-rc.d tightvncserver defaults
    Reboot

    What am I missing?

You must be logged in to reply to this topic.