BunsenLabs / bunsen-utilities

https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-utilities/
GNU General Public License v3.0
30 stars 21 forks source link

Allow overriding the bl-lock LOCK_COMMAND #43

Closed nalipaz closed 8 years ago

nalipaz commented 8 years ago

I would really like to change to slimlock from light-locker with very little to no modification of system files. This allows me to do so, but I can't say if it is the best approach. I am glad to change things around if you feel this might be accepted in some form.

Thanks

xaosfiftytwo commented 8 years ago

Thank you for your suggestion, nalipaz, but:

I don't think we want to source a configuration file that is completely out of our control from our scripts. It also makes file ~/.config/bunsen/bl-lock serve a double purpose: now it is only used as a 'flag' that a certain situation has occurred. We only test for its existence.

Your situation is best solved by creating your own 'bl-lock' command, and put it in a directory in your PATH that comes before /usr/bin. That way it is completely under your control.

This is my personal opinion only. The owner of this repo is presently on holidays somewhere in the wilderness where he can't be reached for the moment. Lets wait for his reaction.

nalipaz commented 8 years ago

@xaosfiftytwo your suggestion certainly isn't a bad idea since we have ~/bin/. Simple enough. Sure we can see how maintainer wishes to proceed.

johnraff commented 8 years ago

All suggestions are most welcome, including yours @nalipaz

In this case, however, I have to agree with @xaosfiftytwo

I don't think we want to source a configuration file that is completely out of our control from our scripts.

Indeed not. This would allow any arbitary code to be run, while still appearing to be the work of our script.

It also makes file ~/.config/bunsen/bl-lock serve a double purpose: now it is only used as a 'flag' that a certain situation has occurred. We only test for its existence.

At the moment ~/.config/bunsen/bl-lock is only used in live mode, to ensure the unlock password is only displayed once. (Of course a clever intruder could easily work around this, and the password is hardly a secret anyway.)

Your situation is best solved by creating your own 'bl-lock' command, and put it in a directory in your PATH that comes before /usr/bin. That way it is completely under your control.

This is the recommended way to override preinstalled bunsenlabs scripts.