Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2009, 09:50 AM   #1
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 42

Rep: Reputation: 1
Question xterm titlebar + bash issue

I have this line of code in my .bashrc:
alias mutt='xterm -title mutt -e mutt &'

It works well but how could make this happen only when I'm working in xterm and also open the program in the same xterm window and not open a new one as it does now.

I'm guess what I am after is a bashscript or something that also asks itself if I'm in xterm currently, if not (if I'm outside X or something like that) would _not_ execute the bash xterm titlebar code.
I'm not asking for a whole done finished script to do this. But could someone just give me a hint in the right direction?

I guess the script would look something like
case $TERM in
code code code

How do I do the "if running mutt, change xterm title to 'mutt', when exiting mutt change back to normal"?

Last edited by iwtbf; 05-26-2009 at 10:16 AM.
Old 05-27-2009, 04:08 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Something like this?



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
bash script to change xterm's titlebar? iwtbf Linux - Newbie 2 04-27-2009 11:23 PM
How can I get the xterm titlebar back in windowmaker? M$ISBS Linux - Software 1 03-22-2006 10:30 PM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM
file progress in xterm titlebar with bash brian0918 Linux - Newbie 3 06-11-2003 06:04 PM
xterm and titlebar King V Linux - Software 9 03-28-2003 10:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration