Kodi Community Forum

Full Version: DElauncher4Kodi: Fixes media key and volume issues in DEs like gnome-shell
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've written a little tool that modifies how kodi is launched from within desktop environments like gnome-shell. This might be useful to people who want to run a full desktop environment as well as Kodi on the same box and make them play a bit more nicely with each other. Specifically it addresses the issue of media keys getting eaten by the window manager, as well as the conflict between the system volume and kodi's app volume.

You can check it out and install it by following the instructions at:

https://github.com/chrisjbillington/DElauncher4Kodi

I appreciate anyone testing it and reporting bugs so I can fix them!

Copying and pasting from the README:

Running `kodi` as well as a desktop environment (DE) such as `gnome-shell` on the
same computer requires a bit of...cooperation...between the two. The following two
problems exist for anyone trying to do this:

* When running `kodi` from within gnome-shell, the media keys may be handled by the
  desktop environment instead of by `kodi`. That means the play/pause/rewind/etc
  media keys on a remote or keyboard don't work, and the volume up/down keys, which
  modify the system volume rather than `kodi`'s volume, work but show an obnoxious
  popup and make an annoying sound (the same as when you change the volume in
  `gnome-shell` normally).

* When running `kodi` as a separate session (as in, selecting it from the login
  screen), the media keys work, but the volume keys control the `kodi` app volume.
  This is nice, except that the maximum volume is limited to the system volume
  setting, which is left at whatever it was last set to by the user in `gnome-
  shell`, and is now not adjustable within `kodi`. Also, running `kodi` as a separate
  desktop session is a pain in the neck if you actually want to switch between `kodi`
  and `gnome-shell` (to watch netflix in chrome or whatever), since typing
  passwords on tiny keyboards on HTPC remotes is annoying, and enabling
  passwordless login is bad security practice (and annoying to set up). Also media
  computers are often slow for things that are not GPU accelerated, so logging out
  and in again can be pretty slow.

`DElauncher4Kodi` solves both problems by setting the system volume to 100% before
launching `kodi`, and grabbing all keyboard input and forwarding media keys as
commands to `kodi` directly.

It should work on all desktop environments, not just `gnome-shell`. It only assumes
you are running linux and PulseAudio.