abduco
Session management tool that works with dvtm or any other program.
Official WebsiteFeatures
Installation
brew install abducoapt install abducopacman -S abducoWhy use abduco?
abduco is a simple and lightweight session manager that provides detach/attach functionality for any terminal program. Unlike tmux or screen which are full multiplexers, abduco focuses on just session persistence. It's minimal, fast, and works seamlessly with dvtm or any other terminal program.
Session Persistence
Detach from sessions without losing work. Reconnect later to continue where you left off, even after SSH disconnections.
Works with Any Program
Not limited to dvtm. Use abduco with bash, vim, python, or any terminal program that needs session management.
Minimal and Lightweight
Extremely small C program with minimal dependencies. Perfect for resource-constrained environments and remote servers.
Simple Design
Does one thing well: session management. Easy to understand, debug, and customize without the overhead of a full multiplexer.
Installation
Using Package Managers
# macOS (Homebrew)
brew install abduco
# Ubuntu/Debian
apt install abduco
# Arch Linux
pacman -S abduco
# From source
git clone https://www.brain-dump.org/projects/abduco/
cd abduco
make
sudo make installVerify Installation
# Check if abduco is installed
abduco -v
# Show help
abduco -hBasic Usage
Creating and Managing Sessions
# Create a new session named "mysession" running bash
abduco -c mysession
# Create a session with a specific program
abduco -c dev dvtm
abduco -c work vim
abduco -c python python3
# Attach to an existing session
abduco -a mysession
# Create and attach if doesn't exist, or attach if it does
abduco -A mysession
# List all sessions
abduco -lDetaching and Reattaching
# While in a session, detach with Ctrl+# Press Ctrl+Backslash to detach
# After detaching, you can close your terminal safely
# The session continues running
# Later, reattach to the same session
abduco -a mysession
# List sessions to find which ones exist
abduco -l
# Attach to session "work"
abduco -a workWorking with dvtm and abduco
The most common use case: combine abduco with dvtm for a full multiplexing experience.
# Create a persistent dvtm session
abduco -c main dvtm
# Inside dvtm, use Ctrl+g for window management
# Use Ctrl+ to detach from the session
# Detaching from abduco session
# Inside dvtm, press Ctrl+ to exit dvtm
# This detaches you from the abduco session
# Later, reattach to continue
abduco -a main
# Inside dvtm again, continue with your windows
Ctrl+g n # Next window
Ctrl+g c # Create new windowUsing with Other Programs
# Persistent bash shell
abduco -c shell
# Persistent vim session
abduco -c editor vim file.txt
# Persistent Python interpreter
abduco -c py python3
# Persistent SSH session with command
abduco -c remote ssh user@host
# Watch a long-running build
abduco -c build ./build.sh
# Later check on it
abduco -a buildConfiguration
Customizing the Detach Key
By default, Ctrl+\ (Ctrl+Backslash) is used to detach. To change this, edit the config and rebuild:
/* In config.h, find and modify the detach key */
#define DETACH_KEY '\' /* Ctrl+ */
/* Change to your preferred key, for example: */
#define DETACH_KEY 'd' /* Would be Ctrl+d */
/* Then rebuild */
make clean
make
sudo make installEnvironment Variables
# ABDUCO_DETACH_KEY - Override detach key (if compiled with support)
# DVTM - Path to dvtm executable (if using abduco + dvtm integration)
# Set environment variables for your session
export DVTM=/usr/bin/dvtm
abduco -c main
# Or use in one line
DVTM=/usr/local/bin/dvtm abduco -c work dvtmShell Integration
# Add to your shell config for easy access
# Create quick session launch functions
function work() {
abduco -A work dvtm
}
function dev() {
abduco -A dev dvtm
}
function ses() {
abduco -l # List all sessions
}
# Or create a quick launcher
function abduco_new() {
abduco -A "$1" "${2:-$SHELL}"
}
# Usage: abduco_new mysession
# Usage: abduco_new build ./build.shabduco vs tmux vs screen
| Feature | abduco | tmux | screen |
|---|---|---|---|
| Detach/Attach | ✓ | ✓ | ✓ |
| Window Splitting | - | ✓ | ✓ |
| Program Agnostic | ✓ | - | - |
| Code Size (Lines) | <1000 | >20000 | >10000 |
| Dependencies | Minimal | libc | libc |
| Configuration | Compile-time | Config file | Config file |
| Learning Curve | Very low | Moderate | Moderate |
| Works with dvtm | ✓ | - | - |
Tips & Tricks
- •Remember the detach key is
Ctrl+\by default. If it doesn't work, check your terminal settings. - •
abduco -Ais convenient: it creates a session if it doesn't exist, or attaches if it does. - •Use abduco with dvtm for a lightweight alternative to tmux with full window management capabilities.
- •abduco can manage sessions for any program. Use it for persistent Python REPLs, vim sessions, builds, etc.
- •Session directory is typically
~/.abducowhere socket files are stored. - •For SSH connections that drop frequently, abduco is a lightweight solution to keep your work running.
- •Multiple people can attach to the same session for pair programming or shared access to long-running tasks.
- •Source code is small and readable. It's a great project to study for learning about terminal programming.
Related Articles
dvtm - Dynamic Virtual Terminal Manager
Dynamic virtual terminal manager inspired by dwm window manager
tmux - Terminal Multiplexer
Terminal multiplexer for session management and window splitting
GNU Screen - Terminal Multiplexer
Classic terminal multiplexer with session persistence