abduco(1)

ABDUCO(1) General Commands Manual ABDUCO(1)

NAME

abducoterminal session manager

SYNOPSIS

abduco -a [options ...] name

abduco -A [options ...] name command [args ...]

abduco -c [options ...] name command [args ...]

abduco -d name

abduco -n [options ...] name command [args ...]

DESCRIPTION

abduco disassociates a given application from its controlling terminal, thereby providing roughly the same session attach/detach support as screen(1), tmux(1), or dtach(1).

A session comprises of an abduco server process which spawns a user command in its own pseudo terminal (see pty(7)). Each session is given a name represented by a unix domain socket (see unix(7)) stored in the local file system. abduco clients can connect to it and their standard input output streams are relayed to the command supervised by the server.

abduco operates on the raw I/O byte stream without interpreting any terminal escape sequences. As a consequence the terminal state is not preserved across sessions. If this functionality is desired, it should be provided by another utility such as dvtm(1).

ACTIONS

If no command line arguments are given, all currently active sessions are listed sorted by their respective creation date. Lines starting with an asterisk (*) indicate that at least one client is currently connected. A plus sign (+) signals that the command terminated while no client was connected. Attaching to the session will print its exit status. The next column shows the PID of the server process, followed by the session name.

abduco provides different actions of which one must be provided.

-a
Attach to an existing session.
-A
Try to connect to an existing session, upon failure create said session and attach immediately to it.
-c
Create a new session and attach immediately to it.
-d
Detect if the specified session exists, returning a successful exit status if true.
-n
Create a new session but do not attach to it.

OPTIONS

Additionally the following options can be provided to further tweak the behavior.

-e detachkey
Set the key to detach. Defaults to ⟨Ctrl+\⟩ which is specified as ^\ i.e. Ctrl is represented as a caret (^).
-f
Force creation of session when there is an already terminated session of the same name, after showing its exit status.
-l
Attach with the lowest priority, meaning this client will be the last to control the size.
-p
Pass through content of standard input to the session. Implies the -q and -l options.
-q
Be quiet, do not print informative messages.
-r
Read-only session, user input is ignored.
-v
Print version information and exit.

SIGNALS

SIGWINCH
Whenever the primary client resizes its terminal the server process will deliver a SIGWINCH signal to the supervised process.
SIGUSR1
If for some reason the unix domain socket representing a session is deleted, sending SIGUSR1 to the server process will recreate it.
SIGTERM
Detaches a client.

ENVIRONMENT

ABDUCO_CMD
If command is not specified, the environment variable $ABDUCO_CMD is examined, if it is not set dvtm(1) is executed.
ABDUCO_SESSION
The current session name available to the supervised command.
ABDUCO_SOCKET
The absolute path of the session socket available to the supervised command.

See the FILES section for environment variables used in determining the location of unix domain sockets representing sessions.

FILES

All session related information is stored in the following directories (first to succeed is used):

  • $ABDUCO_SOCKET_DIR/abduco
  • $HOME/.abduco
  • $TMPDIR/abduco/$USER
  • /tmp/abduco/$USER

However, if a given session name represents either a relative or absolute path it is used unmodified.

EXAMPLES

Start a new session (assuming dvtm(1) is in $PATH) with

$ abduco -c my-session

do some work, then detach by pressing ⟨Ctrl+\⟩, list existing session by running abduco without any arguments and later reattach with

$ abduco -a my-session

Alternatively, we can also explicitly specify the command to run.

$ abduco -c my-session /bin/sh

Attach with a ⟨Ctrl+z⟩ as detach key.

$ abduco -e ^z -a my-session

Send a command to an existing session.

$ echo make | abduco -a my-session

Or in a slightly more interactive fashion.

$ abduco -p my-session
make
^D

SEE ALSO

dvtm(1), dtach(1), tmux(1), screen(1)

AUTHORS

abduco is written by Marc André Tanner ⟨mat at brain-dump.org⟩

March 18, 2018 abduco 0.6