Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old July 11th, 2007   #1
rjseagraves
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 5
Ubuntu 7.04 Feisty Fawn
HOWTO change the escape (command) keystroke for GNU Screen

One of the great programs every command line user should know about is GNU Screen, the terminal window manager. One small issue that effects some users of Screen is that the default escape key (C-a) is also the "beginning of line" keystroke in Emacs. This tutorial will explain how to configure the escape key in Screen. Note that the escape key is one of the many configurable parts of Screen. For a more complete guide, see the Screen man page or http://gentoo-wiki.com/TIP_Using_screen from the Gentoo wiki, from which this tutorial was drawn.

Screen reads configuration from the ~/.screenrc file (the file .screenrc in the users home directory). To configure the escape key, add the following line to this file (after creating the file, if it does not already exist):

Code:
escape <escape key><meta key>
where <escape key> is the escape key and <meta key> is the meta key (the key for the screen command that sends the escape key to the current shell). To denote the Control key, use "^". For example, to set the escape key to C-` (Control-Backtick), and the meta key to ` (Backtick), add the line

Code:
escape ^``
to the .screenrc file. When Screen is then run, the escape key will be C-`.

Note: If one want to use the literal characters "^" or "\", you can escape them using "\". So to set the escape key to C-^ and the meta-key to \\, add

Code:
escape ^\^\\
to the .screenrc file.
rjseagraves is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:04 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry