VanDyke Software



Displaying Text In The SecureCRT® Title Bar

It can be useful to have the SecureCRT title bar update dynamically, especially when using multiple concurrent SecureCRT sessions. There is an option in your Session Options that allows you to statically set the title bar for a particular SecureCRT window. However, this is not always sufficient.

If you need to place information in the SecureCRT title bar dynamically, SecureCRT supports the standard xterm escape sequences for changing the window title bar.

These escape sequences can be sent from the remote system by a variety of means, and allow you to change how the SecureCRT title bar is displayed arbitrarily.

If the remote system sends the following, SecureCRT places "sometext" in the title bar of the SecureCRT window.

ESC ] ; sometext CTRL+G

The following Perl script demonstrates this functionality.

#! /usr/bin/perl
# - sends xterm escape sequence to
# change window title to @ARGV

$esc = "\x1b";
$bel = "\x7";

$txt = join(" ", @ARGV);

print $esc, "];", $txt, $bel;

When run from your shell on the remote, it will take any arguments as text to display in the title bar.

For example, if run on a Un*x system:

% $user@$host\:`pwd`

would place something similar to the following in the SecureCRT title bar.


The text would depend, of course, on the values of $user, $host, and the current working directory.

There are many possible applications. One common use is to hard-code the escape sequence into your shell prompt, or use a similar mechanism, so that each time you use the cd command on a Un*x host, for example, the title bar is changed to reflect the current working directory, or whatever you want displayed in the title bar.

For additional information on xterm escape sequences, refer to the following web links. provides specific instructions on this technique:

Here is an exhaustive list of escape sequences:

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.