Super User is a question and answer site for computer enthusiasts and power users. 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 am helping out create a media wall from spare computers/screens for a local university to use to distribute renders across several machines. However, it's still buggy and I need to restart the clients occasionally.


I'm currently having trouble figuring out how to re-launch the client java app remotely from the server. Note: the clients are connected directly to dual screens - rather than rendering headless


I have recreated a similar environment on AWS/EC2 where I can get the client-server model to work, but just can't start the gui client remotely. I keep getting:

Can't open Display.

Specific issue:

Currently I use the following from the server:

ssh ubuntu@guiclient1 "export DISPLAY=:0; cd ~/wallclient/; xclock &"


I monitor the same guiclient1 desktop using x2go. I haven't done any specific xauth / xhost configuration - as haven't seen any issues related to this yet.

What should I be configuring differently? I haven't found much help online - I don't want to do port forwarding back to server, which is what most questions answer.


share|improve this question
Right now I am unclear on what programs are running on which machines; what hardware is connected to each machine; and what shells are running (directly or by ssh) on which machines. So the advice below is necessarily general. If you want better advice you'll have to be very specific. Try listing the machines by name and purpose and telling us what shell you open on which machines. – dmckee Dec 30 '11 at 15:12

For direct connection in X over the network

X has a permission model for allowing remote clients{*} to use a particular display. Read the manpage for xhost, but the short version is

server$ xhost remote_client

to interactively allow remote_client to use your screen.

Then on the client you just run

client$ xeyes

Direct ssh

Connecting through a ssh is another matter. You should use the -X or -Y or set the corresponding values in .ssh/config (ForwardX11 for -X). Your ssh client should then set the proper value for DISPLAY and you shouldn't mess with it.

server$ ssh -X client
client(by ssh)$ printenv DISPLAY
client(by ssh)$ xeyes

Tunneling ssh

Open the tunnel through the firewall with something like

server$ ssh -X -L 1111:client:22 user@firewall

then in another shell

server$ ssh -X -p 1111 user@localhost
client(by ssh)$ printenv DISPLAY
client(by ssh tunnel)$ xeyes

(note the -X again) to open a shell running on destination. As with the direct ssh connection your DISPLAY variable should be set for you.

{*} Here I follow the X tradition of saying that the computer on which display occurs is the server because it makes its display available to multiple programs running on client mahcines.

This will probably seem backwards, as you are probably used to the machine your are working at being the "client" and the one tucked in the closet being the "server".

share|improve this answer
thanks @dmckee - this is useful and allows me to investigate further. I did the following sequence: client$ xhost +server server$ ssh -X user@client client (via ssh)$ printenv DISPLAY which returns "", and nothing works off that however the X2go client connects via localhost:53 or similar fine – velniukas Dec 30 '11 at 18:26
maybe an issue with XAuthority? I notice there is no env variable set for it. Also double checking the ssh verbose connection - there is no mention of 'requesting x11 forwarding in the output'. One more learning exercise I think. :) – velniukas Dec 30 '11 at 18:37
Is the issue that the 'server' is not running a graphical X client as well. server$ xhost +client also gives unable to open display "". – velniukas Dec 30 '11 at 18:58
The machine on which the program is going to be displayed must be running a X server (note that startx and similar scripts start the "server" in the X notation---the program that makes the screen available to "client"s like xclock, xeyes and so on). The machine where the code runs need not be running a X server. Finally, ave you checked that you have X forwarding enabled in ssh? – dmckee Dec 30 '11 at 19:56
ok, then my setup is ok from that aspect. x11 forwarding is enabled in both. – velniukas Dec 31 '11 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .