Solved

Dynamic title on the xterm

Posted on 2004-09-24
4
538 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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.
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.

856 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