Auto Add Param To Desktop File
This hook runs as root after a pacman transaction. Never point
Exec at a script or package list writable by an ordinary
user. Install both under root-owned paths; every ancestor directory must
also be protected from user writes.
Save this as ap in your working directory for review,
then install it as shown below. It handles simple, unquoted executable
names in the first Exec= line only; quoted executable paths
and Desktop Actions need a Desktop Entry-aware implementation rather
than this small patcher.
1 |
|
Save the package list as apps.list, for example:
1 | cursor-cursor |
Install the reviewed script and list (the working copies are not executed by the hook):
1 | sudo install -d -o root -g root -m 0755 /etc/desktop-wayland-ime |
Create /etc/pacman.d/hooks/desktop-wayland-ime.hook with
root:root ownership and mode 0644. Ensure the hook directory and
/usr/local/sbin are root-owned and not writable by ordinary
users; if those directories are already user-writable, repair that
prerequisite before installing anything.
1 | [Trigger] |
The hook modifies selected package-owned files in
/usr/share/applications; package upgrades can overwrite
them again. A user-level desktop override is an alternative when the
setting is only for one account.
Test the parser/idempotence against disposable desktop fixtures
before installing, rather than performing a system upgrade only to test
a hook. After installation, inspect ownership, mode and the modified
Exec= lines during an independently planned package
transaction. The earlier personal paru -Syu observation was
not rerun for this revised hook; no package upgrade or root execution
was performed in this review.