Kubuntu as an Xwindows Server

When on Windows, I normaly use the XLive CD to connect to my Unix machines (they can be Linux and Solaris) and access remotely the X applications with their output showing on my Windows PC.

Well I’ve moved my work computer from XP to Kubuntu 8.04, and since then I struggle to do the same as I did with the XLive CD.

Basically with the XLive CD this is how it works:

– On your windows PC after starting the XLive CD, the X server starts and bind to the TCP X port to hear incoming connections. These incoming connections come from the client I try to access.

– On the client side I just do and export=ip_my_windows_machine:0.0 and start the X application.

– That’s it.

On Kubuntu I’ve tried several configurations to allow the KDE display manager to listen to network connections. I’ve searched a lot, changed the xorg.conf file, the kdm.rc file, and yes it didn’t work….

Well the issue was that I needed a paradigm change in how to connect to my client machines. I took me a while to see that I do not need to fiddle with my KDE configuration…

So how you can you do it?

Simple:

– Connect to your client machine through ssh (You’re using ssh, righ? ) and edit the file sshd.conf or ssh_config (It depends on your version) located in /etc/ or one of it’s subdirectories like sshd.

– Edit the file and make sure that you have a line ForwardX11 yes

– Save and restart the ssh deamon.

Now on your workstation instead of connecting with just ssh user@IP use ssh -X user@IP. With this command all X connections will be forwarded automatically to your Kubuntu desktop, just like you did an export DISPLAY and so on.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s