Linux guide - kavinthangavel/Media-Player-Scrobbler-for-Simkl GitHub Wiki
🐧 Linux Installation & Configuration Guide
This comprehensive guide provides detailed instructions specifically for Linux users of Media Player Scrobbler for Simkl, focusing on installation, system integration, and media player configuration for various Linux distributions.
Important Note: Currently, the application supports movie tracking only. TV show tracking is planned for future updates.
📥 Linux Installation
Required Dependencies
Before installing, ensure you have the necessary system dependencies based on your distribution:
For Ubuntu/Debian:
sudo apt install python3-pip python3-dev python3-setuptools wmctrl xdotool python3-gi python3-gi-cairo gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev pkg-config libnotify-bin python3-venv gir1.2-appindicator3-0.1 gnome-shell-extension-appindicator
For Fedora/RHEL/CentOS:
sudo dnf install python3-pip python3-devel gobject-introspection-devel cairo-devel pkg-config python3-gobject gtk3 wmctrl xdotool libnotify
For Arch Linux:
sudo pacman -S python-pip python-setuptools python-gobject gtk3 gobject-introspection cairo pkg-config wmctrl xdotool libnotify
Installation Process
flowchart TD
A[Install Dependencies] --> B[Install via pipx]
B --> C[Initialize Application]
C --> D[Authenticate with Simkl]
D --> E[Configure Media Players]
E --> F[Setup Autostart]
style A fill:#4285f4,stroke:#333,stroke-width:2px,color:#fff
style D fill:#34a853,stroke:#333,stroke-width:2px,color:#fff
style F fill:#fbbc05,stroke:#333,stroke-width:2px,color:#fff
-
Install the application using pipx (recommended for better isolation):
# Install pipx if not already installed python3 -m pip install --user pipx python3 -m pipx ensurepath # Install simkl-mps with Linux extras pipx install --system-site-packages "simkl-mps[linux]"
Alternatively, use pip directly:
pip install --user "simkl-mps[linux]"
-
Initialize the application:
simkl-mps init
-
Start the application:
simkl-mps start
🔧 System Tray Integration
Tray Icon Troubleshooting
If the system tray icon doesn't appear (common on some Linux distributions), follow these steps:
For GNOME-based distros (Ubuntu, Fedora Workstation, etc.):
-
Ensure you have the AppIndicator extension installed:
# For Ubuntu/Debian sudo apt install gnome-shell-extension-appindicator # For Fedora sudo dnf install gnome-shell-extension-appindicator
-
Enable the AppIndicator extension:
- Open the "Extensions" application
- Enable "AppIndicator and KStatusNotifierItem Support"
- Or visit: https://extensions.gnome.org/extension/615/appindicator-support/
-
Restart GNOME Shell:
- Press Alt+F2, type "r" and press Enter
- Or log out and log back in
-
Run the diagnostic script to check tray compatibility:
python3 -m simkl_mps.utils.linux_tray_diagnostics
For KDE Plasma:
KDE Plasma has good built-in support for system tray icons. If you're experiencing issues:
- Right-click on the system tray
- Select "Configure System Tray"
- Ensure "Legacy Tray" is enabled
For Xfce, MATE, and Cinnamon:
These desktop environments have good support for system tray icons by default. If issues persist:
- Right-click on the panel
- Look for "Panel Settings" or similar
- Ensure the "Notification Area" or "System Tray" is added to the panel
Running in Foreground Mode
If you're troubleshooting or want to see logs in real-time:
simkl-mps tray
This will run the application attached to the terminal, displaying all logs. Press Ctrl+C to exit.
🚀 Setting Up Autostart
To make simkl-mps start automatically when you log in:
Method 1: Desktop Entry (Recommended)
-
Create a desktop entry file:
mkdir -p ~/.config/autostart cat > ~/.config/autostart/simkl-mps.desktop << EOF [Desktop Entry] Type=Application Name=Media Player Scrobbler for SIMKL Exec=simkl-mps start Icon=media-player Comment=Automatically track media playback and scrobble to SIMKL Categories=Utility; Terminal=false StartupNotify=false EOF
-
Make it executable:
chmod +x ~/.config/autostart/simkl-mps.desktop
Method 2: Using Your Desktop Environment's Autostart Settings
For GNOME:
- Open "Startup Applications"
- Click "Add"
- Set Name: "Media Player Scrobbler for SIMKL"
- Set Command:
simkl-mps start
- Add a description if desired
- Click "Add"
For KDE Plasma:
- Go to System Settings > Startup and Shutdown > Autostart
- Click "Add Program"
- Search for simkl-mps or select "Add Custom Script"
- Enter
simkl-mps start
as the command - Click "OK" or "Apply"
For Xfce:
- Go to Settings > Session and Startup > Application Autostart
- Click "Add"
- Name: "Media Player Scrobbler for SIMKL"
- Command:
simkl-mps start
- Click "OK"
⚙️ Media Player Configuration on Linux
For the best movie tracking experience, configure your preferred media players:
VLC Media Player
Step-by-Step Configuration:
- Open VLC Media Player
- Navigate to Tools → Preferences
- At the bottom left, change Show settings to All
- Navigate to Interface → Main interfaces
- Check the box for Web to enable the web interface
- Go to Interface → Main interfaces → Lua
- Set a password in the Lua HTTP Password field
- Click Save and restart VLC
MPV Media Player (Recommended for Linux)
Configuration Steps:
- Create or edit the MPV configuration file:
mkdir -p ~/.config/mpv echo 'input-ipc-server=/tmp/mpvsocket' >> ~/.config/mpv/mpv.conf
- Save and restart MPV
Celluloid (GNOME MPV)
Celluloid is a GTK frontend for MPV, and you'll need to configure the underlying MPV:
- Edit the MPV config as above
- In Celluloid, go to Preferences > MPV Configuration
- Add:
input-ipc-server=/tmp/mpvsocket
- Restart Celluloid
🖥️ Linux System Integration
System Tray Features
Right-click the system tray icon to access:
flowchart TD
A[System Tray Icon] -->|Right-click| B[Context Menu]
B --> C[Status Information]
B --> D[Start/Pause Tracking]
B --> E[Tools Submenu]
B --> F[Online Services]
E --> E1[Open Logs]
E --> E2[Config Directory]
E --> E3[Process Backlog]
F --> F1[Simkl Website]
F --> F2[Watch History]
B --> G[Check for Updates]
B --> H[Help/About]
B --> I[Exit]
style A fill:#4285f4,stroke:#333,stroke-width:2px,color:#fff
style D fill:#34a853,stroke:#333,stroke-width:2px,color:#fff
style F fill:#fbbc05,stroke:#333,stroke-width:2px
- Status information: Current monitoring state and connection status
- Start/Pause Tracking: Toggle monitoring
- Tools: Access to logs, configuration, and backlog management
- Exit: Close the application
Linux-Specific File Locations
- Configuration file:
~/.local/share/kavinthangavel/simkl-mps/.simkl_mps.env
- Log files:
~/.local/share/kavinthangavel/simkl-mps/simkl_mps.log
- Backlog database:
~/.local/share/kavinthangavel/simkl-mps/backlog.db
🔄 Updates
To update your installation:
# If installed with pipx
pipx upgrade simkl-mps
# If installed with pip
pip install --upgrade --user "simkl-mps[linux]"
🚀 Optimizing for Linux
Performance Tips
- Use MPV or VLC for the most reliable tracking
- Enable autostart for convenience
- Proper filenames significantly improve movie identification:
- Best format:
Movie Title (Year).extension
- Example:
Inception (2010).mkv
- Best format:
- For GNOME users, ensure the AppIndicator extension is enabled
- If system tray is important, consider using KDE Plasma or Xfce which have better system tray support
Resource Usage
- Memory: 30-60 MB (typical)
- CPU: Minimal (1-2% during active tracking)
- Disk: Minimal (~1 MB for database and logs)
- Network: Only when identifying movies or syncing with Simkl
🔍 Linux Troubleshooting
Common Issues
Issue | Solution |
---|---|
Dependencies missing | Run diagnostics script and install required packages |
Tray icon missing | Install and enable AppIndicator extension (GNOME) or check panel settings |
Python module errors | Ensure you installed with the Linux extras: simkl-mps[linux] |
VLC connection fails | Verify web interface is enabled and password is correct |
MPV not detected | Check if socket path in config is correct: /tmp/mpvsocket |
Movie not identified | Use clearer filename, check log for details |
Checking Logs on Linux
-
View logs in real-time with:
tail -f ~/.local/share/kavinthangavel/simkl-mps/simkl_mps.log
-
Or open in your text editor:
xdg-open ~/.local/share/kavinthangavel/simkl-mps/simkl_mps.log
Running with Debug Logging
For advanced troubleshooting:
simkl-mps tray --debug
Diagnostics Script
Run the built-in diagnostics script to check your environment:
python3 -m simkl_mps.utils.linux_tray_diagnostics
🔔 Final Checklist for Linux Users
- ✅ Install all required dependencies for your distribution
- ✅ Install simkl-mps with Linux extras
- ✅ Configure your media players (critical step!)
- ✅ Fix any system tray issues using the guide above
- ✅ Set up autostart for convenience
- ✅ Use proper filenames for your movies
- ✅ Play a movie and verify it's detected and tracked
- ✅ Check your Simkl profile to confirm movies are marked as watched