LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-27-2009, 06:12 AM   #1
iwtbf
Member
 
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 40

Rep: Reputation: 1
bash script to change xterm's titlebar?


Hi I am having q small annoying problem I would like to get some help solving.
I'm using pekwm as wm and I love it. I use the grouping function a lot and it looks like this

I use Xterm or Aterm on the commandline and here comes the problem, as you can see I have a lot of windows namned 'jonas@lillen: ~' (my username @ my computer) these are xterm and aterm windows, but in these I am running for example mutt or irssi. I would like to see what program I am running in the titlebar so to say. If and as long as I'm running mutt I want the titlebar to be 'mutt' not jonas@lillen: ~.

I have figured out that I must create a bash shellscript to accomplish this.
This script would be something like:

if running mutt in xterm or aterm:
change ps1='mutt'
when exiting mutt change back to normal
fi

I would like to get some help creating this or even find a better solution than this. =)
 
Old 04-27-2009, 11:41 PM   #2
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
i used to know how to do this. i believe that i had found the answer in this book.
http://oreilly.com/catalog/9780596004613/
i know that i could do monitoring from remote systems in the title bar, so i don't know why you couldn't do what you would like to.

cheers.
 
Old 04-28-2009, 12:23 AM   #3
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 517

Rep: Reputation: 177Reputation: 177
From the xterm man page:
Quote:
-e program [ arguments ... ]
This option specifies the program (and its command line arguments) to be run in the xterm window. It also sets the window title and icon name to be the basename of the program being executed if neither -T nor -n are given on the command line. This must be the last option on the command line.
I don't know anything about pekwm but the following works in KDE konsole
Code:
xterm -e /path/to/mutt [args]
 
  


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
I can't change xterm's colors (with Xresources) jsmith6 Slackware 17 04-06-2010 09:02 AM
Bash script to change letters Fritz_Monroe Programming 7 04-05-2009 01:24 PM
how to change user in bash script c0d3 Programming 6 07-27-2005 12:34 PM
Change Text-File through bash script arkus Programming 2 12-17-2004 09:48 PM
file progress in xterm titlebar with bash brian0918 Linux - Newbie 3 06-11-2003 07:04 PM


All times are GMT -5. The time now is 11:08 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