Solved

How do I change the title of a cmd_tool window

Posted on 1998-11-12
12
233 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
Comment Utility
 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
Comment Utility
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
Comment Utility
% ... > /dev/pts/3

or simply write is as follows

% ... > `tty -l`
0
 

Author Comment

by:clint_cote
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:clint_cote
Comment Utility
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
Comment Utility
Adjusted points to 150
0
 
LVL 51

Expert Comment

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

Author Comment

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

Accepted Solution

by:
ahoffmann earned 150 total points
Comment Utility
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
Comment Utility
Please award the points!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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 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.:

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now