Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to invoke an xterm on a SLES 11 machine (machine A) from another SLES 11 machine (machine B). Currently it doesn't work. So I decided to test some stuff.

On machine A the following works: DISPLAY=:0.0 xterm However this doesn't: DISPLAY=localhost:0.0 xterm

I'm working on the assumption that if the latter doesn't work then a remote connection won't either.

To me it looks like a permissions issue.

Any help will be greatly appreciated.


share|improve this question

Are you sure that the X server on machine B is configured to accept the connection from machine A ? ("xhost +" and firewall off)

btw on my machine with default settings, therer is no "localhost" keyword, just the 1st line just like your mentioned it.

share|improve this answer
The firewall is off and xhost + has been run but still no joy. Any other suggestions? – James Dec 6 '10 at 12:02

Have you tried using ssh with X11 forwarding? It's the easiest and most secure variant these days.

ssh -X username@hostname

share|improve this answer
This is pretty neat but unfortunately I am working with an existing application that can't be modified to use this solution (for now at least). Thanks anyway :) – James Dec 6 '10 at 13:58
@James, you should not have to change anything in your application for it to work through an SSH tunnel. The only thing your application has to do is respect the $DISPLAY variable. – Alexis Wilke May 17 at 23:38
up vote 0 down vote accepted

thanks for the other answers. My problem was due to a setting in YaST > Security and Users > Local Security callded 'Disable remote access to the X server'. Enabling this, configuring/disabling the firewall and running xhost + seems to do the trick.

share|improve this answer
Hey, it seems that Rosco should get the points for answering your question, not you. – djangofan Mar 21 '11 at 23:30
Hey djangofan. I didn't give Rosco the accepted answer because his suggestion, although helpful, didn't fix the problem. – James Mar 24 '11 at 21:39
@djangofan, note that you do not get any points when you mark your own answer as the one that made it work. – Alexis Wilke May 17 at 23:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.