Being able to do remote administration is crucial to many system administrators. And there are plenty of tools available for this job. You can use command line tools and full-blown GUI tools. Of course many users prefer to do things as simply as possible. Fortunately Linux has the right tools to make such a task simple. The ability to do graphical remote desktop administration is just a matter of having the vnc server running on the target machine and then running the desktop viewer on the local machine.
In this article I will show you how to take control of a remote Linux desktop with the help of x11vnc, Remote Desktop Viewer, and secure shell. You will, of course, have to have secure shell access to the remote machine. Other than that you have everything you need. So let's get to work.
You will need the following installed in order to take on this task.
Fire up your package management tool, search for the above applications, and install each. If you do not already have the secure shell server installed on the remote machine, you will need physical access in order to install the tools. If you already have the ssh server installed you can simply ssh to the remote machine and install the VNC server from command line (such as sudo apt-get install x11vnc) Once you have these installed you are ready to start setting up your connection.
The first thing you need to do is secure shell to the remote machine (we'll say the remote machine is at IP address 192.168.1.10) and start up the VNC server. From the command line (on the remote machine) you will enter the command x11vnc. This will start the VNC server but you will not get your bash prompt returned to you. To have your VNC server running at all times you could add the line:
to the end of your /etc/rc.local
The Client Machine
For the purposes of this tutorial I will use the Gtk VNC Viewer. It is a very simple to use, up to date, client. You will find this tool in Applications > Internet. When you first start it up you will see a fairly straight-forward connection window. You only need enter:
If you know the above information is correct (and you know you'll be connecting to this machine again) click the Add button to add the remote machine (as shown in Figure 1).
To connect to the remote machine either enter the information in the text areas and click the Connect button or double click on a saved machine from the list.
When you connect a new, maximized window will open showing your remote desktop (see Figure 2). From this window you can do the following:
You can now interact with this remote machine as if it were your own desktop.
Taking advantage of the remote desktop is a great way to train users or trouble shoot problems on a remote machine. I use this exact setup for a number of clients. It works well.Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.