- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- displaying hostname on xterm window titlebar
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
Discussions
Discussions
Forums
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
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
тАО06-05-2005 07:57 PM
тАО06-05-2005 07:57 PM
I am working on various hpux 11i boxes by connecting through Reflection 12 remote connection software. Sometime it is very confusing to identify on which box i am working.
Can anyone suggest "xterm" command to display the titlebar of the hostname of the unix servers ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 08:07 PM
тАО06-05-2005 08:07 PM
Solutionnohup xterm -title $1 -n $1 -sb -e /opt/ssh/bin/ssh $1 -l root 2>&1 1>/dev/null&
Where $1 is the name of the system
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 08:09 PM
тАО06-05-2005 08:09 PM
Re: displaying hostname on xterm window titlebar
This will show you the hostname of the box at the time the xterm is created. It won't change when you, say, rlogin to another box though. The usual technique is to modify PS1 prompt to include the hostname.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 09:45 PM
тАО06-05-2005 09:45 PM
Re: displaying hostname on xterm window titlebar
try this
xterm -title `hostname` ....
but I what appreciate stephen says
thanx
eknath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 09:54 PM
тАО06-05-2005 09:54 PM
Re: displaying hostname on xterm window titlebar
I use reflection version 6, if I insert the hostname in the "description" field of the "Connection Type" Windows I can see the hostname in the window titlebar.
I don't know if this changed in the version 12.
Enrico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2005 10:45 PM
тАО06-05-2005 10:45 PM
Re: displaying hostname on xterm window titlebar
---------- HP Term -----------
"Hpterm" _o f.exec "hpterm -ls -sb -sl 2048 -fg white -bg black -cr red -n
---------- DT Term -----------
"DtTerm" _o f.exec "dtterm -ls -sb -sl 2048 -fg black -cr red -n
---------- XTerm -----------
"Xterm" _o f.exec "xterm -ls -sb -sl 2048 -fg white -cr red -n
Note add the above line in file:
~/.dt/dtwmrc
To get the list in the mouse right click you can add:
Menu DtRootMenu
{
" Shivkumar " _o f.title
" SHIV " _o f.title
"Hpterm" _o f.exec "hpterm -ls -sb -sl 2048 -fg white -bg black -cr red -n
"DtTerm" _o f.exec "dtterm -ls -sb -sl 2048 -fg black -cr red -n
"Xterm" _o f.exec "xterm -ls -sb -sl 2048 -fg white -cr red -n
}
Regards
Ganesha Sridhara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2005 01:28 AM
тАО06-06-2005 01:28 AM
Re: displaying hostname on xterm window titlebar
Other options you can include such as colors and all but these will get the name of the window and the title on the window. Will work for dtterm as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2005 01:41 AM
тАО06-06-2005 01:41 AM
Re: displaying hostname on xterm window titlebar
I've set it to
alias cwdcmd 'glob "\E]0;'${LOGNAME}'@'${HOST}':$cwd ['$$':'$tty']\7"'
where \E is an escape, and \7 the Ctrl-G
This is the escape sequence for an xterm to change the title bar. With this knowledge, you can change it whenever you like, and not - as suggested by all above - just at startup
# perl -le'print "\e]0;$ENV{HOST}\7"'
is one way to set your titlebar to what currently is in $HOST
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2005 04:45 AM
тАО06-06-2005 04:45 AM
Re: displaying hostname on xterm window titlebar
I have a function in my ~/.kshrc file on all systems that I manage that updates the xterm title with who I'm logged in as, what system I'm on and my current directory. It's a pretty cool little utility. For instance, my current window shows
dkoleary@linux:/home/dkoleary/working/clients
as the xterm title.
mcd()
{ Me=$(whoami)
Host=$(hostname)
cd $*
Pwd=$(pwd)
echo "^[]0;${Me}@${Host}:${Pwd}^G\c"
}
The definition is as follows:
The echo command is a little tricky. For the ^[ key sequence, hit
Once you have that, alias cd to mcd and you're done...
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html