Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm very sorry, I'm not currently aware of the correct terminology of what I'm trying to do, otherwise Google probably would have fixed this for me:

Essentially, I am SSH'd into a SUSE Linux box and need to run a "silent" mode command of a GUI app, that apparently needs an active X session to run/attach to.

If I am viewing the desktop on said box, open a terminal, the command runs fine, it just hangs when run from a remote shell.

I understand there should be a way to attach this command to the already existing X session (I don't need any output, it generates a file), but I don't know how to do that.

Am I right? Wrong? What should I be doing?

share|improve this question
I realized this may be a duplicate of, so I'll be trying the answer there to see if it solves my problem. – anonymous coward May 20 '09 at 20:37
What is the program? – Zoredache May 20 '09 at 20:46
In this instance, a co-worker is trying to use OpenOffice or related, to convert a document to PDF via the command line. The 'solution' is getting kind of out-of-hand, but that's another thing altogether. This is automated, and run from a server that I believe DOES NOT have X, hence the SSHing into another. – anonymous coward May 20 '09 at 20:52
up vote 2 down vote accepted

From a workstation that is already running X11 you can ssh in with the -X option to enable X11 forwarding. Or set the ForwardX11 option to yes in your ssh configuration file. If you are connecting from windows you probably want Xming and to enable X11 forwarding in Putty. (see this)

With X11 forwarding enabled it will allow the remote X11 applications to connect to and use the X11 server on your workstation.

The server will need to allow X11 forwarding. See the sshd_config and set X11Forwarding to yes.

If everything worked correctly then once you have connected running the running the command on the remote echo $DISPLAY should display something like this.

# echo $DISPLAY

You can also test by running simple like xclock or xeyes. The application should be displayed on your workstation.

share|improve this answer
Does having X11 Forwarding on automatically attach my SSH connection to an X session, letting the commands I'm running do their thing, or is there another step once I'm logged in? (sorry, never had to do this before) – anonymous coward May 20 '09 at 20:42
I was assuming you where connecting from a computer that already had X11 running. I have updated the answer. – Zoredache May 20 '09 at 21:02

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.