Operating System - HP-UX
1829124 Members
2185 Online
109986 Solutions
New Discussion

how to change a title of a xterm running csh

 
SOLVED
Go to solution
Boyd Kodama
Frequent Advisor

how to change a title of a xterm running csh

In HP-UX 10.20, how can one change the title of one's xterm?
The xterm is running csh.

thanks
Without Mondays, there weren't be any Fridays
14 REPLIES 14
Brian M. Fisher
Honored Contributor

Re: how to change a title of a xterm running csh

When you start the xterm use the -title option.
i.e. xterm -title "HP ITRC"

Brian
<*(((>< er
Perception IS Reality
Boyd Kodama
Frequent Advisor

Re: how to change a title of a xterm running csh

Sorry,

The xterm whose title I want to change is already started.

For the example,
xterm -title "STARTING"

after some processes are done, I want the title to say "COMPLETED"
Without Mondays, there weren't be any Fridays
Victor BERRIDGE
Honored Contributor

Re: how to change a title of a xterm running csh

But if you wish to see the if you iconify instead of <xterm> then you woul have to use the -n option:<br />xterm -n "yourtitle" &<br /><br />Regards<br />Victor</xterm>
Brian M. Fisher
Honored Contributor

Re: how to change a title of a xterm running csh

I should have read your question more carefully. To CHANGE the title:
echo "033];new title007"

Brian
<*(((>< er
Perception IS Reality
Brian M. Fisher
Honored Contributor

Re: how to change a title of a xterm running csh

I forgot about the backslash problem in the ITRC:
echo "\033];New Title\007"

Brian
<*(((>< er
Perception IS Reality
Boyd Kodama
Frequent Advisor

Re: how to change a title of a xterm running csh

Didn't work.
That echo command just echo out what was in the quotes.
The title of the xterm is still the same.


btw, to have a backslash appear in a message, what must one do?
Without Mondays, there weren't be any Fridays
Brian M. Fisher
Honored Contributor

Re: how to change a title of a xterm running csh

The command I gave you only seems to work in a posix or k shell. Is it possible to change the shell to issue the command?
To get a backslash to appear use two backslashes together.

Brian
<*(((>< er
Perception IS Reality
Mike Stroyan
Honored Contributor

Re: how to change a title of a xterm running csh

There are many dtterm escape sequences documented by "man 5 dtterm". Several of those are common to xterm. The escape sequences to change the window title and icon name are common.
Mike Stroyan
Honored Contributor

Re: how to change a title of a xterm running csh

The csh problem is caused by the shell's builtin echo command. That can be worked around by using /bin/echo instead of echo.
Brian M. Fisher
Honored Contributor
Solution

Re: how to change a title of a xterm running csh

Mike is correct.
Use the following syntax:
/bin/echo "\033];New Title\007"

Brian
<*(((>< er




Perception IS Reality
Boyd Kodama
Frequent Advisor

Re: how to change a title of a xterm running csh

thank you.

I'm all set now.
Without Mondays, there weren't be any Fridays
Alan Riggs
Honored Contributor

Re: how to change a title of a xterm running csh

I like this trick. The escape sequences, unfortunately, do not transfer to hpterm. Does anyone know how to do the same trick with an hpterm?
Brian M. Fisher
Honored Contributor

Re: how to change a title of a xterm running csh

For the HPterm window. The following
example will change the title while in the ksh:
title=mytitle
echo "\033&f0k${#title}D${title}\c"

Brian
<*(((>< er
Perception IS Reality
Alan Riggs
Honored Contributor

Re: how to change a title of a xterm running csh

Thank you, Brian -- I can't assugn points here, so I am opening a new thread to reward you appropriately. (Which I probably should have done originally.)