{"id":13437347,"url":"https://github.com/martanne/abduco","last_synced_at":"2025-04-13T05:08:29.609Z","repository":{"id":23317270,"uuid":"26677142","full_name":"martanne/abduco","owner":"martanne","description":"abduco provides session management i.e. it allows programs to be run independently from its 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.","archived":false,"fork":false,"pushed_at":"2023-01-18T05:30:49.000Z","size":619,"stargazers_count":795,"open_issues_count":28,"forks_count":55,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-13T05:08:26.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martanne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-15T10:56:27.000Z","updated_at":"2025-04-03T23:48:42.000Z","dependencies_parsed_at":"2023-02-10T13:15:32.714Z","dependency_job_id":null,"html_url":"https://github.com/martanne/abduco","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martanne%2Fabduco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martanne%2Fabduco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martanne%2Fabduco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martanne%2Fabduco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martanne","download_url":"https://codeload.github.com/martanne/abduco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:00:56.173Z","updated_at":"2025-04-13T05:08:29.589Z","avatar_url":"https://github.com/martanne.png","language":"C","funding_links":[],"categories":["C","others"],"sub_categories":[],"readme":"# abduco a tool for session {at,de}tach support\n\n[abduco](https://www.brain-dump.org/projects/abduco) provides\nsession management i.e. it allows programs to be run independently\nfrom their controlling terminal. That is programs can be detached -\nrun in the background - and then later reattached. Together with\n[dvtm](https://www.brain-dump.org/projects/dvtm) it provides a\nsimpler and cleaner alternative to tmux or screen.\n\n![abduco+dvtm demo](https://raw.githubusercontent.com/martanne/abduco/gh-pages/screencast.gif#center)\n\nabduco is in many ways very similar to [dtach](http://dtach.sf.net)\nbut is a completely independent implementation which is actively maintained,\ncontains no legacy code, provides a few additional features, has a\ncleaner, more robust implementation and is distributed under the\n[ISC license](https://raw.githubusercontent.com/martanne/abduco/master/LICENSE)\n\n## News\n\n * [abduco-0.6](https://www.brain-dump.org/projects/abduco/abduco-0.6.tar.gz)\n   [released](https://lists.suckless.org/dev/1603/28589.html) (24.03.2016)\n * [abduco-0.5](https://www.brain-dump.org/projects/abduco/abduco-0.5.tar.gz)\n   [released](https://lists.suckless.org/dev/1601/28094.html) (09.01.2016)\n * [abduco-0.4](https://www.brain-dump.org/projects/abduco/abduco-0.4.tar.gz)\n   [released](https://lists.suckless.org/dev/1503/26027.html) (18.03.2015)\n * [abduco-0.3](https://www.brain-dump.org/projects/abduco/abduco-0.3.tar.gz)\n   [released](https://lists.suckless.org/dev/1502/25557.html) (19.02.2015)\n * [abduco-0.2](https://www.brain-dump.org/projects/abduco/abduco-0.2.tar.gz)\n   [released](https://lists.suckless.org/dev/1411/24447.html) (15.11.2014)\n * [abduco-0.1](https://www.brain-dump.org/projects/abduco/abduco-0.1.tar.gz)\n   [released](https://lists.suckless.org/dev/1407/22703.html) (05.07.2014)\n * [Initial announcement](https://lists.suckless.org/dev/1403/20372.html)\n   on the suckless development mailing list (08.03.2014)\n\n## Download\n\nEither download the latest [source tarball](https://github.com/martanne/abduco/releases),\ncompile and install it\n\n    ./configure \u0026\u0026 make \u0026\u0026 sudo make install\n\nor use one of the distribution provided\n[binary packages](https://repology.org/project/abduco/packages).\n\n## Quickstart\n\nIn order to create a new session `abduco` requires a session name\nas well as an command which will be run. If no command is given\nthe environment variable `$ABDUCO_CMD` is examined and if not set\n`dvtm` is executed. Therefore assuming `dvtm` is located somewhere\nin `$PATH` a new session named *demo* is created with:\n\n    $ abduco -c demo\n\nAn arbitrary application can be started as follows:\n\n    $ abduco -c session-name your-application\n\n`CTRL-\\` detaches from the active session. This detach key can be\nchanged by means of the `-e` command line option, `-e ^q` would\nfor example set it to `CTRL-q`.\n\nTo get an overview of existing session run `abduco` without any\narguments.\n\n    $ abduco\n    Active sessions (on host debbook)\n    * Thu    2015-03-12 12:05:20    demo-active\n    + Thu    2015-03-12 12:04:50    demo-finished\n      Thu    2015-03-12 12:03:30    demo\n\nA leading asterisk `*` indicates that at least one client is\nconnected. A leading plus `+` denotes that the session terminated,\nattaching to it will print its exit status.\n\nA session can be reattached by using the `-a` command line option\nin combination with the session name which was used during session\ncreation.\n\n    $ abduco -a demo\n\nIf you encounter problems with incomplete redraws or other\nincompatibilities it is recommended to run your applications\nwithin [dvtm](https://github.com/martanne/dvtm) under abduco:\n\n    $ abduco -c demo dvtm your-application\n\nCheck out the manual page for further information and all available\ncommand line options.\n\n## Improvements over dtach\n\n * **session list**, available by executing `abduco` without any arguments,\n   indicating whether clients are connected or the command has already\n   terminated.\n\n * the **session exit status** of the command being run is always kept and\n   reported either upon command termination or on reconnection\n   e.g. the following works:\n\n        $ abduco -n demo true \u0026\u0026 abduco -a demo\n        abduco: demo: session terminated with exit status 0\n\n * **read only sessions** if the `-r` command line argument is used when\n   attaching to a session, then all keyboard input is ignored and the\n   client is a passive observer only.\n\n   Note that this is not a security feature, but only a convenient way to\n   avoid accidental keyboard input.\n\n   If you want to make your abduco session available to another user\n   in a read only fashion, use [socat](http://www.dest-unreach.org/socat/)\n   to proxy the abduco socket in a unidirectional (from the abduco server\n   to the client, but not vice versa) way.\n\n   Start your to be shared session, make sure only you have access to\n   the `private` directory:\n\n        $ abduco -c /tmp/abduco/private/session\n\n   Then proxy the socket in unidirectional mode `-u` to a directory\n   where the desired observers have sufficient access rights:\n\n        $ socat -u unix-connect:/tmp/abduco/private/session unix-listen:/tmp/abduco/public/read-only \u0026\n\n   Now the observers can connect to the read-only side of the socket:\n\n        $ abduco -a /tmp/abduco/public/read-only\n\n   communication in the other direction will not be possible and keyboard\n   input will hence be discarded.\n\n * **better resize handling** on shared sessions, resize request are only\n   processed if they are initiated by the most recently connected, non\n   read only client.\n\n * **socket recreation** by sending the `SIGUSR1` signal to the server\n   process. In case the unix domain socket was removed by accident it\n   can be recreated. The simplest way to find out the server process\n   id is to look for abduco processes which are reparented to the init\n   process.\n\n        $ pgrep -P 1 abduco\n\n   After finding the correct PID the socket can be recreated with\n\n        $ kill -USR1 $PID\n\n   If the abduco binary itself has also been deleted, but a session is\n   still running, use the following command to bring back the session:\n\n        $ /proc/$PID/exe\n\n * **improved socket permissions** the session sockets are by default either\n   stored in `$HOME/.abduco` or `/tmp/abduco/$USER` in both cases it is\n   made sure that only the owner has access to the respective directory.\n\n## Development\n\nYou can always fetch the current code base from the git repository\nlocated at [Github](https://github.com/martanne/abduco/) or\n[Sourcehut](https://git.sr.ht/~martanne/abduco).\n\nIf you have comments, suggestions, ideas, a bug report, a patch or something\nelse related to abduco then write to the\n[suckless developer mailing list](https://suckless.org/community)\nor contact me directly.\n\n### Debugging\n\nThe protocol content exchanged between client and server can be dumped\nto temporary files as follows:\n\n    $ make debug\n    $ ./abduco -n debug [command-to-debug] 2\u003e server-log\n    $ ./abduco -a debug 2\u003e client-log\n\nIf you want to run client and server with one command (e.g. using the `-c`\noption) then within `gdb` the option `set follow-fork-mode {child,parent}`\nmight be useful. Similarly to get a syscall trace `strace -o abduco -ff\n[abduco-cmd]` proved to be handy.\n\n## License\n\nabduco is licensed under the [ISC license](https://raw.githubusercontent.com/martanne/abduco/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartanne%2Fabduco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartanne%2Fabduco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartanne%2Fabduco/lists"}