Jump to content

Linux player "steals" focus !


Recommended Posts

Posted

Hi,

Sorry for posting there but there isn't a Linux section in Emby apps subsection :( 

Here is my problem (I have it on my two computers: desktop and laptop). Both computers are running Debian (one in 12 and the other one in 11) with KDE and X-Windows and latest public version avalaible of Emby Player.

When I run the Emby player app (and it looks to happen most of time if I use the app in fullscreen on secondary screen), after a while I can't use the computer anymore as focus comes back all the time back in Emby player.

I click for example in my browser window to type an url but I can't: the cursor briefly shows in the browser and then it comes back at Emby app :(

If I close the Emby app problem disappears immediately.

Someone got that problem already ?

Thanks

 

Vincèn

GrimReaper
Posted
2 minutes ago, vincen said:

latest public version avalaible of Emby Player.

When I run the Emby player app (and it looks to happen most of time if I use the app in fullscreen on secondary screen), after a while I can't use the computer anymore as focus comes back all the time back in Emby player.

I click for example in my browser window to type an url but I can't: the cursor briefly shows in the browser and then it comes back at Emby app

By "Emby Player app" do you mean Emby Theater for Linux? 

https://emby.media/emby-theater-linux.html

Posted
3 minutes ago, GrimReaper said:

By "Emby Player app" do you mean Emby Theater for Linux? 

Oups yeah my fault 🙈 can you move the topic please in the emby theater section of forum ?

GrimReaper
Posted
1 minute ago, vincen said:

can you move the topic please in the emby theater section of forum ?

*Done*

  • Like 1
Posted

Hi, we'll take a look at this. Thanks for reporting.

  • Like 1
Posted
5 hours ago, Luke said:

Hi, we'll take a look at this. Thanks for reporting.

Thanks, let me know if you need any tests, logs, whatever to find out the issue ;)

  • Thanks 1
  • 4 weeks later...
Watching_bird
Posted

I came here to report the same issue.

I'm running Fedora 39 with KDE Plasma 5.27.10 on Wayland. Kernel version is 6.6.11. I use the Flatpak version of Emby Theater, but I also tried the rpm version and it has the exact same behaviour.

  • Thanks 1
  • 1 month later...
Posted

Hi @Luke

 

Any update on that issue ? or when a new version of Emby Theater for Linux will be released ?

 

Thanks

  • 1 month later...
Posted

Still no news about a new version of Emby Theater for Linux without that focus problem ?

  • 1 month later...
Posted

HI, what activity is happening in the Emby app when this happens?

Posted
1 hour ago, Luke said:

HI, what activity is happening in the Emby app when this happens?

As explained in my original quote it's happening when player is in full screen mode. If you need more details I'll need to reinstall it as it's ages I removed it of all my computers due to that bug and volume one also that is a nightmare to use in the app !

Posted

OK we'll take a look at it. Thanks for reporting.

Posted
9 hours ago, Luke said:

OK we'll take a look at it. Thanks for reporting.

I reinstalled it to be sure and I confirm it's as soon as you put in fullscreen few seconds later system is messed up 😁

Posted

So is this when video is playing?

Posted
4 hours ago, Luke said:

So is this when video is playing?

nope, not needed, just run the app full screen and problem shows up ;)

  • 2 weeks later...
Posted

OK we'll take a look at it. Thanks.

  • Thanks 1
  • 1 year later...
Tangenat
Posted

This is still an issue, how has this still not been fixed after 2 years?? Im having it on the latest version of the app on Arch

vincen
Posted
Just now, Tangenat said:

This is still an issue, how has this still not been fixed after 2 years?? Im having it on the latest version of the app on Arch

A publicbeta of a new version of the Linux app soon will be posted ;) 

  • 5 weeks later...
CrappyUserName
Posted (edited)

I was going to create another post about my issue instead of clogging up the main linux thread but I think this thread is related and probably answers my question.

Most of the details are in my post in the other thread.

When I use MPV as an external player, emby wants stay on top so the video ends up in the background. I set the --ontop flag in the arguments which puts MPV on top when a video is playing but it doesn't have focus. Any keyboard/IR remote commands are picked up by emby instead. If I take emby out of full screen, MPV will be on top but emby minimises and when I close MPV, emby stays minimised. I was hoping to use this thing as a media player with an IR remote.

I have a mini wireless keyboard with a small trackpad on it that will kind of make it all work as I can use the mouse to close MPV or pause etc but it's pretty janky to use.

I think at this point I'll probably run it maximised but not fullscreen, set a key command on the remote to run a script that closes mpv and maximises emby.

Point is, I was going to make a post to see if anyone had some kind of solution but based on this thread it's just emby being a prick, always wanting attention.

Tried out the beta and they have removed the ability to set an external player, you can see why that doesn't work for me from my other post I Iinked. It runs slow as balls and has the same issue (video plays in the background) which can be alt-tabbed to but then you can't close it.

I guess it wouldn't be Linux if you didn't have to solve 10 problems just to get a video to play and it's still barely functional.

edit:MPV does have an option to force focus but it's for MAC's only. I tried it anyway and it just causes an error.

Edited by CrappyUserName
  • Thanks 1
CrappyUserName
Posted (edited)
21 hours ago, CrappyUserName said:

set a key command on the remote to run a script that closes mpv and maximises emby.

I thought that was going to be easy....

Emby-theater starts off with the window title of "Emby" but once you go to a video page it changes it to the title of the video. For movies it will be the movie title, for TV shows it will be "Episode 1", "Episode 2" etc... and it stays at whatever the last title was until you go to another video page. If you go back to the emby homepage the window title stays at whatever video page it was on. It never goes back to being "Emby".

So I can't just run a simple script to unminimise the emby window based on it's name because it changes all the time. I have to find which of the 7 process IDs Emby runs with created the window, then use that to find the window ID which probably isn't super complicated but I didn't have learning bash on my bingo card today.

If the title always stayed as "Emby" or was prefixed with "Emby - " id be done and dusted already.

Edit: In case anyone comes across this from a google. Here is the bash script I used.

#!/usr/bin

# close mpv
pkill -TERM mpv

# find emby process id and unminimise
embyid=$(pgrep -f "emby-theater --no-sandbox")
windowid=$(wmctrl -lp | grep $embyid | awk '{print $1}')
wmctrl -ia $windowid

It's my first ever bash script so use at your own risk. I'm sure there is also a better way of doing it but it works for me.

For this whole thing to work, I have emby in tv mode maximised (it will not work in fullscreen) so you can still see the OS start bar at the bottom of the screen. I could probably size it better and autohide that. Anyway, when it's set like this, mpv as an external player gets focus when you play a video so it responds to remote commands. I've mapped a button on the remote to F3 and set this script to run when F3 is pushed. It automatically closes the video and emby pops back up and responds to the remote.

Happy days!

Edited by CrappyUserName

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...