Results 1 to 2 of 2
Hi all,
I use the following command in a script to set the title of PuTTY
Code:
export PROMPT_COMMAND='echo -ne "3]0;mytitle"; echo -ne "
Thread: setting PuTTY title in shell script
7"' when i execute the script like ...- 07-30-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 9
setting PuTTY title in shell script
Hi all,
I use the following command in a script to set the title of PuTTY
when i execute the script like this,Code:export PROMPT_COMMAND='echo -ne "\033]0;mytitle"; echo -ne "\007"'
mytitle is set as the title of PuTTY.Code:. ./set_title.sh
Now I'm writing a script to start one process say CRM.
In this case the title gets sets only when i stop the process using Ctrl+CCode:export PROMPT_COMMAND='echo -ne "\033]0;crm"; echo -ne "\007" ./crm 13 1
Is there anyway I can set the title and then start the process because my aim is to dedicate one PuTTY window for one process till i stop the process.
- 08-05-2011 #2Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
The problem is "PROMPT_COMMAND" contents is run as a script just before bash writes the prompt. What you want is to put a title for the xterm.
just simply execute the command:
Of course you can use PROMPT_COMMAND to put a default title in place via your ~/.bash_profile file:Code:echo -ne "\033]0;crm\007" ./crm 13 1
and then run the command via:Code:export PROMPT_COMMAND ='echo -ne "\033]0;My DEFAULT TITLE\007'
Which would change the title to CRM while "crm" is running and set it back to "My DEFAULT TITLE" when crm is completed.Code:echo -ne "\033]0;CRM\007" && ./crm 13 1
(This is assuming that crm does background its self as gvim does.)


Reply With Quote
