- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- DISPLAY after telnet
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:27 AM
10-21-2004 03:27 AM
/usr/bin/X11/xhost +$HOST
This is what I added to my .profile to allow me to run RSAM.
However when I telnet to another box
I always have to do export DISPLAY=xxx.xx.xx.xxx:0.0
I also created .Xdefaults file with *loginShell: True
should i do that for all users with SAM access
What I would like to do is automatically detect the IPs or name of the PC the users on and put export DISPLAY in they .profiles so they can use RSAM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:31 AM
10-21-2004 03:31 AM
Re: DISPLAY after telnet
export DISPLAY=$(who -um|awk '{print $NF}')
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:46 AM
10-21-2004 03:46 AM
Re: DISPLAY after telnet
export DISPLAY=$(getip `who -mu | awk '{ print $NF }'|tr -d '()'`| awk '{ print $4}'):0.0
It will do your requirement there.
Don't use who -um there. It will reply with hostname there. It can not be used to set DISPLAY parameter.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:57 AM
10-21-2004 03:57 AM
Re: DISPLAY after telnet
Try this in your .profile
export DISPLAY=`who -mu |awk '{print $8}'`:0.0
hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:10 AM
10-21-2004 04:10 AM
Re: DISPLAY after telnet
IF we use,
export DISPLAY=`who -mu |awk '{print $8}'`:0.0
It will give ip-address / resolved hostname there. There is a possibility as, given ip-address can be reolved and display as (hostname) or (FQDN)
We can avoid that with getip call.
getip host will give ip-address.
export DISPLAY=$(getip `who -mu | awk '{ print $8 }' | tr -d '()'`:0.0)
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:12 AM
10-21-2004 04:12 AM
Re: DISPLAY after telnet
Sorry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:16 AM
10-21-2004 04:16 AM
Re: DISPLAY after telnet
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=686016
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:19 AM
10-21-2004 04:19 AM
Re: DISPLAY after telnet
I dont believe this is possible. The second UNIX box can only recognize the source connection (which is the first UNIX box).
Do you have remsh/ssh capablities from UNIX2 to UNIX1 ? - If yes, you can do a little scripting. Other than that, there is no elegant solution for this, atleast as far as I can tell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:21 AM
10-21-2004 04:21 AM
Re: DISPLAY after telnet
netstat -na | grep '
It will give information there about remote server on 4 column.
We can get as,
IP=$(getip `who -mu | awk '{ print $NF }' | tr -d '()'`)
SERVER_IP=$(netstat -na | grep '$IP' | grep '23' | awk '{ print $4}')
23 -- telnet port number.
export DISPLAY=$IP:0.0
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:23 AM
10-21-2004 04:23 AM
Re: DISPLAY after telnet
I doubt you can do that, since the connection from pc -> unix1 -> unix2 does not have have any way of letting the unix2 box find out the ip address of pc. the connection to unix2 is going from unix1 and that is the only connection info that unix2 is going to get.
Muthukumar,
If the system is unable to resolve the FQDN, it will gibe the ip address over there in place of the FQDN. If the system is able to resolve the ip address to a FQDN, it should work, else it would be getting the ip address in the first place itself.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:44 AM
10-21-2004 04:44 AM
Re: DISPLAY after telnet
uname -a assign name of remote box (from your point of view) you need to assigne your hostname, so use the who -um
enter following into .profile
export DISPLAY=`who -um|awk '{print $8}' | tr -d '()' | awk '{print $1}'`:0.0
this will work
br Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:46 AM
10-21-2004 04:46 AM
Re: DISPLAY after telnet
FQND resolvation will be used when hostname is resolved there on who and IP-Address will be used given on who else. But we can not set hostname / FQDN on DISPLAY variable there.
It will make problem, other the ip-address there to set. To avoid this problem, I am using getip to make host --> ip-address. It will return ip-address for ip-address too, so no problem there.
DISPLAY will be using IP-Address bit maps there with window number with : there.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 07:01 AM
10-21-2004 07:01 AM
Solution*loginShell is a specific Xwindow resource that changes the way 3 specific programs work: hpterm, dtterm and xterm. These programs run on the HP-UX side and are only needed when a character mode interface is used. When DISPLAY is setup correctly, SAM (and swinstall, etc) will use the GUI and not xterm/dtterm/hpterm. The only time you need these terminal emulators is when you're using a system with a graphics display or using a PC and 'borrowing' a desktop display from another server.
Bill Hassell, sysadmin