Solved

How do I change the title of a cmd_tool window

Posted on 1998-11-12
12
251 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

840 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