forked from jpouellet/qubes-desktop-linux-common
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
appmenus: Call qvm-appmenus via qrexec service
Add two new qrexec services: qubes.UpdateAppmenusFor and qubes.RemoveAppmenusFor. When menu-relevant properties are changed on a VM, call qvm-appmenus via those new services, instead of directly. This gives a bit nicer interface when calling it in GUI VM that is not dom0 - which is a feature added here at the same time. This also unifies create/update calls - now update will also initialize directory structure if it wasn't there before. Fixes QubesOS/qubes-issues#8528
- Loading branch information
Showing
7 changed files
with
96 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$1" ]; then | ||
echo "Missing argument (VM name)" >&2 | ||
exit 2 | ||
fi | ||
|
||
if [ $(id -u) -eq 0 ]; then | ||
user=$(getent group qubes|cut -d: -f4|cut -d, -f1) | ||
if [ -n "$user" ]; then | ||
exec /usr/sbin/runuser -u "$user" env DISPLAY=:0 /usr/bin/qvm-appmenus --remove --quiet -- "$1" | ||
fi | ||
else | ||
/usr/bin/qvm-appmenus --remove --quiet -- "$1" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$1" ]; then | ||
echo "Missing argument (VM name)" >&2 | ||
exit 2 | ||
fi | ||
|
||
if [ $(id -u) -eq 0 ]; then | ||
user=$(getent group qubes|cut -d: -f4|cut -d, -f1) | ||
if [ -n "$user" ]; then | ||
exec /usr/sbin/runuser -u "$user" env DISPLAY=:0 /usr/bin/qvm-appmenus --update --force --quiet -- "$1" | ||
fi | ||
else | ||
/usr/bin/qvm-appmenus --update --force --quiet -- "$1" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters