An accessible GTK4 MUD (Multi-User Dungeon) client for Linux with full screen reader support, custom scripting, and sound protocol support.
- Full Accessibility - Built with screen reader users in mind using GTK4's accessibility APIs and AT-SPI integration. Works with Orca and other screen readers.
- Custom Scripting DSL - Define triggers, aliases, gags, and sound effects using a simple scripting language.
- Sound Protocol Support - MSP (MUD Sound Protocol), MCMP (Client.Media), and SPHook (Cosmic Rage) support for immersive audio.
- Multiple Audio Channels - Separate channels for sound effects, music, and ambient sounds with independent volume controls.
- Profile Management - Save connection profiles with associated scripts for quick access.
- ANSI Color Support - Full 16/256/true color rendering.
- Telnet Protocol - Standard telnet with MCCP v2 compression and GMCP support.
Coming soon
GTK MUD requires the following system packages:
Gentoo:
emerge -av x11-libs/gtk+:4 gui-libs/libadwaita media-libs/gstreamer \
media-libs/gst-plugins-base media-libs/gst-plugins-good \
dev-python/pygobject app-accessibility/at-spi2-coreDebian/Ubuntu:
apt install python3-gi python3-gi-cairo gir1.2-gtk-4.0 gir1.2-adw-1 \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
libgirepository1.0-dev at-spi2-coreFedora:
dnf install python3-gobject gtk4 libadwaita gstreamer1-plugins-base \
gstreamer1-plugins-good at-spi2-coreArch Linux:
pacman -S python-gobject gtk4 libadwaita gstreamer gst-plugins-base \
gst-plugins-good at-spi2-core- Python 3.11+
- PyGObject >= 3.50.0
- lark >= 1.1.0
- aiohttp >= 3.9.0
- tomli-w >= 1.0.0
# Clone the repository
git clone https://github.com/harley/gtkmud.git
cd gtkmud
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate
# Install in development mode
pip install -e .
# Or install normally
pip install .# If installed
gtkmud
# Or run directly from source
python -m gtkmud- Launch GTK MUD
- Press the Connect button or use
Ctrl+N - Enter the MUD server address and port
- Optionally select a script file and save as a profile
- Click Connect
| Shortcut | Action |
|---|---|
Ctrl+N |
New connection |
Ctrl+, |
Preferences |
Ctrl+Q |
Quit |
Up/Down |
Command history |
GTK MUD follows XDG conventions:
- Settings:
~/.config/gtkmud/settings.toml - Profiles:
~/.config/gtkmud/profiles.toml - Scripts:
~/.local/share/gtkmud/scripts/ - Local Sounds:
~/.local/share/gtkmud/sounds/ - Cached Sounds:
~/.cache/gtkmud/sounds/
GTK MUD includes a custom scripting language for automation. Scripts use the .mud extension.
# Movement aliases
alias "n" "north"
alias "s" "south"
alias "e" "east"
alias "w" "west"
# Sound on tells
sound_trigger /^\w+ tells you/ "tell.wav" volume 70
# Combat ambience
trigger "Combat begins" {
$combat = "true"
ambience "battle.wav" loop volume 50
}
trigger "Combat ends" {
$combat = "false"
ambience stop
}
# Gag spam
gag /^\[AutoSave\]/
See docs/scripting.md for the complete scripting guide.
GTK MUD supports multiple sound protocols:
- MSP - Standard MUD Sound Protocol (
!!SOUND()/!!MUSIC()) - MCMP - GMCP-based Client.Media protocol
- SPHook - Cosmic Rage's custom sound protocol
See docs/sound-protocols.md for protocol details.
GTK MUD has built-in support for Cosmic Rage's SPHook sound protocol. To enable sounds:
- Connect to Cosmic Rage
- The client automatically sends
@sp-register mudleton login (if using a script with that trigger) - Sounds will be downloaded and cached automatically
- Scripting Guide - Complete DSL reference
- Sound Protocols - MSP, MCMP, and SPHook documentation
GTK MUD is designed for screen reader users:
- All UI elements are properly labeled and keyboard accessible
- Incoming text is announced via AT-SPI
- The output view is navigable with arrow keys
- Sound cues provide additional feedback
Tested with Orca on GNOME.
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# With coverage
pytest --cov=gtkmudgtkmud/
├── ui/ # GTK user interface
├── net/ # Telnet and protocol handling
├── parsers/ # ANSI, MSP, SPHook parsers
├── sound/ # GStreamer audio system
├── scripting/ # DSL parser and interpreter
├── config/ # Settings and profiles
└── accessibility/ # Screen reader support
GTK MUD is licensed under the MIT License. See LICENSE for details.
Contributions are welcome! Please feel free to submit issues and pull requests.
- Cosmic Rage MUD for the SPHook protocol documentation
- The GTK and GNOME accessibility teams
- The MUD community