Dynamic title on the xterm

Posted on 2004-09-24
Last Modified: 2013-11-17

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 :)

Question by:indkish
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
LVL 45

Expert Comment

ID: 12142558
LVL 45

Accepted Solution

sunnycoder earned 500 total points
ID: 12142616

Also see
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
This example produces a title of username@hostname: directory and a prompt of ksh$ .

case $TERM in
        PS1='^[]0;${USER}@${HOST}: ${PWD}^Gksh$ '
        PS1='ksh$ '


Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Title # Comments Views Activity
LastLogonTimeStamp Attribute 7 49
aix tls version 6 558
Write an app 10 74
Retreiving column names in Windows but not in Unix 11 76
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…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.

730 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