วันพฤหัสบดีที่ 16 กรกฎาคม พ.ศ. 2558

How to use VNC Server on Raspberry PI

If you want to remote to Raspbian with X Windows Desktop, you can use vnc server.

Install TightVNC Server.

$ sudo apt-get install tightvncserver

After install finished.

Start vncserver.

$ tightvncserver :<DISPLAY NUMBER>

Example: Start VNC Server on Display number 1 or port 5901 run with pi user.
$ tightvncserver :1

You will require a password to access your desktops.

Password: 
Verify: 

Would you like to enter a view-only password (y/n)? n


New 'X' desktop is raspberrypi:1


Creating default startup script /home/pi/.vnc/xstartup

Starting applications specified in /home/pi/.vnc/xstartup

Log file is /home/pi/.vnc/raspberrypi:1.log

On first time run script. Program will ask password for connect to VNC Server and ask view-only mode for this password.



After run tightvncserver. You can use TightVNC Viewer or VNC Client for remote to server.

Enter IP Address : Display number and Connect


Enter Password and OK

Connected to VNC Server


If you want to change vnc password for remote, use this command.
$ tightvncpasswd
Using password file /home/pi/.vnc/passwd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n

VNC Password File save on /<User Directory>/.vnc/passwd


Stop VNC Server

$ tightvncserver -kill :<DISPLAY NUMBER>

Example : Stop VNC Server Display number 1

$ tightvncserver -kill :1

Screen resolution of VNC.
Start VNC Server with option.

$ tightvncserver -geometry <width>x<height> -depth <color depth>

Example

$ tightvncserver -geometry 1280x720 -depth 16 :1

Reference :

TightVNC
http://tightvnc.org/


ไม่มีความคิดเห็น:

แสดงความคิดเห็น