Monday, January 25, 2010

How To Use x11vnc And Gtk VNC To Connect To A Remote Linux Desktop

If you are looking to for a remote administration and you’re for Linux, you can have the right tool to do your work easier. If you have the VNC Server in the Computer, your mind will be stress free. In this article, we have given the steps to take the control of a Remote Linux Desktop using x11vnc, Remote Desktop Viewer, and secure shell. Moreover, you should have the secure shell access to the remote Computer.

How to Install
If you are going to install, you will need the following installed in order to take on this task.
Local machine
• VNC client (such as gtk vnc)
• Ssh client (openssh works fine)
Remote machine
• Ssh server (openssh-server works great)
• VNC server (x11vnc is my recommendation)

Now, you can start the process using the management tool, search for the applications given above and install all of them. You should install the secure shell server in the remote machine, if it doesn’t have. At the same time, if you’ve already ssh server installed, you can simply ssh to the remote machine and install the VNC server from command line just like such as sudo apt-get install x11vnc. Once you’ve finished this process, you can start to set up the connection.
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: After that, first you have to do is secure shell to remote machine and start up the VNC server. You can enter the command from the command line x11vnc in the Remote Machine. If you enter this command, it will start the VNC server but you wont get your bash prompt returned to you. If you want to run the VNC server to run always, you have to add the line
x11vnc &
to the end of your /etc/rc.local
The Client Machine

In this article, Gtk VNC Viewer is used as it is simple and up to date client. Moreover, you can find this tool in Application -? Internet. You can start a straight-forward connection windows, when you start this process. Then you have to enter
• IP Address:Port: IP address and port of the remote machine (in the form of NOTE: x11vnc uses port 5900 by default.
• User name: The user name you will connect with on the remote machine.
• Password: Password of the user on the remote machine.
If you’re sure about these information, you can click the Add button to add the remote machine.
After that, you have to enter the information in the text areas and click the Connect button or double click on a saved machine from the list in order to connect to the remote machine. Once you connect a new remote machine, you can get a maximized window with the Remote Desktop. There from, you can do the following

• Disconnect: You can disconnect from the remote machine.
• Send keys: You can send key-combinations to the remote machine.
• Fullscreen: You can switch to a full screen window.
• Screenshot: You can take a screen shot of the remote desktop.
• Make icon on desktop: You can create an icon that allows you to connect to this remote desktop with a double-click.
All it’s done. Now you can start accessing remote is possible now. You can use this feature to train users or troubleshoot the issues on a remote machine.