Howto Linux X-Server on windows.
Oke here a small but hopefully “strong” little tutorial on how to “display” linux X compontents on your windows desktop. This might help you administer linux machines easier without the need to install a VNC deamon or have X enabled or even installed on the remote Linux box.
Getting Xming (an Xserver for Windows).
First of all, you need a program that accepts X and will display it for you on the windows Desktop. For this purpose we will use Xming, which is an X server for windows.
Download and install Xming from this location:
The power of Xming is that its a small, fast, full featured X server thats unlimited and best of all “free!”
Next next finish install Xming (do note the “type” of putty terminal that you would like to use).
Tip : If you dont know Putty, its a free SSH (secure shell) client, that you`ll need to reach most of the modern linux machines. If you are still using Telnet? Then do consider installing a SSHd instead, much saver 🙂
During the setup procedure do select both “desktop icon for xming” and desktop icon for “xLaunch”.
Setup the Xming Server without any security.
You are free to add security afterward locally, but to ensure you its working please leave the security options be at this moment.
1. After the xming install select “Xlaunch” from your desktop.
2. Select “Multiple windows”
3. Display Numer : 0
4. Select “Start no Client” and “next”
5. Select “No access Control” and “next”
6. Either click “Save Config” and or “finish”
7. Note the “Xming Icon in your Windows System tray.
The most important part is done now, next open a connection to the linux box you want to address. In our case we use putty to open a remote ssh session. No putty yet? Download it from this location:
Simply download the putty.exe to your desktop and run it.
For advanced users putty does have a “X11 forwarding option” that allows you to auto forward the X console. In our case we will use the ENV setting so users without putty will be able to use this as well.
Configuring Linux to use a remote display…
1. Open a connection to the remote linux machine using putty, or any other terminal.
2. Logon to the box using your credentials.
3. You need enough permissions to alter ENV settings.
To change the default display linux uses we need to set a specific “environmental” setting. This setting simply contains an IP adress (the one used by your machine) and the display number used by xming ( 😮 in this example).
In my case on my machine “cmd.exe > ipconfig” shows 10.252.251.9, and in the previous config i used “display : 0” as the display number.
To set the environment setting use this command on linux.
Testing the settings using a simple xclock or xterm command on linux..
Next to check if the settings are working, and everything is allright, run the following command on your linux box.
If everything is set correctly a xclock should display on your windows desktop displaying the local time on the remote linux machine.
If this isnt working, you might need to alter some settings on your network / firewall. For this X11 session to work the following ports should be open between the linux machine and your machine.
cat /etc/services | grep x11 x11 <strong>6000/tcp</strong> X # the X Window System x11-ssh-offset <strong>6010/tcp</strong> # SSH X11 forwarding offset
Doing configurations on Redhat using Xming.
If you like to configure your linux machine using nice graphical menus you need to install the following packages onto your linux box.
rpm -qa | grep system-config system-config-securitylevel-tui system-config-printer-libs system-config-services system-config-date system-config-lvm system-config-language system-config-netboot-cmd system-config-kdump system-config-rootpassword system-config-netboot system-config-keyboard system-config-network-tui system-config-printer system-config-soundcard system-config-network system-config-securitylevel system-config-users system-config-kickstart system-config-display
For Suse you need YAST (yet another config tool) that will also support the old “terminal” configuration 🙂
When X is configured simply run the desired config tool, for example the network.
dont forget to add the ampersand, this will enable you to keep using the terminal. For the ampersand will make the proces run in the background as a “child” of your terminal.
Well this should be about it. Using the x11 forwarding option in putty should remove the need to set the display environment variable every time.
hope this helps 🙂
Posted on December 10, 2009, in Linux, Linux Commands, Tooling and tagged howto, Linux, Management, On, Putty, Remote, showing, SSH, SSHd, Using, windows, X, X11, xclock, Xming, Xserver. Bookmark the permalink. Leave a comment.