| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-09-2012, 01:50 AM
|
#1
|
|
LQ Newbie
Registered: May 2012
Posts: 4
Rep: 
|
Can't change the title of a xterm
Hello!
I need to launch a xterm with a specific title. I used:
xterm -T "MyTitle" -n "MyIconTitle"
but the title changes for a split second (when xterm is launched), and it reverts back to my login name.
I have Ubuntu 11.10.
|
|
|
|
05-09-2012, 02:34 AM
|
#2
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
It is probably being set by your PS1. What is the output from echo "$PS1" ?
|
|
|
|
05-09-2012, 02:51 AM
|
#3
|
|
LQ Newbie
Registered: May 2012
Posts: 4
Original Poster
Rep: 
|
The output from echo "$PS1" is:
\[\e]0;\u@\h: \w\a]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
|
|
|
|
05-09-2012, 05:19 AM
|
#4
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
The first part of that sets the xterm title. More information here.
|
|
|
|
05-09-2012, 07:39 AM
|
#5
|
|
LQ Newbie
Registered: May 2012
Posts: 4
Original Poster
Rep: 
|
I read the page of the link you gave me but I didn't understand how to solve my problem. Is there a function like his prom1 in my .bashrc that I need to remove? Or is what I want to do just impossible?
EDITED
I found some lines in my .bashrc that defines PS1 (" case $XTERM ") and i jsut commented those lines. Now I can set the title with: xterm -T "MyTitle"
Thanks everybody!
Last edited by WraithBand; 05-09-2012 at 08:14 AM.
|
|
|
|
05-09-2012, 12:14 PM
|
#6
|
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,568
|
As catkin said, bash allows you to optionally set the xterm title directly from the PS1 prompt string.
The part at the front between "\e]0;" and "\a" is the title setting section, and "\[" and "\]" have also been placed around it because it contains non-printing characters. Everything after that is the setting for the prompt itself.
So just remove that front part from your PS1 prompt setting and new shells shouldn't have their titles affected.
|
|
|
|
05-10-2012, 02:08 AM
|
#7
|
|
LQ Newbie
Registered: May 2012
Posts: 4
Original Poster
Rep: 
|
Ok thank you. I will make some adjustments following your advice.
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:07 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|