?
Solved

Dynamic title on the xterm

Posted on 2004-09-24
4
Medium Priority
?
544 Views
Last Modified: 2013-11-17
Hi,

I would like to get the dynamic title on my xterm, depending on the directory I'm presently in.
Say if I'm in /home/indkish/specification, I need my xterm title(even when minimised) to show "Xterm indkish /home/indkish/specification" on it.

A prompt suggestion would be appreciated :)

Thanks.
0
Comment
Question by:indkish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12142558
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 2000 total points
ID: 12142616
indkish,

Also see
http://www.tldp.org/HOWTO/Xterm-Title-3.html
ESC]0;stringBEL -- Set icon name and window title to string
ESC]1;stringBEL -- Set icon name to string
ESC]2;stringBEL -- Set window title to string
http://www.tldp.org/HOWTO/Xterm-Title-6.html#ss6.1
http://www.tldp.org/HOWTO/Xterm-Title.html

http://www.tldp.org/HOWTO/Xterm-Title-4.html
This example produces a title of username@hostname: directory and a prompt of ksh$ .

case $TERM in
    xterm*)
        HOST=`hostname`
        PS1='^[]0;${USER}@${HOST}: ${PWD}^Gksh$ '
        ;;
    *)
        PS1='ksh$ '
        ;;
esac

Sunnycoder
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question