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
- ⏱️ Displays how long the VM has been running
- 🔄 Real-time updates every 15 seconds
- 💾 Saves Discord application settings locally
- 🚀 Lightweight and easy to use
Prerequisites
- Python 3.6 or higher
- Discord application
- QEMU virtual machines
- Linux/Unix system (uses
ps auxcommand)
Installation
- Clone this repository:
git clone https://github.com/qubixq/qemu-discord-rpc.git
cd qemu-discord-rpc
- Install required dependencies:
pip install pypresence
Setup
1. Create a Discord Application
- Go to Discord Developer Portal
- Click "New Application" and give it a name (e.g., "QEMU VM Status")
- Copy the Application ID (Client ID) from the General Information page
- You can also upload a custom icon for your application
2. Configure the Script
- Run the script for the first time:
python qemu_discord_rpc.py
- When prompted, enter your Discord Application Client ID
- The script will save this ID to
config.jsonfor future use
Usage
Simply run the script while your QEMU virtual machines are running:
python qemu_discord_rpc.py
The script will:
- Detect running QEMU VMs by looking for
guest=parameter in process list - Update your Discord status to show the VM name and runtime
- Continue monitoring until you stop it with
Ctrl+C
Example Discord Status
🖥️ Playing QEMU VM
Windows-11 VM is running
Started 25 minutes ago
Configuration
The script creates a config.json file to store your Discord Application Client ID:
{
"client_id": "your_discord_application_id_here"
}
You can manually edit this file if needed, or delete it to reconfigure.
How It Works
- VM Detection: Uses
ps auxto find QEMU processes - Name Extraction: Parses the
guest=parameter from QEMU command line - Discord RPC: Uses pypresence library to communicate with Discord
- Status Updates: Updates every 15 seconds, clears when no VMs are running
Requirements
pypresence- Discord Rich Presence library for Python
Install with:
pip install pypresence
Troubleshooting
Script doesn't detect VMs
- Ensure your QEMU command includes the
guest=parameter - Check that QEMU processes are visible with
ps aux | grep qemu
Discord status not showing
- Make sure Discord is running and you're logged in
- Verify your Discord Application Client ID is correct
- Check that your Discord privacy settings allow Rich Presence
Multiple VMs
- Currently shows only the first detected VM
- Feel free to modify the script for multiple VM support
Contributing
Contributions are welcome! Please feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
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
Note: This script is designed for Linux/Unix systems.
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.0.tar.gz.
File metadata
- Download URL: qemu_discord_rpc-1.0.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf5261945abfe527d918e7a4780f2d17327b2188b680bb54f5718b2f02dfdddf
|
|
| MD5 |
0666acd971ff6b33c642b81392a50656
|
|
| BLAKE2b-256 |
61b26c9c54d923d3ac75e897386db27bc4df3c64cdd5188548dddea0e680a90d
|
File details
Details for the file qemu_discord_rpc-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qemu_discord_rpc-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.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 |
0b1a3a12f4e659197bf7c4e1e56f62d412bb81c7e74abb0f3be7f776a4c91dbb
|
|
| MD5 |
6016038e84cf03aaaad68c9b48174896
|
|
| BLAKE2b-256 |
94cd6727c4eb74446999645dfec725cf65a7f4e9c3aa73a32a96dccf3dc42967
|