-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu/Linux version? #8
Comments
I could look into it, but can't make any promises - I don't have a desktop or laptop with Linux set up at the moment. If you have some basic programming experience, you're also welcome to contribute! The part that is most different to Windows would be the API calls that tell the system not to go to sleep, so any knowledge on that would also help. |
I'm going off a small program I wrote seven years ago and I haven't ran Linux on the desktop in a very long time so take this with a grain of salt: You ask something called logind (which, IIRC, replaced UPower as the program to ask) over D-Bus, an IPC mechanism, to inhibit sleep. If granted permission, you get transferred a file descriptor over D-Bus, which you close when you want the lock to be released. (Apparently, the currently-supported .NET library for D-Bus communication is https://github.com/tmds/Tmds.DBus) As that systemd page notes, "Taking inhibitor locks is a privileged operation." If you were to ask for an inhibition, you would probably (again, I don't run Linux) get the PolicyKit agent asking you to enter the password of a privileged user. You would need to write a PolKit rule to allow inhibition requests originating from Jellyfin to go through without prompting the active user. Of course, that's not needed if someone's running Jellyfin as root, but I sincerely hope nobody is doing that. (Desktop applications will usually ask a session manager daemon provided by their desktop environment of choice [e.g. GNOME] to inhibit sleep - this avoids the need for a password and writing Polkit rules for every application - but I don't think that's a feasible approach, most people are running Jellyfin as a daemon, not connected to a particular user's desktop session.) |
I created a python script that does the job for Linux systems |
This looks like one approach to at least partially tackle the problem, and looks like @qwerty12 's afterthought. Thanks!
|
Definitely a hack. but works for me, thought some others could use as well. This is for ppl who use their computer/laptop for other things and run a jellyfin server... |
Any chance you can make a version for Ubuntu/Linux ?
thanks
I am looking into the session activity but cannot figure out how to access http://192.168.1.101:8920/Sessions
when i type in url i get nothing
The text was updated successfully, but these errors were encountered: