Go to file
Marc André Tanner 0377477f5b Set version to 0.4 2015-03-18 18:23:06 +01:00
.gitignore Initial import 2014-02-18 23:04:00 +01:00
.travis.yml Revert "travis: try to run clang analyzer upon build time" 2015-02-16 22:13:00 +01:00
LICENSE Change some year numbers to 2015 2015-02-19 17:46:05 +01:00
Makefile Reflect README renaming in Makefile 2015-03-18 17:49:28 +01:00
README.md Change screencast url in README 2015-03-13 21:31:02 +01:00
abduco.1 Update man page 2015-02-26 15:30:11 +01:00
abduco.c Update man page 2015-02-26 15:30:11 +01:00
client.c Improve terminal restoring 2014-12-22 13:32:42 +01:00
config.def.h Change default key bindings to match dtach 2014-03-06 23:17:43 +01:00
config.mk Set version to 0.4 2015-03-18 18:23:06 +01:00
debug.c Use correct printf format specifier for size_t 2014-06-24 11:56:12 +02:00
forkpty-aix.c Make setsid(2) failure non fatal 2014-10-02 14:21:19 +02:00
forkpty-sunos.c Fallback to TTYNAME_MAX if TTY_NAME_MAX is not defined 2014-07-08 10:22:42 +02:00
server.c Cleanup socket creation 2015-02-25 23:27:44 +01:00
testsuite.sh Update testsuite to reflect terminal restoring changes 2014-12-22 13:32:42 +01:00

README.md

abduco a tool for session {at,de}tach support

abduco provides session management i.e. it allows programs to be run independently from their controlling terminal. That is programs can be detached - run in the background - and then later reattached. Together with dvtm it provides a simpler and cleaner alternative to tmux or screen.

abduco+dvtm demo

abduco is in many ways very similar to dtach but is a completely independent implementation which is actively maintained, contains no legacy code, provides a few additional features, has a cleaner, more robust implementation and is distributed under the ISC license

News

Download

Either download the latest source tarball abduco-0.3.tar.gz with sha1sum

175b2c0eaf2a8b7fb044f1454d018dac4ec31293  abduco-0.3.tar.gz

compile and install it

$EDITOR config.mk && make && sudo make install

or use one of the distribution provided binary packages:

Quickstart

In order to create a new session abduco requires a session name as well as an command which will be run. If no command is given the environment variable $ABDUCO_CMD is examined and if not set dvtm is executed. Therefore assuming dvtm is located somewhere in $PATH a new session named demo is created with:

$ abduco -c demo

An arbitrary application can be started as follows:

$ abduco -c session-name your-application

CTRL-\ detaches from the active session. This detach key can be changed by means of the -e command line option, -e ^q would for example set it to CTRL-q.

To get an overview of existing session run abduco without any arguments.

$ abduco
Active sessions (on host debbook)
* Thu    2015-03-12 12:05:20    demo-active
+ Thu    2015-03-12 12:04:50    demo-finished
  Thu    2015-03-12 12:03:30    demo

A leading asterisk * indicates that at least one client is connected. A leading plus + denotes that the session terminated, attaching to it will print its exit status.

A session can be reattached by using the -a command line option in combination with the session name which was used during session creation.

abduco -a demo

Check out the manual page for further information and all available command line options.

Improvements over dtach

  • session list, available by executing abduco without any arguments, indicating whether clients are connected or the command has already terminated.

  • the session exit status of the command being run is always kept and reported either upon command termination or on reconnection e.g. the following works:

     $ abduco -n demo true && abduco -a demo
     abduco: demo: session terminated with exit status 0
    
  • read only sessions if the -r command line argument is used when attaching to a session, then all keyboard input is ignored and the client is a passive observer only.

  • better resize handling on shared sessions, resize request are only processed if they are initiated by the most recently connected, non read only client.

  • socket recreation by sending the SIGUSR1 signal to the server process. In case the unix domain socket was removed by accident it can be recreated. The simplest way to find out the server process id is to look for abduco processes which are reparented to the init process.

     $ pgrep -P 1 abduco
    

    After finding the correct PID the socket can be recreated with

     $ kill -USR1 $PID
    

    If the abduco binary itself has also been deleted, but a session is still running, use the following command to bring back the session:

     $ /proc/$PID/exe
    
  • improved socket permissions the session sockets are by default either stored in $HOME/.abduco or /tmp/abduco/$USER in both cases it is made sure that only the owner has access to the respective directory.

Development

You can always fetch the current code base from the git repository.

git clone https://github.com/martanne/abduco.git

or

git clone git://repo.or.cz/abduco.git

If you have comments, suggestions, ideas, a bug report, a patch or something else related to abduco then write to the suckless developer mailing list or contact me directly mat[at]brain-dump.org.

Build Status Coverity Scan Build Status

License

abduco is licensed under the ISC license