1. sudo apt-get install tightvncserver
2. 執行 tightvncserver, 過程如下
You will require a password to access your desktops. Password: 123456 Verify: 123456 Would you like to enter a view-only password (y/n)? n New 'X' desktop is raspberrypi:1 Creating default startup script /home/trully/.vnc/xstartup Starting applications specified in /home/trully/.vnc/xstartup Log file is /home/trully/.vnc/raspberrypi:1.log
3. 寫個執行 vnc server 的 shell
vi /home/pi/bin/vncboot.sh
#! /bin/sh case "$1" in start) echo "Starting VNC Server" /usr/bin/vncserver :0 -geometry 1024x768 -depth 16 -pixelformat rgb565 ;; stop) echo "Stopping VNC Server" /usr/bin/vncserver -kill :0 ;; *) echo "Usage: /etc/init.d/vncboot {start|stop}" exit 1 ;; esac exit 0
chmod +x /home/pi/bin/vncboot.sh
sudo ln -s ~/bin/vncboot.sh /etc/init.d/vncboot
4. 在 client 以 safari 連線 vnc server
vnc://192.168.1.99/
ref : http://elinux.org/RPi_VNC_Server
沒有留言:
張貼留言