Install system-wide without running xkalamine as root #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This way users can generate the files necessary for system-wide installation as a regular user, then install those files as root. This way you are only invoking root powers for cp(1) and you don't need to install and run xkalamine (and its dependencies) as root.
I wrote some instructions for this manual installation method in the README.rst.
It's not a great user experience, but right now it's the only way I can see to use the program to install keyboard layouts system-wide without giving all of xkalamine and its dependencies root capabilities. Maybe
xkalamine
could somehow elevate its permissions after generating the files and before writing the new files in place? Or maybe it could print out a big diff file that could be applied as root – something like this:Marking this as a draft PR because more work is needed for usability.