plex-mpv-shim icon indicating copy to clipboard operation
plex-mpv-shim copied to clipboard

Linux Systray Icon and Notifications

Open Mavarice opened this issue 3 years ago • 1 comments

The issue I am facing is that there is no systray icon when starting up plex-mpv-shim despite the app starting without issue.

I'm currently on Linux

OS Name: Pop!_OS 21.04 OS Type: 64 bit GNOME Version: 3.38.5

I've installed plex-mpv-shim and it is working as expected when started via command line and has no issues.

I've installed both pystray and tkinter per the readme documentation successfully plexmpvshiminstalls

I've ensured that the conf.json is being used on start up and that "enable_gui" is set to true plex-startup

The only thing I notice is that after running for a moment an error appears which has a timeout to StartServiceByName in org.freedesktop.Notifications.

Process STrayProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.9/dist-packages/plex_mpv_shim/gui_mgr.py", line 246, in run
    icon.run(setup=setup)
  File "/usr/local/lib/python3.9/dist-packages/pystray/_base.py", line 192, in run
    self._run()
  File "/usr/local/lib/python3.9/dist-packages/pystray/_util/gtk.py", line 64, in _run
    self._notifier = notify_dbus.Notifier()
  File "/usr/local/lib/python3.9/dist-packages/pystray/_util/notify_dbus.py", line 40, in __init__
    self._notify = Gio.DBusProxy.new_sync(
gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached (24)

This seems like the obvious culprit and my best guess is something wrong with the notification daemon in GNOME. Other notifications are working without issue, so I'm not sure where to go from here.

Mavarice avatar Jul 11 '21 14:07 Mavarice

Experiencing this on KDE Plasma (Wayland). Was able to work around it by running env WAYLAND_DISPLAY= plex-mpv-shim. It looks like the system tray is broken when using Wayland so specifying an empty wayland display causes it to fall back to X11/XWayland which works.

Specs:

Plex MPV Shim Version: 1.11.0-1
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 7950X 16-Core Processor
Memory: 58.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics

jkcdarunday avatar May 26 '23 01:05 jkcdarunday