- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- exporting DISPLAY
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
01-17-2003 05:05 AM
01-17-2003 05:05 AM
exporting DISPLAY
I'm tryin to write a script that runs an x script on a remote terminal. It gets the ip address of the user from the who command, sets the DISPLAY variable to point back to the user's pc and runs the x command. This works fine until someone dials in to the system console.
Does anyone know how to pick up the ip address of someone logged into the console, or of another way round this?
Thanks in advance,
Gary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 05:30 AM
01-17-2003 05:30 AM
Re: exporting DISPLAY
who -mT
or the last command:
last -R | grep username | grep in$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 05:39 AM
01-17-2003 05:39 AM
Re: exporting DISPLAY
export DISPLAY="$(/usr/bin/who -muR | awk '{print $NF}'):0.0"
It will automatically set the name or IP address of the incoming machine. NOTE: you mentioned: 'dial in to the system console' Normally, this is a serial port. If you have the serial port connected to a terminal server, the performance will be very, very slow for Xwindows. It is much better to use a local terminal emulator rather than incur the large data transactions used by Xwindows.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 05:40 AM
01-17-2003 05:40 AM
Re: exporting DISPLAY
This what I use in my .profile
# -- Do trick to set the display in case of remote login
HOST=`who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"`
if [ "$HOST" != "" ] && [ "$HOST" != ":0" ] && [ "$HOST" != ":0.0" ];
then
if [ "$HOST" = `who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"` ]
then
HOST=$HOST:0.0
fi
echo " +--<<"
echo " | Remote login detected, setting DISPLAY to $HOST"
echo " +-->>"
DISPLAY=$HOST
export DISPLAY
fi
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 05:55 AM
01-17-2003 05:55 AM
Re: exporting DISPLAY
perhaps you can find further informations on this issue by following url:
http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90136/B2355-90136_top.html&con=/hpux/onlinedocs/B2355-90136/00/00/7-con.html&toc=/hpux/onlinedocs/B2355-90136/00/00/7-toc.html&searchterms=Managing%7cBSD&queryid=20030117-065101
have also a look at:
http://www.docs.hp.com
and search for BSD, I think that is the way to monitor remote running X sessions.
Regards ...
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 06:30 AM
01-17-2003 06:30 AM
Re: exporting DISPLAY
Thanks again,
Gary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 07:33 AM
01-17-2003 07:33 AM
Re: exporting DISPLAY
what do you mean with 'dial in to the system console'? Does he use a modem? If so it isn't possible because then the remote site does not have an ip address ...
Or have I misunderstood your question?
Regards,
Jochen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 08:24 AM
01-17-2003 08:24 AM
Re: exporting DISPLAY
yes, they are using a modem. Can you think of any way around this?
Gary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 03:12 PM
01-17-2003 03:12 PM
Re: exporting DISPLAY
the only way I can think of is to use ppp or slip instead of a direct connection to getty.
But I have never configured ppp on HP-UX. I am not sure if it's even available (did not find anything on the porting site) ...
Regards,
Jochen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 03:19 PM
01-17-2003 03:19 PM
Re: exporting DISPLAY
it looks as if HP-UX includes a pppd (server daeemon) from 10.30 onward. Have a look at these documents:
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000066028178
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062952526 (pppd)
Good luck!
Jochen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 03:22 PM
01-17-2003 03:22 PM
Re: exporting DISPLAY
Sometimes you don't have to look that far away. Search www.docs.hp.com for 'pppd' and voila:
http://www.docs.hp.com/hpux/onlinedocs/B2355-90137/B2355-90137.html (Installing and Administering PPP)
Regards,
Jochen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 03:30 PM
01-17-2003 03:30 PM
Re: exporting DISPLAY
If I understand your question correctly, I don't think you're going to be able to do X through the console port. You *won't* have an IP from the console - you're just /dev/console & because it's a terminal, the termcap for the term type announced probably won't support graphics - let alone X.
If you need to use dialup (PAINFULLY slow thru a modem) - you'll have to use the modem port (if avail) or a mux port & use PPP or SLIP.
I would never advise anyone to use the console port for ANYTHING other than console access - big security hole.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 05:54 PM
01-17-2003 05:54 PM
Re: exporting DISPLAY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2003 06:57 PM
01-17-2003 06:57 PM
Re: exporting DISPLAY
you can then export the display to that IP.
Rajeev