OneDeadKey / kalamine

Keyboard Layout Maker
MIT License
109 stars 29 forks source link

Install system-wide without running xkalamine as root #22

Open chambln opened 2 years ago

chambln commented 2 years ago

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:

xkalamine generate layout.yml | sudo patch
# or ...
xkalamine generate layout.yml > layout.patch
less layout.patch  # inspect manually so you know what you're installing
sudo patch < layout.patch

Marking this as a draft PR because more work is needed for usability.

fabi1cazenave commented 1 year ago

Ohh sorry I missed your work. That’s exactly what I needed, thanks !