Next Previous Contents

# How to change the title of an xterm

## Ric Lister, `ric@giccs.georgetown.edu`

v2.0, 27 October 1999

This document explains how to use escape sequences to dynamically change window and icon titles of an xterm. Examples are given for several shells, and the appendix gives escape sequences for some other terminal types.

## 1. Where to find this document

## 2. Static titles

## 3. Dynamic titles

- 3.1 xterm escape sequences
- 3.2 Printing the escape sequences

## 4. Examples for different shells

- 4.1 zsh
- 4.2 tcsh
- 4.3 bash
- 4.4 ksh
- 4.5 csh

## 5. Printing the current job name

- 5.1 zsh
- 5.2 Other shells

## 6. Appendix: escapes for other terminal types

- 6.1 IBM `aixterm`
- 6.2 SGI `wsh`, `xwsh` and `winterm`
- 6.3 Sun `cmdtool` and `shelltool`
- 6.4 CDE `dtterm`
- 6.5 HPterm

## 7. Appendix: examples in other languages

- 7.1 C
- 7.2 Perl

## 8. Credits

Next Previous Contents