Operating System - HP-UX
1826177 Members
2279 Online
109691 Solutions
New Discussion

Re: showing server name in the top status bar

 
SOLVED
Go to solution
Shivkumar
Super Advisor

showing server name in the top status bar

Dear Sirs,

I am using below mentioned command to show server name and current working directory:

PS1=`whoami`'@'`/usr/bin/hostname`': $PWD $ '; export PS1

I need a command to display the server name in the top heading status bar of xterm terminal window. I am using xterm of the Reflection X for connecting hpux boxes.

Thanks in advance,
Shiv
4 REPLIES 4
Ermin Borovac
Honored Contributor

Re: showing server name in the top status bar

Here's an example.

$ HOSTNAME=$(/usr/bin/hostname)
$ PS1=']0;$LOGNAME@$HOSTNAME:$PWD[$LOGNAME@$HOSTNAME:$PWD]$ '

is entered as Ctrl-V and then Esc
as Ctrl-V and then Ctrl-G

Indira Aramandla
Honored Contributor

Re: showing server name in the top status bar

Hi Siv,

We do the same thing. Display the title (in your case you want the server name) on the top heading status bar of an xterm window.

We defin the windows using hpterm.

hpterm -sb -sl 250 -name "$title"

where $title is the heading we want to display and we prompt and accept the heading form the user. In you case you can replace the $title with your server name.


IA
Never give up, Keep Trying
Rajeev  Shukla
Honored Contributor
Solution

Re: showing server name in the top status bar

Hi Shiv,
The setting in PS1 will not help your xterm window, to have your desired name come on the title bar at xterm window use -T string allog with the xterm command in your reflection X configuration for the host.
Also have a look at the man pages of xterm to see what more options you can set. Below is the sample from man xterm
-T string
This option specifies the title for xterm's windows. It is
equivalent to -title.

Cheers
Rajeev
Yogeeraj_1
Honored Contributor

Re: showing server name in the top status bar

hi,

if you are using hpterm, try:
export header=.....
hpterm -name "$header"

hope this helps too!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)