Using X11(Graphical Interface) over SSH
If you read my previous blogpost about setting up an ssh connection you can easily ssh to the departemental workstations. Some of you may have already encountered the problem that you cannot make use of programs that don’t have a command line interface. Luckily there exists a simple solution: X11. I’ll explain shortly how to set up such connection.
First of all you need an X11 server application that you can run locally on your computer. This application will interpret the information it gets from the connection and actually draw the windows. I use Xming Server a very simple application that doesn’t need any configuring done after installation. I didn’t test any X11 in linux yet but I bet it’s basically the same: install a X11 server.
Now the only thing remaining is configuring your ssh client to use X11 tunneling. I’ll describe this easy process in putty:
Open your configuration of your basic sshing to the server you want to use X11 with.
Under the category Connection>SSH select X11. In that window check the box ‘Enable X11 forwarding’ and type as ‘X display location‘ localhost:0 . Now your configuration should look like this:
You should probably save this configuration otherwise you will have to do this every time you want to use X11. If this is all set up lets try it out. Login to one of the workstations (There are no applications that use X11 on the buffer server as far as I know). And run the command xclock. As you may have guessed it will tell Xming to draw a window with a clock on it similar to the image at the beginning of this post. That’s it now you can run matlab for example over X11 if you don’t want to install it localy. Be warned however it can be quite laggy from time to time but it provides a decent solution when you programs that need a gui.
tags: cs - kul - putty - ssh - x11