jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
2.87k stars 297 forks source link

Request ability to run more than one instance of the Jellyfin media player app for multiple monitor setups. #696

Open ioogithub opened 3 weeks ago

ioogithub commented 3 weeks ago

Problem

I am running a jellyfin server with a dGPU with multiple outputs. I start the xorg server in "ZaphodHeads" mode- i.e. two independent seats: 2 monitors, 2 media keyboards, etc.

I would like the ability to run more than once instance of flatpak version of Jellyfin Media Player so that I can attach it to each seat: i.e DISPLAY=:0.0 and DISPLAY=:0.1.

I can easily start the flatpak version of jellyfin on the first monitor with this command: env DISPLAY=:0.0 flatpak run --socket=x11 --socket=pulseaudio --env=DISPLAY=:0.0 com.github.iwalton3.jellyfin-media-player

I cannot however start a second instance of jellyfin media player on the second monitor: env DISPLAY=:0.1 flatpak run --socket=x11 --socket=pulseaudio --env=DISPLAY=:0.1 com.github.iwalton3.jellyfin-media-player nothing happens, there is no error it just fails to start.

Flatpak has the ability to add a custom home with this env variable: env HOME=/home/user/.var/app/com.github.iwalton3.jellyfin-media-player2

this would allow for a separate "profile" with different jellyfinmediaplayer.conf and different logs for the different monitor. Great however the second instance of the app will not run.

Potential solutions

Flatpak also has the ability to run more than once instance of an app if the app supports it by using the --own-name= argument. According flatpak discussion here: https://github.com/flatpak/flatpak/issues/3913, the app itself needs to "run as a different dbus name, and that is a request you have to take up with developers."

Here is an example of an app that can run more than once instance successfully with flatpak: https://github.com/aperezdc/revolt/issues/83 however the user notes that the revolt app already had the correct code to run as a different application identifier.

Is something like this possible with jellyfin media player?

Describe alternatives you've considered The only potential solution I can think of right now is to run jellyfin media player on one monitor and firefox and the web player on the second monitor however I would really love to run jellyfin media player on both.

Additional context If there are any other way to tackling this issue I would love to try them. Thank you.