LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 09:50 AM   #1
iwtbf
Member
 
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 42

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

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



Cheers,
Tink
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:54 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
Open Source Consulting | Domain Registration