-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Panic in user service on logout from desktop environment #47
Comments
Interesting bug! I think this happens because you are using For the former, I suppose you'd want something like this:
See if it helps you, we can't have that merged though, because libnotify is not a required dependency, so it would be wrong to enforce dependency on graphical-session onto everyone (also it would make it impossible to use the app purely in TTY). Otherwise, I can merge a PR for a graceful handling of presence or absence of a graphical session, but since I don't use the |
Thanks for the tip!
|
I ran into the same thing. Here is how I applied the above: # File: configuration.nix
systemd.packages = [ pkgs.yubikey-touch-detector ];
systemd.user.services.yubikey-touch-detector = {
path = [ pkgs.gnupg ];
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ]; # Otherwise the program segfaults in libnotify: https://github.com/maximbaz/yubikey-touch-detector/issues/47
}; I think a proper fix would be to bundle the systemd config with https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/tools/security/yubikey-touch-detector/default.nix but I don't (yet) know how to do that :) |
I use the systemd user service to run
yubikey-touch-detector
. I'm using NixOS 23.05 with GNOME 44.2.When I log out of GNOME, the service logs the following and crashes:
This only happens when I log out from a GNOME session. If I log in or out of another TTY, the service continues to run.
The service stays in this failed state when logging back in.
The text was updated successfully, but these errors were encountered: