diff options
author | Odin Vex | 2022-04-02 22:44:03 -0400 |
---|---|---|
committer | Odin Vex | 2022-04-02 22:44:03 -0400 |
commit | 841fbf8de5522f763aabe390a8fecf92f1d3064f (patch) | |
tree | 4cdc615f3d7148351924fad4ceffbf22137d3a32 | |
parent | acc551c0770fb7ce469c06f64f89431c2e1ab1c3 (diff) | |
download | aur-841fbf8de5522f763aabe390a8fecf92f1d3064f.tar.gz |
Fix dbus call to restart Cinnamon
Dbus doesn't allow other users to access other sessions, had to switch to a sudo user switch
Signed-off-by: Odin Vex <odin.vex@ethicalexploiting.com>
-rw-r--r-- | .SRCINFO | 2 | ||||
-rwxr-xr-x | PKGBUILD | 2 | ||||
-rwxr-xr-x | mint-artwork.install | 13 |
3 files changed, 11 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = mint-artwork pkgdesc = Linux Mint Artwork and Resources. pkgver = 1.5.6 - pkgrel = 5 + pkgrel = 6 epoch = 0 url = http://packages.linuxmint.com/pool/main/m/mint-artwork install = mint-artwork.install @@ -1,7 +1,7 @@ # Maintainer: Odin Vex <https://aur.archlinux.org/account/OdinVex/> pkgname=mint-artwork pkgver=1.5.6 -pkgrel=5 +pkgrel=6 epoch=0 pkgdesc="Linux Mint Artwork and Resources." arch=("any") diff --git a/mint-artwork.install b/mint-artwork.install index 81b44ccfc101..8d8af616dcdc 100755 --- a/mint-artwork.install +++ b/mint-artwork.install @@ -1,13 +1,18 @@ post_install() { #touch /usr/share/backgrounds/linuxmint/default_background.jpg #gsettings reset-recursively org.cinnamon - cinnamon-dbus-command RestartCinnamon 0 + restart_Cinnamon } post_upgrade() { - cinnamon-dbus-command RestartCinnamon 0 + restart_Cinnamon } post_remove() { - cinnamon-dbus-command RestartCinnamon 0 -}
\ No newline at end of file + restart_Cinnamon +} + +restart_Cinnamon() { + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${SUDO_UID}/bus" + sudo -u "#${SUDO_UID}" -H dbus-send --bus=$DBUS_SESSION_BUS_ADDRESS --type=method_call --dest=org.Cinnamon /org/Cinnamon org.Cinnamon.RestartCinnamon boolean:true 2> /dev/null +} |