Solved

Dynamic title on the xterm

Posted on 2004-09-24
4
530 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
  • 2
4 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 12142558
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now