• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

How do I change the title of a cmd_tool window

How do I change the title of a cmd_tool window without opening a new window?  I'm using Solaris CDE and I use the cmd_tool from open windows (because I like it better than the terminal window).  I tried the following and can't get it to work:

echo -n 'ESC]x;stringBEL' > /dev/ttyN

    where:
       ESC is ASCII ESC 0x1b
       BEL is ASCII BEl 0x07
       x is 0 for changing icon name and window title
            1 for icon name only
            2 for window tile only
      N is number of your tty

How do I get N the # of my tty
0
clint_cote
Asked:
clint_cote
  • 6
  • 5
1 Solution
 
ahoffmannCommented:
 echo -n 'ESC]lstringESC]LstringESC\' > /dev/ttyN

  where l and L stands for Window- and Icon-label

Note that you must use console instead of ttyN for console cmd
0
 
clint_coteAuthor Commented:
I'm not sure that I understand where this is being redirected to.
echo -n 'ESC]lstringESC]LstringESC\' > /dev/ttyN
How do I determine N?  Below is the transcript of what I tried.

%: tty -l
/dev/pts/3
%: echo -n 'lstringLstring\' > /dev/tty3ty3
/dev/tty3: Permission denied
%: echo -n '^]lstring^]Lstring^]\' > /dev/ttytty
stringstring%:
0
 
ahoffmannCommented:
% ... > /dev/pts/3

or simply write is as follows

% ... > `tty -l`
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
clint_coteAuthor Commented:
This does not work with a cmd_tool window. It does work with a shell_tool window, but the editing capabilities stink in a shell_tool.
0
 
clint_coteAuthor Commented:
This does not work with a cmd_tool window. It does work with a shell_tool window, but the editing capabilities stink in a shell_tool.
0
 
ahoffmannCommented:
oops, it's too long since using these tools:

& ... > /dev/console

must be needed for a console window (didn' realize that cmd_tool is a console window, sorry)

If this doesn't work too, please post result of:

% tty
% tty -l
0
 
clint_coteAuthor Commented:
All I get is stringstring echoed to the prompt.
%echo -n '^[lstring^[Lstring^[\' > /dev/console
just prints it to my console window.


%tty
/dev/pts/4
%tty -l
/dev/pts/4
not on an active synchronous line
0
 
clint_coteAuthor Commented:
Adjusted points to 150
0
 
ahoffmannCommented:
did you miss the closing bracket  ]  after the first 2 ESC ?
0
 
clint_coteAuthor Commented:
It works!  I missed the closing bracket.  Thanks!
0
 
ahoffmannCommented:
so I repost my first answer

   echo -n 'ESC]lstringESC]LstringESC\' > `tty`
or
   echo -n 'ESC]lstringESC]LstringESC\' > /dev/console
0
 
jlmsCommented:
Please award the points!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now