jellyfin / jellyfin-mpv-shim

MPV Cast Client for Jellyfin
Other
1.5k stars 88 forks source link

Error to run the flatpak - no display name and no $DISPLAY environment variable #394

Open lamyergeier opened 1 month ago

lamyergeier commented 1 month ago

Describe the bug

  1. error to run the flatpak (see below for errors)
  2. when clicked "Configure servers" and "Show console", nothing happens!

To Reproduce

$ docker images
REPOSITORY                     TAG       IMAGE ID       CREATED        SIZE
jellyfin/jellyfin              latest    c9a520bbdfdf   2 weeks ago    1.05GB
$ flatpak install com.github.iwalton3.jellyfin-mpv-shim
Looking for matches…

com.github.iwalton3.jellyfin-mpv-shim permissions:
    ipc      network      fallback-x11         pulseaudio      wayland
    x11      devices      dbus access [1]

    [1] org.gnome.SettingsDaemon.MediaKeys

        ID                                          Branch       Op       Remote       Download
 1. [✓] org.gnome.Platform.Locale                   46           u        flathub      17.9 kB / 367.7 MB
 2. [✓] org.gnome.Platform                          46           u        flathub      74.2 MB / 346.8 MB
 3. [✓] com.github.iwalton3.jellyfin-mpv-shim       stable       i        flathub      19.7 MB / 43.3 MB

Changes complete.
$ flatpak run com.github.iwalton3.jellyfin-mpv-shim
2024-05-31 07:52:32,673 [    INFO] player: Using libmpv1 playback backend.
Tk_Init error: no display name and no $DISPLAY environment variable
Process PreferencesWindowProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/app/lib/python3.11/site-packages/jellyfin_mpv_shim/gui_mgr.py", line 279, in run
    root = tk.Tk()
           ^^^^^^^
  File "/app/lib/python3.11/site-packages/tkinter/__init__.py", line 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: no display name and no $DISPLAY environment variable

(jellyfin-mpv-shim:21): Gtk-CRITICAL **: 07:52:33.064: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

Desktop (please complete the following information):

Error Messages Please provide logs, as they are often needed for me to understand and quickly troubleshoot the issue. You can read instructions for how to do so here: https://github.com/iwalton3/jellyfin-mpv-shim/wiki/Sending-Logs

SusStew commented 3 weeks ago

I had the same issue on Nobara (Fedora-based) running Wayland and found this workaround: https://github.com/jellyfin/jellyfin-mpv-shim/issues/219#issuecomment-1263928032