[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


Chris Burns said:
> Hey all,
> I dotn' think my $DISPLAY variable is set correctly.  I'm trying to run
> an X program on a remote computer through ssh.  It says:

first, be sure that the server that you are sending the X client to
is accepting connections, by default debian systems do NOT accept TCP
connections for X. You can do a quick test by just telnetting to port
6000 (the default for display 0) on the X server machine from the machine
which runs the client. If it connects, skip the next step, if not ..

if not then I would do 'grep -nri "nolisten tcp" /etc/*' and remove any
references that comes up(backup the files before you change them if your
paranoid. Then you must restart the X server, and/or the display manager
(kdm/gdm/xdm/etc). Once it comes back up, try the telnet test again,
and see what happens.

if it works, then go to the remote machine, and set the enviornment,
I usually do (this is bash syntax, and I think sh too):

export DISPLAY=_x_server_system_:0.0

and on the X server system:

xhost +_x_client_system_

then try to run your app, I reccomend FIRST running something simple
like xclock just to be sure the connection works. Then you can try
something more complicated.

if your local display is something other then 0(this is very unlikely
but possible), open a terminal on the local system and check
the enviornment variabls, try the command 'set' by itself and look
for DISPLAY, on my laptop here it says:


good luck. There are other ways to do X as well. There is tunneling over
SSH, there is VNC, and other thin client solutions, some of which are
commercial. I personally use SSH wherever possible, though some systems
I have to use the traditional method because the systems lack SSH and it's
not worth installing SSH on them(in some cases it could take several hours
to compile the needed libs and tools to build ssh from source).


Reply to: