Skip to content

App Launcher

dnaidoo621 edited this page May 30, 2026 · 1 revision

App Launcher

The Apps drawer tab lets you launch media apps with a single tap. Each button sends a launch message over WebSocket; the server resolves it to a shell command and runs it detached from the service process.


Default apps

App Command tried (in order)
Jellyfin xdg-open http://localhost:8096
Plex xdg-open https://app.plex.tv
Kodi kodi, then flatpak run tv.kodi.Kodi
Netflix xdg-open https://www.netflix.com
YouTube xdg-open https://www.youtube.com
Spotify spotify, then flatpak run com.spotify.Client
Browser firefox, then chromium-browser, then xdg-open https://

When a value is a list, Glide tries each command left-to-right and uses the first one that succeeds (binary exists and launches without error).


Customising

Edit APP_COMMANDS in /opt/htpc-remote/server/input/base.py:

APP_COMMANDS: dict[str, str | list[str]] = {
    "jellyfin": "xdg-open http://localhost:8096",
    "plex":     "xdg-open https://app.plex.tv",
    "kodi":     ["kodi", "flatpak run tv.kodi.Kodi"],
    "netflix":  "xdg-open https://www.netflix.com",
    "youtube":  "xdg-open https://www.youtube.com",
    "spotify":  ["spotify", "flatpak run com.spotify.Client"],
    "browser":  ["firefox", "chromium-browser", "xdg-open https://"],
}

A string value runs that command directly. A list value tries each entry in order.

After editing, restart the service:

systemctl --user restart htpc-remote

Note: The file lives inside /opt/htpc-remote/ which is overwritten on every upgrade. If you customise it, keep a copy or consider packaging your own .deb with the changes baked in.


Adding a new app

  1. Add an entry to APP_COMMANDS with a key that matches what the phone sends:
"vlc": ["vlc", "flatpak run org.videolan.VLC"],
  1. Add a button for it in the Apps drawer in web/static/glide-controller.jsx:
const APPS = [
  ['J', 'Jellyfin',  285],
  ['P', 'Plex',       60],
  // ... existing entries ...
  ['V', 'VLC',        25],   // hue 25 = orange-red
];

The three values are: monogram letter, display name (must match the APP_COMMANDS key, lowercase), oklch hue (0–360, controls the icon background colour).

  1. Rebuild and redeploy the .deb, or restart the service if you edited the files in-place.

How launch works

The server runs app commands via subprocess.Popen with start_new_session=True. This detaches the child process from the service — if Glide restarts, the launched app keeps running. No output is captured.

Clone this wiki locally