Help answer threads with 0 replies.
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 04-27-2009, 05:12 AM   #1
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 42

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

I would like to get some help creating this or even find a better solution than this. =)
Old 04-27-2009, 10:41 PM   #2
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.
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.

Old 04-27-2009, 11:23 PM   #3
Registered: Feb 2006
Distribution: Debian Sid
Posts: 675

Rep: Reputation: 255Reputation: 255Reputation: 255
From the xterm man page:
-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
xterm -e /path/to/mutt [args]


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 08:02 AM
Bash script to change letters Fritz_Monroe Programming 7 04-05-2009 12:24 PM
how to change user in bash script c0d3 Programming 6 07-27-2005 11:34 AM
Change Text-File through bash script arkus Programming 2 12-17-2004 08:48 PM
file progress in xterm titlebar with bash brian0918 Linux - Newbie 3 06-11-2003 06:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 PM.

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