1839651 Members
2817 Online
110152 Solutions
New Discussion

$DISPLAY

 
SOLVED
Go to solution
Victor Geere
Frequent Advisor

$DISPLAY

How do I set the $DISPLAY on a Linux client (in a telnet session) to display an X app running on an HP-UX server?

machine_name:0.0 doesn't cut it, so evidently I have to change one or both 0s.
I thought that I was because I had thought.
8 REPLIES 8
Peter Kloetgen
Esteemed Contributor
Solution

Re: $DISPLAY

Hi Victor,

not to difficult:

before telnetting:

xhost + name_of_linux_computer

after telnetting:

export DISPLAY=name_of_hpux_computer

That should do it.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Ceesjan van Hattum
Esteemed Contributor

Re: $DISPLAY

if (! $?DISPLAY) then
setenv DISPLAY :0.0
endif

This sets DISPLAY automatically in every shell. It doesn't override the current value when DISPLAY is already set, though. This way you can still run X11 applications remotely or through ssh with X11 tunneling.

And.. do not forget to set permissions, using .xhosts etcetera..

Regards,
Ceesjan
Alex Glennie
Honored Contributor

Re: $DISPLAY

Hostname or ip_address:0.0 should work providing hostname resolution is working OK fyi the second "0" relates to the screen ie if you had 2 screens :1 would be the identifier to the second so don't go changing that ;)

Do you recieve any errors ... I suggest running the commands via the command line as maybe the scripts masking error output ?

Perhaps if it's not hostname res then x authority is comming into play : try running xhost + on both systems ? I'm unclear as to whether the app is run on hp system but displayed on the linux box ..... does Xclock work using your script ... ?
Peter Kloetgen
Esteemed Contributor

Re: $DISPLAY

Hi again Victor,

xhost- command has to be executed on HP-UX computer, exporting the variable on Linux machine, with the following format:

export DISPLAY=hpux1:0

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Victor Geere
Frequent Advisor

Re: $DISPLAY

Just to clear any confusion:

I'm sittong in front of a Linux machine.

XClock:) is installed on the HP-UX server far, far away.

I want to telnet into the HP-UX server and type xclock and see a clock popping up.

Does this change anything?
I thought that I was because I had thought.
Peter Kloetgen
Esteemed Contributor

Re: $DISPLAY

Hi Victor,

no, this changes nothing.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Alex Glennie
Honored Contributor

Re: $DISPLAY

shouldn't change anything ....

the reason I choose xclock : it doesn't use fonts which sometimes causes problems :

on the linux box open up a terminal : run xhost +
telnet to HP , login
export DISPLAY=:0 where ip = linux system
run xclock .... does this work ?

if yes try the same via your script.

result / errors ?
Arockia Jegan
Trusted Contributor

Re: $DISPLAY

As long as you installed your linux system with x applications/xserver and the port 6000 is opened in the hp server firewall side (outbound) you will be fine with the commands mentioned above by every one.