Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-27-2004, 03:46 PM   #1
Registered: Apr 2003
Posts: 87

Rep: Reputation: 15
Exclamation custom xterm title when already defined in .bashrc

Here is my problem:

In .bashrc I already have the lines that change the xterm title depending on the directory you are in:

case $TERM in
PS1="\[\033]0;home \W\007\]home \W $ "
PS1="home \W $ "

Now, in a separate script in another directory, I want to be able to change the titlebar again. The script updates (sleeps) every 30 seconds, and has a couple variables defined within that I would like to have displayed in the titlebar. Compared to above, I would like it to say something like:

PS1="\[\033]0;home $max of $total running\007\]home \W $ " (not sure if syntax is correct)

where $max and $total are my variables defined in that script.

So, is there any way to set this up so that if the script isn't running, it uses the titlebar defined in .bashrc, but if the script is running, it uses a titlebar defined, as shown above, preferably within the script itself.


Last edited by brian0918; 05-27-2004 at 04:04 PM.
Old 06-01-2004, 11:17 AM   #2
Registered: Apr 2003
Posts: 87

Original Poster
Rep: Reputation: 15


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
xterm title after quittin ssh sessions bujecas Slackware 1 07-01-2005 08:27 PM
under with title and sub title the "GTK devel" found in fc3? AKAKAK Fedora 3 02-27-2005 05:51 AM
Set the Xterm title to reflect the current time ! Bonch Linux - Newbie 11 10-25-2004 04:50 PM
How to set title in xterm according to what program running ? tvn Linux - General 1 07-25-2004 07:58 PM
Any chance for a custom title ?) turnip LQ Suggestions & Feedback 4 07-18-2002 10:17 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration