Add or Override Content in /usr
In KDE Linux, /usr is read-only; you cannot modify the contents.
However, you can set up an overlay on top of it, and then files you add to this overlay will override files with the same name and location in /usr. To do this, we will use a tool called “Systemd Extensions”, or “sysext” for short.
Run the following setup script to set one up:
set-up-systemd-extension
After it completes, confirm that the sysext works:
# Verify that it got enabled systemd-sysext # Create a dummy file in the sysext echo "It worked" > ~/kde/usr/foo # Refresh the sysext so the system sees the change sudo systemd-sysext refresh # Make sure it appeared in /usr as expected cat /usr/foo
Disabling the sysext is easy too:
sudo systemd-sysext unmerge
See also
Article contributed by Nate Graham under the CC-BY-4.0 license.