Make the xterm title work with PROMPT_COMMAND

Change “xterm*)” to “xterm*|screen*)” in /etc/bashrc for the PROMPT_COMMAND check

Add the command name to the title

  1. Modify the PS1 prompt to '\[<esc>k<esc>\\]\W >'. <esc> is created with Ctrl+V, ESC and after the 2nd <esc> a '\' must follow. '\W' is the variable name for the current directory. (e.g. PS1=“\[^[k^[\\\\\]\W > ” in /etc/bashrc)
  2. Add the line: shelltitle '> |bash' to .screenrc
  3. Add the line: hardstatus string ”[%n %t] %h” to .screenrc


Grant permissions

To allow another user to view your screen:

$ :multiuser on
$ :acladd USERNAME
$ :aclchg USERNAME [+-r][+-w][+-x] "#?"
$ :acldel USERNAME

If you want to grant read-only permissions do:

$ :multiuser on
$ :acladd USERNAME
$ :aclchg USERNAME -wx] "#?"

View other users screen

To view another users screen, /usr/bin/screen must have suid root permissions.

sudo chmod +s /usr/bin/screen
sudo chmod 755 /var/run/screen

If that is done, you can open the session by


Send something to another terminal

$ screen -p <TERMINALNAME> -X stuff "blah^M";
harry/screen.txt · Last modified: 2009/02/05 13:34 (external edit)
Locations of visitors to this page

Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki