Operating System - HP-UX
1849566 Members
5962 Online
104044 Solutions
New Discussion

Further to the evil DISPLAY varible

 
SOLVED
Go to solution
Ron Irving
Trusted Contributor

Further to the evil DISPLAY varible

I'm using eXceed, to connect to my HP server, running 10.20. My question is further to a posting last week. If eXceed is somehow magically polling each workstation for the ip address to assign to a DISPLAY varaible, what, if anything, should be assigned to the DISPLAY variable in the .profile script?

thanx in advance,

Ron Irving
Should have been an astronaut.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Further to the evil DISPLAY varible

Hi Ron,

I assume that you are using XDMCP broadcast connections, in that case DISPLAY should be set for you. Your .profile should test whether or not DISPLAY has been set and only if not should you set it to some default value or simply explicitly set it and do nothing in the .profile.

Regards, Clay
If it ain't broke, I can fix that.
Alexander M. Ermes
Honored Contributor

Re: Further to the evil DISPLAY varible

Hi there.
Perhaps you can use a little script like this ;

export TERM=xterm
export DISPLAY=your_station_or_IP:0.0
PATH=$PATH:/opt/perf/bin

We named it xdispe and placed it in the /usr/local/bin.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Ron Irving
Trusted Contributor

Re: Further to the evil DISPLAY varible

we are not running CDE, so we are running it in passive mode...no XDMCP. If I put any sort of script in, wouldn't all the workstations just pick up on the one ip address?? That will cause many headaches, no??

(a career change is being discussed...:)
Should have been an astronaut.
rainer doelker
Valued Contributor

Re: Further to the evil DISPLAY varible

Ron,
according to what you have configured in eXceed (reflectionX respectively) you may get a single window or a full CDE session.
With a full CDE session you can either send a XDMCP broadcast so that all computers running a dtlogin are listed in the login-mask. You can as well select XDMCP direct so you get only a login from one machine.
Usually in a full CDE session you would not need to set the DISPLAY-variable as it is set on CDE startup.
If you have a single window-session you could want to set the variable by:

# DISPLAY
DISPLAY="$(who am i -R| sed -n "s/^.*(\([a-z][0-9a-z]*\).*$/\1/p"):0"
export DISPLAY
echo "Detected remote login: export DISPLAY=$DISPLAY"

Perhaps you can precise what exactely you want to set in your profile. I mean for which login condition.

rainer
John Palmer
Honored Contributor
Solution

Re: Further to the evil DISPLAY varible

DISPLAY defines the IP address of your X server which in your case will that of your PC which is running the eXceed emulator.

You can obtain this in .profile with:-

DISPLAY=$(who -am|awk '{print $8 ":0"}')
export DISPLAY

Regards,
John