LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-26-2009, 10:50 AM   #1
iwtbf
Member
 
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 40

Rep: Reputation: 1
Question xterm titlebar + bash issue


Hi!
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
xterm*)
code code code
esac

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 11:16 AM.
 
Old 05-27-2009, 05:08 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Something like this?
http://tldp.org/HOWTO/Bash-Prompt-HO...pulations.html



Cheers,
Tink
 
  


Reply


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


All times are GMT -5. The time now is 02:45 AM.

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