X11 Forwarding

"X11 Forwarding" is basically a way of running X applications remotely.  I call it "Remote X" since that is effectively what it does...  it allows you to run graphical X applications remotely.

In other words, I can run xclock, Konsole or KEdit (windowed mode), or blackbox (full screen) here on my Windows box - by sending the commands to my linux box at home.

Example...   Linux is running at home, and it's using X and KDE is running.  At work I am running Windows...  but let's say I would like to run some graphical Linux program (or a window manager, or a desktop) right here on my Windows machine.  I would have to have an X server here so that the program could attach to it.  I could then use PuTTY or some other SSH client (that allows X11 Forwarding) and I could simply type the command of the program/window manager/desktop that I want to run.  When I type the command in PuTTY, the graphical (X) program is "forwarded" to my Windows box.

It's actually pretty easy to do even though I'm sure I didn't make it sound that way.

What You Will Need (Linux)

Install Blackbox, Fluxbox and Openbox.

You may need to add some installation sources first to get Fluxbox:

In a terminal:

zypper sa http://packman.unixheads.com/suse/10.2/ packman102
zypper sa http://packman.unixheads.com/suse/10.3/ packman103
zypper in blackbox
zypper in fluxbox
zypper in blackbox

What You Will Need (Windows)

You will need to pull yourself away from your weenix box, I no, it hard 2 do.

For argument's sake, we will assume you went in to another room and the other computer is running Windows.

In Windows you will need PuTTY 0.60 and Xming

Move putty.exe somewhere like C:\Program Files, then make a shortcut to putty.exe on your desktop.


Run putty.

Session Tab:

Enter the IP address or host name that you want to connect to.  Click the SSH option which should set the port to 22.  Type a name in the "Saved Sessions" field...  use something obvious like Linux:0 for the name.

Connection -> Data Tab

Type your normal linux username in the "Auto-login username" field.

Connection -> SSH -> X11 Tab

Check the "Enable X11 forwarding" option.  In the "X display location" type :0 or leave it blank.  Check the "MIT-Magic-Cookie-1" option.

Go back up to the Session tab and click the save button.  Now Linux:0 is saved.

Change the name in the "Saved Sessions" field to Linux:1 and then change the Connection -> SSH -> X11 -> "X display location" to :1.  Go back tp the Sessions tab and click save again.

Double click Linux:0 and Linux:1 and login to both.


Install Xming.

After installing Xming make two Desktop shortcuts:

"C:\Program Files\Xming\Xming.exe" :0 -clipboard -fullscreen

"C:\Program Files\Xming\Xming.exe" :1 -clipboard -multiwindow

Run both shortcuts to start both X servers.

Note...  when the X :0 server runs you will need to hit Ctrl+Esc to get back to your desktop.

This will make a full screen X server on :0 and an X server on :1 that will allow multiple individual windows.

The idea here is that you can run several different commands on X :1 and you could run a full linux desktop or window manager (KDE, Xfce, WindowMaker) on X :0.

Check It Out!

Make sure both Xming X servers are running in Windows.

X :1

Connect with PuTTY using your :1 session.

Login, then type:  xclock & or kedit &

Always include the trailing "&".

You should now see xclock or kedit running in Windows.

Any command you can run in linux, you can type in PuTTY.

X :0

Connect with PuTTY using your :0 session.

Login, then type:  blackbox & or fluxbox &.

Click on your Xming button in the taskbar to check it out.  The fullscreen Xming always runs as a button in your taskbar.

You should now see Blackbox or Fluxbox running in full screen mode.

Might Be Needed...

If these things didn't work, check all of your steps above.

If you are certain that everything looks right, you may need to adjust your sshd_config.

Only do this if you are sure you need to.

kedit /etc/ssh/sshd_config

I didn't need to make any changes to these lines, but you may need to remove the comment marks (#) from the last two lines here:

X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

Save and exit.

If you had to make a change, also restart the SSH Server:

/etc/init.d/rc5.d/S09sshd restart

Note:  S09sshd might be named differently on your system, check the /etc/init.d/rc5.d/ folder.