Difference between revisions of "Rockpi4/vnc"
< Rockpi4
(How to installing the VNC server and client and use it.) |
|||
Line 3: | Line 3: | ||
[[rockpi4 | ROCK Pi 4]] > [[rockpi4/Remote Access/Connect ROCK Pi via vnc |Connect ROCK Pi via VNC]] | [[rockpi4 | ROCK Pi 4]] > [[rockpi4/Remote Access/Connect ROCK Pi via vnc |Connect ROCK Pi via VNC]] | ||
+ | |||
+ | ===Install VNC server on your ROCK Pi 4 === | ||
+ | |||
+ | In this time we use the ubuntu image run on ROCK Pi 4. | ||
+ | |||
+ | *Install VNC server | ||
+ | |||
+ | sudo apt-get install xfce4 | ||
+ | sudo apt-get install vnc4server | ||
+ | sudo apt-get install xrdp | ||
+ | |||
+ | *Run the VNC server and setting password | ||
+ | |||
+ | sudo vncserver | ||
+ | |||
+ | *Edit the config file | ||
+ | |||
+ | sudo vim ~/.vnc/xstartup | ||
+ | |||
+ | *Change the contents to: | ||
+ | |||
+ | #!/bin/sh | ||
+ | unset SESSION_MANAGER | ||
+ | unset DBUS_SESSION_BUS_ADDRESS | ||
+ | [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | ||
+ | [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | ||
+ | vncconfig -iconic & | ||
+ | xfce4-session & | ||
+ | |||
+ | *Restart the vncserver and xrdp | ||
+ | sudo vncserver -kill :1 #Kill the vncserver process | ||
+ | sudo vncserver #Restart the vncserver | ||
+ | sudo service xrdp restart #Restart the xrdp | ||
+ | |||
+ | ===Install VNC client on your PC run on linux === | ||
+ | |||
+ | *Installation | ||
+ | |||
+ | You need a VNC-Viewer-6.19.325-Linux-x64.deb pack click [https://www.realvnc.com/en/connect/download/viewer/ here] download it now. | ||
+ | |||
+ | sudo dpkg -i VNC-Viewer-6.19.325-Linux-x64.deb | ||
+ | |||
+ | *Connecting ROCK Pi 4 | ||
+ | |||
+ | Power on your ROCK Pi 4 and ensure it connect the network. | ||
+ | |||
+ | Type on your PC: | ||
+ | |||
+ | vncviewer 'this is your ROCK Pi 4's IP address':1 | ||
+ | |||
+ | If you don't known what your ROCK Pi 4's IP address type this on your ROCK Pi 4 you can see it: | ||
+ | |||
+ | ifconfig #type 'man config' can get help for ifconfig | ||
+ | |||
+ | If your ROCK Pi 4's IP address is 192.168.31.196 you type vncviewer 192.168.31.196:1 can connect it, and then input your VNC password can open the desktop. |
Revision as of 09:04, 12 July 2019
ROCK Pi 4 > Connect ROCK Pi via VNC
Install VNC server on your ROCK Pi 4
In this time we use the ubuntu image run on ROCK Pi 4.
- Install VNC server
sudo apt-get install xfce4 sudo apt-get install vnc4server sudo apt-get install xrdp
- Run the VNC server and setting password
sudo vncserver
- Edit the config file
sudo vim ~/.vnc/xstartup
- Change the contents to:
#!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources vncconfig -iconic & xfce4-session &
- Restart the vncserver and xrdp
sudo vncserver -kill :1 #Kill the vncserver process sudo vncserver #Restart the vncserver sudo service xrdp restart #Restart the xrdp
Install VNC client on your PC run on linux
- Installation
You need a VNC-Viewer-6.19.325-Linux-x64.deb pack click here download it now.
sudo dpkg -i VNC-Viewer-6.19.325-Linux-x64.deb
- Connecting ROCK Pi 4
Power on your ROCK Pi 4 and ensure it connect the network.
Type on your PC:
vncviewer 'this is your ROCK Pi 4's IP address':1
If you don't known what your ROCK Pi 4's IP address type this on your ROCK Pi 4 you can see it:
ifconfig #type 'man config' can get help for ifconfig
If your ROCK Pi 4's IP address is 192.168.31.196 you type vncviewer 192.168.31.196:1 can connect it, and then input your VNC password can open the desktop.