Go to the first, previous, next, last section, table of contents.
Perhaps the most useful feature of screen is the way it allows
the user to move a session between terminals, by detaching and
reattaching. This also makes life easier for modem users who have to
deal with unexpected loss of carrier.
- Command: autodetach state
-
(none)
Sets whether screen will automatically detach upon hangup, which
saves all your running programs until they are resumed with a
screen -r command. When turned off, a hangup signal will
terminate screen and all the processes it contains. Autodetach is
on by default.
- Command: detach
-
(C-a d, C-a C-d)
Detach the screen session (disconnect it from the terminal and
put it into the background). A detached screen can be resumed by
invoking screen with the -r option (see section Invoking Screen).
The -h option tells screen to immediately close the connection
to the terminal (`hangup').
- Command: password [crypted_pw]
-
(none)
Present a crypted password in your `.screenrc' file and screen will
ask for it, whenever someone attempts to resume a detached session. This
is useful, if you have privileged programs running under screen
and you want to protect your session from reattach attempts by users
that managed to assume your uid. (I.e. any superuser.) If no crypted
password is specified, screen prompts twice a password and places its
encryption in the paste buffer. Default is `none', which disables
password checking.
- Command: pow_detach
-
(C-a D D)
Mainly the same as detach, but also sends a HANGUP signal
to the parent process of screen.
Caution: This will result in a
logout if screen was started from your login shell.
- Command: pow_detach_msg [message]
-
(none)
The message specified here is output whenever a power detach is
performed. It may be used as a replacement for a logout message or to reset
baud rate, etc.
Without parameter, the current message is shown.
- Command: lockscreen
-
(C-a x, C-a C-x)
Call a screenlock program (`/local/bin/lck' or `/usr/bin/lock'
or a builtin, if no other is available). Screen does not accept any
command keys until this program terminates. Meanwhile processes in the
windows may continue, as the windows are in the detached state.
The screenlock program may be changed through the environment variable
$LOCKPRG (which must be set in the shell from which screen
is started) and is executed with the user's uid and gid.
Warning: When you leave other shells unlocked and have no password set
on screen, the lock is void: One could easily re-attach from an
unlocked shell. This feature should rather be called
lockterminal.
These commands allow other users to gain access to one single screen
session. When attaching to a multiuser screen the sessionname is
specified as username/sessionname to the -S command line option.
Screen must be compiled with multiuser support to enable features
described here.
- Multiuser: Enable / Disable multiuser mode.
- Acladd: Enable a specific user.
- Aclchg: Change a users permissions.
- Acldel: Disable a specific user.
- Aclgrp: Grant a user permissions to other users.
- Displays: List all active users at their displays.
- Umask: Predefine access to new windows.
- Wall: Write a message to all users.
- Writelock: Grant exclusive window access.
- Su: Substitute user.
- Command: multiuser state
-
(none)
Switch between single-user and multi-user mode. Standard screen operation is
single-user. In multi-user mode the commands acladd, aclchg and
acldel can be used to enable (and disable) other users accessing this
screen.
- Command: acladd usernames
-
- Command: addacl usernames
-
(none)
Enable users to fully access this screen session. Usernames can be one
user or a comma separated list of users. This command enables to attach to
the screen session and performs the equivalent of
aclchg usernames +rwx "#?". To add a user with restricted access,
use the aclchg command below.
Addacl is a synonym to acladd.
Multi-user mode only.
- Command: aclchg usernames permbits list
-
- Command: chacl usernames permbits list
-
(none)
Change permissions for a comma separated list of users.
Permission bits are represented as `r', `w' and `x'.
Prefixing `+' grants the permission, `-' removes it. The third
parameter is a comma separated list of commands or windows (specified either
by number or title). The special list `#' refers to all windows, `?'
to all commands. If usernames consists of a single `*', all
known users are affected.
A command can be executed when the user has the `x' bit for it. The user
can type input to a window when he has its `w' bit set and no other
user obtains a writelock for this window. Other bits are currently ignored.
To withdraw the writelock from another user in e.g. window 2:
`aclchg username -w+w 2'. To allow read-only access
to the session: `aclchg username -w "#"'. As soon as a user's name
is known to screen, he can attach to the session and (per default) has full
permissions for all command and windows. Execution permission for the acl
commands, at and others should also be removed or the user may be able
to regain write permission.
Chacl is a synonym to aclchg.
Multi-user mode only.
- Command: acldel username
-
(none)
Remove a user from screen's access control list. If currently attached, all the
user's displays are detached from the session. He cannot attach again.
Multi-user mode only.
- Command: aclgrp username [groupname]
-
(none)
Creates groups of users that share common access rights. The
name of the group is the username of the group leader. Each
member of the group inherits the permissions that are
granted to the group leader. That means, if a user fails an
access check, another check is made for the group leader.
A user is removed from all groups the special value `none'
is used for groupname. If the second parameter is omitted
all groups the user is in are listed.
- Command: displays
-
(C-a *)
Shows a tabular listing of all currently connected user
front-ends (displays). This is most useful for multiuser
sessions.
- Command: aclumask [users]+/-bits ...
-
- Command: umask [users]+/-bits ...
-
(none)
This specifies the access other users have to windows that
will be created by the caller of the command. Users may be no,
one or a comma separated list of known usernames. If no users are
specified, a list of all currently known users is assumed.
Bits is any combination of access control bits allowed
defined with the aclchg command. The special username `?'
predefines the access that not yet known users will be
granted to any window initially. The special username `??'
predefines the access that not yet known users are granted
to any command. Rights of the special username nobody cannot
be changed (see the su command).
Umask is a synonym to aclumask.
- Command: wall message
-
(none)
Write a message to all displays. The message will appear in the terminal's
status line.
- Command: writelock on|off|auto
-
(none)
In addition to access control lists, not all users may be able to write to
the same window at once. Per default, writelock is in `auto' mode and
grants exclusive input permission to the user who is the first to switch
to the particular window. When he leaves the window, other users may obtain
the writelock (automatically). The writelock of the current window is disabled
by the command writelock off. If the user issues the command
writelock on he keeps the exclusive write permission while switching
to other windows.
- Command: defwritelock on|off|auto
-
(none)
Sets the default writelock behavior for new windows. Initially all windows
will be created with no writelocks.
- Command: su [username [password [password2]]]
-
(none)
Substitute the user of a display. The command prompts for
all parameters that are omitted. If passwords are specified
as parameters, they have to be specified un-crypted. The
first password is matched against the systems passwd database,
the second password is matched against the screen
password as set with the commands acladd or password.
Su may be useful for the screen administrator to test
multiuser setups.
When the identification fails, the user has
access to the commands available for user `nobody'. These are
detach, license, version, help and
displays.
- Command: sessionname [name]
-
(none)
Rename the current session. Note that for screen -list the name
shows up with the process-id prepended. If the argument name is
omitted, the name of this session is displayed.
Caution: The $STY
environment variable still reflects the old name. This may result in
confusion. The default is constructed from the tty and host names.
- Command: suspend
-
(C-a z, C-a C-z)
Suspend screen. The windows are in the detached state while
screen is suspended. This feature relies on the parent shell
being able to do job control.
- Command: quit
-
(C-a C-\)
Kill all windows and terminate screen. Note that on VT100-style
terminals the keys C-4 and C-\ are identical. So be careful
not to type C-a C-4 when selecting window no. 4. Use the empty
bind command (as in bind "^\") to remove a key binding
(see section Key Binding).
Go to the first, previous, next, last section, table of contents.