想要通过VNC远程登录树莓派图形界面,树莓派一端必须安装VNC Server服务,另外还需要一些简单的配置,实现更便捷的操作,以下为详细步骤。
1. 安装VNC Server组件 -- tightvncserver
sudo apt-get install tightvncserver
2. 设置一个VNC密码
vncpasswd
(先输入操作密码两次,然后会询问是否设置一个查看(view-only)密码,按自己喜欢,一般没必要。)
3. 设置开机启动
sudo nano /etc/init.d/tightvncserver
加入如下内容:
#!/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:
# http://www.penguintutor.com/linux/tightvnc
### 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