Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Allow running of arbitrary commands before and after authentication #79

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dexterlb
Copy link

@dexterlb dexterlb commented Jun 2, 2019

Let the user execute any command just before and after authenticating.
This allows for things like printing a different prompt each time, showing something just after unlocking,
etc - within physlock's VT.

As a bonus, add an option to not do any authentication at all - just execute the commands while having locked the screen. My personal favourite is running sl with no way whatsoever to interrupt it :)

@googleson78
Copy link

You should add the new flags to print_usage().

@jluttine
Copy link

Are the commands run as the user whose password is asked or as the user who launched physlock (typically root, I suppose)? In my opinion, it would be nice if those were run as the user whose password is asked. What do you think?

main.c Outdated Show resolved Hide resolved
@jluttine
Copy link

jluttine commented Oct 1, 2019

@dexterlb Thanks a lot for the changes, they are very helpful to me! Now, running the following command works and the before/after commands are executed as the normal user:

PATH="" /path/to/bin/sudo /path/to/bin/physlock -b '/path/to/bin/echo "Hello, `/path/to/bin/whoami`"' -a '/path/to/bin/echo "Bye, `/path/to/bin/whoami`!" && /path/to/bin/sleep 2'

@travankor
Copy link
Contributor

travankor commented Feb 3, 2020

It would be nice to have an option to execute a command after inactivity timeout. For example, go to sleep if physlock is called but no activity happens after a certain amount of time.

@Barbaross93
Copy link

Hi @dexterlb! I packaged your fork to the AUR. Would you be willing to do a rebase on your fork?

@dexterlb
Copy link
Author

dexterlb commented Feb 9, 2021

Hi @dexterlb! I packaged your fork to the AUR. Would you be willing to do a rebase on your fork?

It has been done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants