Setting up tightvnc on Raspberry Pi

Install the package

sudo apt-get install tightvncserver

Run and assign passwords

Assign password used to login and password used to view

tightvncserver

Make autostart script

Add a file tightvncserver in /etc/init.d with the following content

#!/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 -geometry 1920x1080 -depth 24 -dpi 96'
    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

The line

  1. geometry 1920×1080 -depth 24 -dpi 96

is optional.

Edit permissions

sudo chmod 755 /etc/init.d/tightvncserver

Install service

sudo update-rc.d tightvncserver defaults

Reboot

sudo reboot

Login with vnc client

use

ip-address:5901

in the vnc client to connect to the Raspberry Pi, where ip-address is the ip-address of the Raspberry Pi

 
howto/setting_up_tightvnc_on_raspberry_pi.txt · Last modified: 2016/10/09 19:00 by akhe
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki