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

Allow running of arbitrary commands before and after authentication#79

Open
dexterlb wants to merge 5 commits into
xyb3rt:masterfrom
dexterlb:master
Open

Allow running of arbitrary commands before and after authentication#79
dexterlb wants to merge 5 commits into
xyb3rt:masterfrom
dexterlb:master

Conversation

@dexterlb

@dexterlb dexterlb commented Jun 2, 2019

Copy link
Copy Markdown

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
Copy Markdown

You should add the new flags to print_usage().

@jluttine

Copy link
Copy Markdown

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?

Comment thread main.c Outdated
@jluttine

jluttine commented Oct 1, 2019

Copy link
Copy Markdown

@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

travankor commented Feb 3, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@dexterlb

dexterlb commented Feb 9, 2021

Copy link
Copy Markdown
Author

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.

5 participants