1833431 Members
3379 Online
110052 Solutions
New Discussion

Configuration dtterm

 
grennepois johann
Occasional Contributor

Configuration dtterm

Hi,


I would like to change the title of the active dtterm (not to open a new one like dtterm -title "toto").

Thanks for your help.

Johann
2 REPLIES 2
Craig Rants
Honored Contributor

Re: Configuration dtterm

I have a little script I call title

#!/bin/sh
/bin/echo '\033]2;'$*'\007\c'

run it as

title "dttermname"

and ta da !

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Alex Glennie
Honored Contributor

Re: Configuration dtterm

Very similar eg ....

To dynamically change the title of each terminal window to reflect the hostname of the current machine, add the following lines (exactly as they are appear here) to the end of the user's .profile file in the user's $HOME directory:

if [ "$TERM" = "hpterm" ] ; then
HOSTNAME=$(hostname)
LENGTH=${#HOSTNAME}
echo "\033&f0k${LENGTH}D${HOSTNAME}"

echo "\033&f-1k${LENGTH}D${HOSTNAME}"

elif [ "$TERM" = "dtterm" ] || [ "$TERM" = "xterm" ] ; then
echo "\033[2;$(hostname)\007"
fi