1830160 Members
4236 Online
109999 Solutions
New Discussion

Open X display remotely

 
Luis Lugo
Occasional Contributor

Open X display remotely

hi,

is posible open X display remotly, if it's posible what is the procedure to this, thank's
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Open X display remotely

Two things to do.

1) Make sure port 7000 is open on every firewall between the server and client.

2)On server

export DISPLAY=:0.0

example:

export DISPLAY=192.168.0.40

Then fire up X.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
njia_1
Trusted Contributor

Re: Open X display remotely

Hi

On the remote host you need to disable X access control list
set dispalay first, depends on the shell you use, the syntax will be different.

setenv DISPALY localhost:0 (C shell)
set DISPLAY=localhost:0 (bash)

# xhost +

this will allow any X client to connect to local display
Muthukumar_5
Honored Contributor

Re: Open X display remotely

If the X server is running on server then you can setup DISPLAY variable to make X display on client machine.

export DISPLAY=(ip-address):0.0

Example:

export DISPLAY=10.31.77.89:0.0

where, 10.31.77.89 is your machine Ip-address

hth.
Easy to suggest when don't know about the problem!
Steven E. Protter
Exalted Contributor

Re: Open X display remotely

My first post is in error.

export DISPLAY=192.168.0.40:0.0

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: Open X display remotely

You can also use XDMCP, to do that, you can run gdmsetup, enable XDMCP, then in another box type:

X -query IP_OF_SERVER -once
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bob_Vance
Esteemed Contributor

Re: Open X display remotely

FWIW, just a couple of little quibbles:


1)
to set environment variable in BASH, use
'export DISPLAY=..' (not 'set DISPLAY ...')


2)
In X window protocol, the client/server relationship is reversed from what we normally think of. Technically, you set DISPLAY to the X "server", not the the X client.

The X "client" is the program that is actually using the DISPLAY variable to find a graphical display. The "X server" or "X window server" is a piece of software that understands X protocol and also has access to a graphical display and can convert the X protocol commands and requests to output on the display.

When you are sitting at a graphical console on , er, what we normally call a server ;>), then the X client and X server are the on the same box.

However, if you have X server software running on your PC, e.g., ReflectionX, then your PC has the X *server*. The program, e.g., 'sam', on the login server is the X client.

So,

. we normally log in to a ("computing"?, "application"?, "hp"?) "server".

. when we want to run an X program like 'sam', it is the X "client".

. we then set DISPLAY to point to the X "server" (actually,
X_server:his_display#.the_screen#.
)


bv
"The lyf so short, the craft so long to lerne." - Chaucer
dirk dierickx
Honored Contributor

Re: Open X display remotely

also when using ssh you don't need to bother with a lot of stuff, for running a remote command with X display exported you just use it as followed: ssh -X