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.
Metadata
Release files for qemu-discord-rpc 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qemu_discord_rpc-1.0.3.tar.gz | 18.3 kB | Without provenance | Details for qemu_discord_rpc-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qemu_discord_rpc-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for qemu_discord_rpc-1.0.3-py3-none-any.whl |
Total release size: 36.9 kB
Release files / qemu_discord_rpc-1.0.3.tar.gz
| Download URL | qemu_discord_rpc-1.0.3.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1169c33bac67d797792d0ea2d9979badc3b43a4caf0d988a384eea9cfc199965
|
|
BLAKE2b-256 checksum How to use checksums |
dfaa9cd07e1542409de8bf244470e06aee9ca3eabc84f5b492f05646a5c36c2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / qemu_discord_rpc-1.0.3-py3-none-any.whl
| Download URL | qemu_discord_rpc-1.0.3-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f20a1e26c096bfee3d5396c99cc1c9b5f6509ce71127dc83ebf2d662927a05a8
|
|
BLAKE2b-256 checksum How to use checksums |
6178122d4cfbb889841af797acf2a10bf8ca8fea15b20460c9153912b47f244c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for qemu-discord-rpc 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.