Skip to content
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

service: add libnotify service #7

Closed
wants to merge 1 commit into from

Conversation

FFY00
Copy link

@FFY00 FFY00 commented Oct 10, 2019

Signed-off-by: Filipe Laíns [email protected]

@maximbaz
Copy link
Owner

I think we should include this in the existing service, not make a duplicate one... Because you don't want users to accidentally run both services at the same time (nothing bad will happen, but still).

How about we add EnvironmentFile=/path/to/some/file and then allow users to customize extra args to the binary?

@FFY00
Copy link
Author

FFY00 commented Oct 10, 2019

Yes, that makes sense.

This is used to be able to easily configure the service to use libnotify
instead.

Signed-off-by: Filipe Laíns <[email protected]>
@FFY00
Copy link
Author

FFY00 commented Oct 10, 2019

What do you think of this approach? Use @ to allow users to pass arguments to the service.

@maximbaz
Copy link
Owner

It feels a bit hacky and wouldn't allow to pass two arguments (imagine someone needs to pass -u2f-authpending-path "/new/path/to/pam-u2f-authpending")...

I'm grepping svn-community now, I can see for example sway is doing EnvironmentFile=-%h/.config/sway/env, shall we just do the same?

EnvironmentFile=-%h/.config/yubikey-touch-detector/service.conf

And actually, we can make the binary itself respect these environment variables, not to pass them via CLI arguments. In other words, we will not define ARGS in service.conf, but we will define YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY=true and YUBIKEY_TOUCH_DETECTOR_U2F_AUTHPENDING_PATH="/new/path/to/pam-u2f-authpending".

What do you think, is this going to be cleaner? If you agree, wanna implement this or should I take over? :)

@FFY00
Copy link
Author

FFY00 commented Oct 11, 2019

It feels a bit hacky and wouldn't allow to pass two arguments (imagine someone needs to pass -u2f-authpending-path "/new/path/to/pam-u2f-authpending")...

You could actually pass several arguments:

yubikey-touch-detector@'--libnotify -u2f-authpending-path /new/path/to/pam-u2f-authpending'.service

But you are correct, it is a bit hacky. I will try to push a patch with the changes you requested.

@maximbaz
Copy link
Owner

a friendly ping @FFY00, still interested in finishing this or should I take over? :)

@FFY00
Copy link
Author

FFY00 commented Nov 17, 2019

I am interested but I have other stuff to do, you can take over 😁.

@maximbaz
Copy link
Owner

Implemented in 54f876a, gonna release 1.4.0 now, let me know if you spot anything wrong with it 👍

@maximbaz maximbaz closed this Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants