Laptop Build: Getting xhost + to work

For most of the servers I have to connect to at work I just use telnet or ssh but sometimes I need to run X clients locally such as for the Oracle Universal Installer.

I found that I had to configure KDM in Kubuntu to listen on the network to accept connections to run X. Simply setting the DISPLAY variable on the remote system, typing xhost + on the local system and then running the X application on the remote system would not work.

The key file is /etc/kde3/kdm/kdmrc

In there is a line that says:-

ServerArgsLocal=-nolisten tcp

Just comment this out by putting a # in front of the line and restart X by logging out and back in again. Now you can run remote X clients on your local machine as long as you have run xhost + or to be a bit more secure xhost remotehost where remotehost is the name or IP address of the remote host you are working with. (See man xhost for more details).
Bear in mind that there are some security risks to removeing the -nolisten tcp from KDM and if possible you should look at using X Forwarding over ssh, but then like me you may have systems where this isn’t possible.


3 thoughts on “Laptop Build: Getting xhost + to work

  1. My company uses Tarantella, which is blazing fast at running X applications from a remote machine. I’ve finally succumbed to using Tarantella too, because I couldn’t get X applications from remote servers running fast enough. I tried lots of stuff: I setup ssh with compression on the remote server, ssh’ed there with compression enabled, then exported display from there – you see where I’m going here. I hoped applications would be faster, but no such luck. Vnc works of course, but windows don’t appear to be ‘native’ – I hate using them in vncviewer.

    Any suggestions?

  2. Hi Tread,

    Have a look at the Nx Nomachine/FreeNX system for remote access. It allows remote access to desktops but has excellent compression and other screen estate management technology so that it works quickly even on dial up lines.

    I saw it demonstrated at a conference last year and it looked cool. I keep meaning to set it up on my machine.

    There are open source and commercial but free (as in beer) options for the server software you need to run it with.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s