Operating System - HP-UX
1834395 Members
4026 Online
110066 Solutions
New Discussion

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

 
Paul Lupa_1
New Member

Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

When I have telnetted to an HP-UX 10.20 box it seems to set the DISPLAY variable to the box that I am coming from. However this no longer works on the HP-UX 11.00 boxes. I cannot find any reference to the DISPLAY variable in the .login .profile .cshrc or the
/etc/skel/* or /etc/profile. What am I missing?
5 REPLIES 5
Jim Mulshine
Frequent Advisor

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

The DISPLAY variable doesn't get set when I telnet to a 10.20 or 11.0 server. I think it must be set somewhere in your 10.20 machine, possibly in another file that is called by your .profile or /etc/profile. Check again.
Patrick Wessel
Honored Contributor

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

There must be a change in your profile on the hp-ux 10.20 system. If you got the DISPLAY variable set for any user who telnet into the system, I'll think it was a change in the /etc/profile. Something like:
DISPLAY="$(who am i -R | sed -n "s/^.*(([a-z][0-9a-z]*).*$/1/p"):0"
export DISPLAY

If you like, you can add it to the /etc/profile on your 11.0 system
There is no good troubleshooting with bad data
RikTytgat
Honored Contributor

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

I tend to agree with Jim and Patrick.

But I must add that an extension to the telnet protocol (Telnet Environment option) described in RFC 1572, offers the possibility to do just that (passing environment variables over e telnet connection).

As an example, the telnet client and server shipped with RH6.2 Linux support this protocol option. The DISPLAY variable is indeed passed to the telnet target.

I suppose the HP telnet client and server have not yet implemented this feature.

Bye,
Rik
Paul Lupa_1
New Member

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

I won't assign myself points but after some of the answers. HPUX does not seem to implement the telnet function XDISPLOC (nor some of the others.) It appears that on the 10.20 box the previous admin replaced the telnetd. The sed command from the archives has a problem with remote hosts that are not resolvable. I.E. come back with an IP address instead of a name. the following seems to work better

who -R am i | awk '{print $6}' | sed -e s/(// | sed -e s/)// | sed -e s/:...//

Drop the "-R" for suns...
Philip Chan_1
Respected Contributor

Re: Setting DISPLAY for telnet. Why is HPUX 11.00 diff.

As I remember the "default" HPUX (10.20 and 11) don't set the DISPLAY variable under telnet sessions. I guess some guy must have twisted something for your place.