Display running QEMU virtual machines as Discord Rich Presence status
Project description
QEMU Discord RPC
A Python script that displays your running QEMU virtual machines as Discord Rich Presence status.
Features
- 🖥️ Automatically detects running QEMU virtual machines
- 🎮 Shows VM status on your Discord profile with runtime
- ⏱️ Displays how long the VM has been running
- 🔄 Real-time updates (configurable interval)
- 💾 Saves Discord application settings locally
- ⚙️ Easy configuration management with built-in editor
- 🚀 Lightweight and easy to use
- 📦 Multiple installation options
Prerequisites
- Python 3.6 or higher
- Discord application
- QEMU virtual machines
- Linux/Unix system (uses
ps auxcommand) - nano text editor (for config editing)
Installation
Option 1: Using pipx (Recommended)
pipx installs packages in isolated environments and makes them available globally:
# Install pipx if you don't have it
pip install pipx
# Install QEMU Discord RPC
pipx install qemu-discord-rpc
# Run anywhere
qemu-discord-rpc
Option 2: Using pip
pip install qemu-discord-rpc
Option 3: From Source
git clone https://github.com/qubixq/qemu-discord-rpc.git
cd qemu-discord-rpc
pip install .
Option 4: Development Installation
git clone https://github.com/qubixq/qemu-discord-rpc.git
cd qemu-discord-rpc
pip install -e .
Quick Start
-
Create a Discord Application
- Go to Discord Developer Portal
- Click "New Application" and name it (e.g., "QEMU VM Status")
- Copy the Application ID (Client ID)
-
Run the application
qemu-discord-rpc
-
First-time setup
- Enter your Discord Application Client ID when prompted
- The script will save your settings automatically
That's it! Your QEMU VMs will now appear in your Discord status.
Usage
Basic Commands
# Start the Discord RPC service
qemu-discord-rpc
# Edit configuration file
qemu-discord-rpc --config
# Show help
qemu-discord-rpc --help
# Show version
qemu-discord-rpc --version
Discord Status Example
🖥️ Playing QEMU VM
Windows-11 VM is running
Virtualization with QEMU VM
Started 25 minutes ago
Configuration
Automatic Configuration
On first run, the script will create a config.json file with your settings.
Manual Configuration
Use the built-in config editor:
qemu-discord-rpc --config
This opens the configuration file in nano editor where you can modify:
{
"client_id": "your_discord_application_id",
"update_interval": 15,
"app_name": "QEMU VM"
}
Configuration Options:
client_id: Your Discord Application Client IDupdate_interval: How often to check for VMs (seconds, default: 15)app_name: Application name shown in Discord status
Manual Config Editing
You can also edit config.json directly in any text editor.
Advanced Setup
Creating a Custom Discord Application Icon
- Go to your Discord Application in the Developer Portal
- Navigate to "Rich Presence" → "Art Assets"
- Upload an icon named
qemu-logo(this matches the script) - Your VM status will now show your custom icon!
VM Detection Requirements
Your QEMU command must include the guest= parameter for detection:
qemu-system-x86_64 -name guest=MyVM,debug-threads=on ...
Troubleshooting
Common Issues
VMs not detected:
- Ensure QEMU processes include
guest=parameter - Test detection:
ps aux | grep qemu - Check that QEMU is actually running
Discord status not showing:
- Verify Discord is running and you're logged in
- Check Discord privacy settings allow Rich Presence
- Confirm Client ID is correct (use
--configto update)
Config editor not working:
- Install nano:
sudo apt install nano(Ubuntu/Debian) - Or edit
config.jsonmanually in any text editor
Installation Issues
Command not found after pip install:
# Try reinstalling with --user flag
pip install --user qemu-discord-rpc
# Or use pipx (recommended)
pipx install qemu-discord-rpc
Permission issues:
# Use pipx to avoid permission issues
pipx install qemu-discord-rpc
# Or install with --user flag
pip install --user qemu-discord-rpc
Development
Running from Source
git clone https://github.com/qubixq/qemu-discord-rpc.git
cd qemu-discord-rpc
python -m qemu_discord_rpc
Building
pip install build
python -m build
Contributing
Contributions are welcome! Please feel free to:
- 🐛 Report bugs
- 💡 Suggest new features
- 🔧 Submit pull requests
- 📚 Improve documentation
Development Setup
git clone https://github.com/qubixq/qemu-discord-rpc.git
cd qemu-discord-rpc
pip install -e .[dev]
License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Acknowledgments
- pypresence - Discord RPC library
- QEMU community for the amazing virtualization platform
- All contributors and users of this project
Changelog
v1.0.3
- ✨ Added configuration management with
--configoption - ✨ Added command-line help and startup information
- ✨ Improved error handling and user feedback
- ✨ Added configurable update interval
- 📚 Updated installation options (pipx support)
v1.0.2
- 🐛 Bug fixes and stability improvements
- 📚 Documentation updates
v1.0.1
- 🚀 Initial release
Note: This script is designed for Linux/Unix systems and requires Discord to be running for Rich Presence to work.
For support, please open an issue on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qemu_discord_rpc-1.0.3.tar.gz.
File metadata
- Download URL: qemu_discord_rpc-1.0.3.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1169c33bac67d797792d0ea2d9979badc3b43a4caf0d988a384eea9cfc199965
|
|
| MD5 |
1f7612f69cd3cbdcfb5ea040b63fd629
|
|
| BLAKE2b-256 |
dfaa9cd07e1542409de8bf244470e06aee9ca3eabc84f5b492f05646a5c36c2d
|
File details
Details for the file qemu_discord_rpc-1.0.3-py3-none-any.whl.
File metadata
- Download URL: qemu_discord_rpc-1.0.3-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20a1e26c096bfee3d5396c99cc1c9b5f6509ce71127dc83ebf2d662927a05a8
|
|
| MD5 |
dbe1767e4de8fb26ba0f42815a66fbc0
|
|
| BLAKE2b-256 |
6178122d4cfbb889841af797acf2a10bf8ca8fea15b20460c9153912b47f244c
|