The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change title of aixterm window online Soham UNIX for Advanced & Expert Users 1 02-01-2008 01:52 PM
Change putty title window? akbar UNIX for Advanced & Expert Users 12 01-28-2008 01:38 PM
Change Terminal Title here2learn SUN Solaris 8 11-21-2005 10:39 AM
window title..? tintedwindow UNIX for Dummies Questions & Answers 1 08-24-2005 02:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-09-2004
medmonson medmonson is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 6
Change Console Title

Hello.

I am trying to figure out how to change the title of my console window. I don't need it to dynamically change with my current directory. I just want to be able to change the name of it, so when I minimize the window I can see which windows are for what purpose.

I've tried using the following, but it returns back saying that TITLE is an undefined variable.

echo "^[]l${TITLE}^[\\"

Any and all help is greatly appreciated.

Thanks.
  #2 (permalink)  
Old 06-09-2004
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,402
I have a one-line script which I use called "title"...

$ cat title
#----script to set window title
print "\033]0;$*"

...use it like this...

$ title New Window Title

...however, it may not work for all terminal types or emulators.
  #3 (permalink)  
Old 06-09-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Hi,

I use a slightly different command
Code:
echo "^[]0;$*^G"
Does the same thing as Ygor's script, and seems to work on all vt100 compatibles.

Cheers
ZB
  #4 (permalink)  
Old 06-09-2004
medmonson medmonson is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 6
Thanks for your help Ygor and Zazzybob.

However, I have been unable to get either method to work.

Ygor,

I created the title script using the VI editor. I modified the script to have rwx for all. When I ran the script just like you suggested...

# title New Window Title

it returned,

title: print: not found

Do you have any idea what I could be doing wrong? I am running on an emulator using the Exceed software. Would this have anything to do with my problem?

The OS is Solaris 6.


Zazzybob,

I also tried running your command from the command line. All it seems to do is echo back

^[]0;^G


The title bar still says console.
  #5 (permalink)  
Old 06-09-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Hi, maybe I should have elaborated.

Create a script called, say, set_title.sh

In vi, insert this code....
Code:
#!/bin/sh

echo "^[]0;$*^G"
The ^[ is produced using the keystroke CTRL-V then ESC

The ^G is produced using the keystroke CTRL-G (on some terminals CTRL-V then CTRL-G)

Then, invoke the code at the prompt with

./set_title.sh My new window title

Cheers
ZB

Last edited by zazzybob; 06-09-2004 at 07:53 AM..
  #6 (permalink)  
Old 06-09-2004
medmonson medmonson is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 6
Thanks Zazzybob!!!

Sorry that you had to spell it out for me. I really appreciate your help though.

Cheers,

medmonson
  #7 (permalink)  
Old 06-09-2004
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,402
Some shells have "print" built-in, but its just the same as "echo".

Incidentally, "CTRL-V then ESC" is the same as "\033". See man ascii.
Sponsored Links
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0