GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Display
Operating System - HP-UX
1847167
Members
6261
Online
110263
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-29-2001 10:55 PM
03-29-2001 10:55 PM
Display
When I logon to server I have not set $DISPLAY and I must set it manually.On other unix platforms is $DISPLAY set automaticaly.What can I do for it?
Jirid
Jirid
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2001 10:57 PM
03-29-2001 10:57 PM
Re: Display
I logon to server over ssh2.
Jirid
Jirid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2001 11:12 PM
03-29-2001 11:12 PM
Re: Display
Put the following lines into your .profile:
DISPLAY=your_display:0.0
export DISPLAY
DISPLAY=your_display:0.0
export DISPLAY
Keep it simple
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2001 11:15 PM
03-29-2001 11:15 PM
Re: Display
Hi,
You do not need to specify the DISPLAY variable manually with the use of ssh 2.X.X and sshd 2.X.X.
When you login to the sshd2 server using your ssh2 client, the variable SSH2_CLIENT is automatically set. The values comprise of the quadruple "SSH2 client IP address", "SSH2 client TCP port used", "SSH2 server IP address", "SSH2 server TCP port used".
Thus, to set your DISPLAY variable automatically upon login in your startup script (eg. ~/.profile for sh, bash, ksh), add the following lines:
In ~/.profile (for sh, bash, ksh login shells),
export DISPLAY=`echo $SSH2_CLIENT|awk '{print $1}'`:0.0
In ~/.cshrc or ~/.login (for csh, tcsh shells),
setenv DISPLAY `echo $SSH2_CLIENT|awk '{print $1}'`:0.0
If you do not wish to use awk, you can use cut as well. Instead of awk '{print $1}', use "cut -d\ -f1" in its place.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
You do not need to specify the DISPLAY variable manually with the use of ssh 2.X.X and sshd 2.X.X.
When you login to the sshd2 server using your ssh2 client, the variable SSH2_CLIENT is automatically set. The values comprise of the quadruple "SSH2 client IP address", "SSH2 client TCP port used", "SSH2 server IP address", "SSH2 server TCP port used".
Thus, to set your DISPLAY variable automatically upon login in your startup script (eg. ~/.profile for sh, bash, ksh), add the following lines:
In ~/.profile (for sh, bash, ksh login shells),
export DISPLAY=`echo $SSH2_CLIENT|awk '{print $1}'`:0.0
In ~/.cshrc or ~/.login (for csh, tcsh shells),
setenv DISPLAY `echo $SSH2_CLIENT|awk '{print $1}'`:0.0
If you do not wish to use awk, you can use cut as well. Instead of awk '{print $1}', use "cut -d\ -f1" in its place.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP