VNC stands for Virtual Network controller, and it can be used to setup a remote desktop access.
There are 2 important parts of VNC: vncserver
and vncviewer
. vncserver
must be setup on the remote desktop that you want to access.
Once the vncserver
is setup, you can use any vncviewer
to connect. I would recoomend using RealVNC Viewer : https://www.realvnc.com/en/connect/download/viewer/
The following things need to be setup on remote desktop:
sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal gnome-core
sudo apt-get install vnc4server
Make a copy of vncserver script for backup:
sudo cp /usr/bin/vncserver /usr/bin/vncserver.bkp
Update vnserver script to ensure we start gnome-panel:
sudo vim /usr/bin/vncserver
Find this line "exec /etc/X11/xinit/xinitrcnn". and add these lines like below "exec /etc/X11/xinit/xinitrcnn".
"gnome-panel &\n".
"nautilus &\n".
"gnome-terminal &\n".
"vncconfig -iconic &\n".
To start a VNC, please use the following, you can use a different geometry based on your local machine desktop:
vncserver -geometry 1920x1080
Download VNC Viewer. Connect to desktop as machine-id.intra.cea.fr:
You can peacefully close the viewer, the server is still running on your remote machine and all your runs are taking place smoothly, sont worry :P!
Ensure that you have all the rights needed to run gnome-terminal
through ssh. Ideally you should not get any dbus launch errors or warnings. Also, ensure that your changes to vncserver script are right, and also that all the base stuff are installed.
Sometimes, the issue could be something more intricate, do not hesitate to contact me or use stackoverflow (even I use that only after all :P)
Please do ensure that you DO NOT create a lot of servers. If anything goes wrong, please kill the server with:
vncserver -kill <dispay-id>
With this you can ensure to use a single server running on your machine that is easy to track.
For more details, you can refer here: https://hackernoon.com/installation-of-vnc-server-on-ubuntu-1cf035370bd3