Solved

How do I change the title of a cmd_tool window

Posted on 1998-11-12
12
245 Views
Last Modified: 2013-12-27
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
Comment
Question by:clint_cote
  • 6
  • 5
12 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007783
 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
 

Author Comment

by:clint_cote
ID: 2007784
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007785
% ... > /dev/pts/3

or simply write is as follows

% ... > `tty -l`
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:clint_cote
ID: 2007786
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
 

Author Comment

by:clint_cote
ID: 2007787
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007788
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
 

Author Comment

by:clint_cote
ID: 2007789
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
 

Author Comment

by:clint_cote
ID: 2007790
Adjusted points to 150
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007791
did you miss the closing bracket  ]  after the first 2 ESC ?
0
 

Author Comment

by:clint_cote
ID: 2007792
It works!  I missed the closing bracket.  Thanks!
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 150 total points
ID: 2007793
so I repost my first answer

   echo -n 'ESC]lstringESC]LstringESC\' > `tty`
or
   echo -n 'ESC]lstringESC]LstringESC\' > /dev/console
0
 
LVL 4

Expert Comment

by:jlms
ID: 2007794
Please award the points!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question