-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
xss-lock: add patch to allow setting session #78059
xss-lock: add patch to allow setting session #78059
Conversation
@uvNikita decided to make a patch to address this issue: https://github.com/rycee/home-manager/blob/master/modules/services/screen-locker.nix#L70 so we can make a systemd user service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, would be great to get a fix for it!
The patch looks small enough to me, but I'm not sure what's recommended here for custom patches like this.
Also, I don't understand where does GRAPHICAL_SESSION_ID come from? Who is supposed to set it?
Well this patch should be upstreamed anyway, but I do not know what happened with the project as last commit is from 2014. Do you know any other alternative to |
@offlinehacker I don't want to be a d*ck but could you at least mention where the code is comming from in the commit message ? It would be greatly appreciated :) As for |
Thanks for explanation @xdbob and sorry I forgot to mention you in commit. I think the best course would be to just change source to @xdbob fork. At least one other distro uses it: https://aur.archlinux.org/packages/xss-lock-session/ If for some reason it gets removed we can fix later. |
xss-lock uses current session that cannot be overriden. This prevents starting xss-lock as systemd user service, as described here: https://bitbucket.org/raymonad/xss-lock/issues/13/allow-operation-as-systemd-user-unit This change uses source from github.com/xdbob/xss-lock that adds `--session` parameter.
f95a210
to
d0a3a80
Compare
Ok, i changed source to use @xdbob fork. I do not think we need two packages for that, as it's minimal change, that does not break any additional functionality and i think it would be also easier to introduce new changes to this new repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
And by the way, if you are interested in the feature I have a branch keeping the logind's I can also tag a release for the occasion (I used master for months without issue). PS: I don't use xss-lock anymore (wayland <3) but if someone is willing to test the patches I am willing to keep maintaining it and reviewing the patches |
Thanks @xdbob, for now I will just accept master branch, but I will review and test |
Motivation for this change
xss-lock uses current session that cannot be overriden. This prevents starting
xss-lock as systemd user service, as described here:
https://bitbucket.org/raymonad/xss-lock/issues/13/allow-operation-as-systemd-user-unit
This change adds additional patch that adds
--session
parameter. I decided not to usefetchPatch
, as we do not want to depend on unofficial repos.Thanks @xdbob for initial implementation here: https://github.com/xdbob/xss-lock
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)