ELEKTRONEK.pl

18.05.2017

Zdalny pulpit VNC…

Zdalny pulpit VNC na Raspberry Pi czy na Banana Pi czy na Odroid czy na czym kto tam sobie życzy.

Potrzebujemy serwer VNC, nic prostszego:

1. sudo apt-get update – jak zwykle
2. sudo apt-get install tightvncserver – serwer vnc
3. tightvncserver – włączamy serwer VNC i ustalamy hasło

Serwer już działa i możemy się do niego połączyć przez np. TightVNC Viewer

Automatyczne uruchamianie serwera VNC po reboot’cie.
1. w /etc/init.d/ jak niema, dodajemy plik tightvncserver
2. edytujemy go i wstawiamy konfigurację:

#!/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

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

export USER=’pi’ – nazwa użytkownika dla raspbiana, przy innych systemach podaj prawidłową.

3. sudo chmod 755 /etc/init.d/tightvncserver – zmieniamy uprawnienia
4. sudo update-rc.d tightvncserver defaults – dodajemy automatyczny start VNC serwera

Nasz serwer będzie widoczny na porcie 5901.