Set version to 0.4
[abduco.git] / README.md
blobae5fa577a1f9a08f70e56290370bb58bc9f8404a
1 # abduco a tool for session {at,de}tach support
3 [abduco](http://www.brain-dump.org/projects/abduco) provides
4 session management i.e. it allows programs to be run independently
5 from their controlling terminal. That is programs can be detached -
6 run in the background - and then later reattached. Together with
7 [dvtm](http://www.brain-dump.org/projects/dvtm) it provides a
8 simpler and cleaner alternative to tmux or screen.
10 ![abduco+dvtm demo](https://raw.githubusercontent.com/martanne/abduco/gh-pages/screencast.gif)
12 abduco is in many ways very similar to [dtach]("http://dtach.sf.net)
13 but is a completely independent implementation which is actively maintained,
14 contains no legacy code, provides a few additional features, has a
15 cleaner, more robust implementation and is distributed under the
16 [ISC license](https://raw.githubusercontent.com/martanne/abduco/master/LICENSE)
18 ## News
20  * [abduco-0.3](http://www.brain-dump.org/projects/abduco/abduco-0.3.tar.gz)
21    [released](http://lists.suckless.org/dev/1502/25557.html) (19.02.2015)
22  * [abduco-0.2](http://www.brain-dump.org/projects/abduco/abduco-0.2.tar.gz)
23    [released](http://lists.suckless.org/dev/1411/24447.html) (15.11.2014)
24  * [abduco-0.1](http://www.brain-dump.org/projects/abduco/abduco-0.1.tar.gz)
25    [released](http://lists.suckless.org/dev/1407/22703.html) (05.07.2014)
26  * [Initial announcement](http://lists.suckless.org/dev/1403/20372.html)
27    on the suckless development mailing list (08.03.2014)
29 ## Download
31 Either download the latest source tarball
32 [abduco-0.3.tar.gz](http://www.brain-dump.org/projects/abduco/abduco-0.3.tar.gz)
33 with sha1sum
35     175b2c0eaf2a8b7fb044f1454d018dac4ec31293  abduco-0.3.tar.gz
37 compile and install it
39     $EDITOR config.mk && make && sudo make install
41 or use one of the distribution provided binary packages:
43  * [Debian](https://packages.debian.org/search?keywords=abduco)
44  * [Fedora](https://admin.fedoraproject.org/pkgdb/package/abduco/)
45  * [Gentoo](http://packages.gentoo.org/package/app-misc/abduco/)
46  * [Ubuntu](http://packages.ubuntu.com/search?keywords=abduco)
47  * [Mac OS X](http://www.braumeister.org/formula/abduco) via homebrew
49 ## Quickstart
51 In order to create a new session `abduco` requires a session name
52 as well as an command which will be run. If no command is given
53 the environment variable `$ABDUCO_CMD` is examined and if not set
54 `dvtm` is executed. Therefore assuming `dvtm` is located somewhere
55 in `$PATH` a new session named *demo* is created with: 
57     $ abduco -c demo
59 An arbitrary application can be started as follows:
61     $ abduco -c session-name your-application
63 `CTRL-\` detaches from the active session. This detach key can be
64 changed by means of the `-e` command line option, `-e ^q` would 
65 for example set it to `CTRL-q`.
67 To get an overview of existing session run `abduco` without any
68 arguments.
70     $ abduco
71     Active sessions (on host debbook)
72     * Thu    2015-03-12 12:05:20    demo-active
73     + Thu    2015-03-12 12:04:50    demo-finished
74       Thu    2015-03-12 12:03:30    demo
76 A leading asterisk `*` indicates that at least one client is
77 connected. A leading plus `+` denotes that the session terminated,
78 attaching to it will print its exit status.
80 A session can be reattached by using the `-a` command line option
81 in combination with the session name which was used during session
82 creation.
84     abduco -a demo
86 Check out the manual page for further information and all available
87 command line options.
89 ## Improvements over dtach
91  * **session list**, available by executing `abduco` without any arguments,
92    indicating whether clients are connected or the command has already
93    terminated.
95  * the **session exit status** of the command being run is always kept and
96    reported either upon command termination or on reconnection
97    e.g. the following works:
99         $ abduco -n demo true && abduco -a demo
100         abduco: demo: session terminated with exit status 0
102  * **read only sessions** if the `-r` command line argument is used when
103    attaching to a session, then all keyboard input is ignored and the
104    client is a passive observer only.
106  * **better resize handling** on shared sessions, resize request are only
107    processed if they are initiated by the most recently connected, non 
108    read only client.
110  * **socket recreation** by sending the `SIGUSR1` signal to the server 
111    process. In case the unix domain socket was removed by accident it
112    can be recreated. The simplest way to find out the server process
113    id is to look for abduco processes which are reparented to the init
114    process.
116         $ pgrep -P 1 abduco
118    After finding the correct PID the socket can be recreated with
120         $ kill -USR1 $PID
122    If the abduco binary itself has also been deleted, but a session is 
123    still running, use the following command to bring back the session:
125         $ /proc/$PID/exe
127  * **improved socket permissions** the session sockets are by default either
128    stored in `$HOME/.abduco` or `/tmp/abduco/$USER` in both cases it is
129    made sure that only the owner has access to the respective directory.
131 ## Development
133 You can always fetch the current code base from the git repository.
135     git clone https://github.com/martanne/abduco.git
139     git clone git://repo.or.cz/abduco.git
141 If you have comments, suggestions, ideas, a bug report, a patch or something
142 else related to abduco then write to the 
143 [suckless developer mailing list](http://suckless.org/community) 
144 or contact me directly mat[at]brain-dump.org.
146 [![Build Status](https://travis-ci.org/martanne/abduco.svg?branch=master)](https://travis-ci.org/martanne/abduco)
147 [![Coverity Scan Build Status](https://scan.coverity.com/projects/4285/badge.svg)](https://scan.coverity.com/projects/4285)
149 ## License
151 abduco is licensed under the [ISC license](https://raw.githubusercontent.com/martanne/abduco/master/LICENSE)