summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOdin Vex2022-04-02 22:44:03 -0400
committerOdin Vex2022-04-02 22:44:03 -0400
commit841fbf8de5522f763aabe390a8fecf92f1d3064f (patch)
tree4cdc615f3d7148351924fad4ceffbf22137d3a32
parentacc551c0770fb7ce469c06f64f89431c2e1ab1c3 (diff)
downloadaur-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--.SRCINFO2
-rwxr-xr-xPKGBUILD2
-rwxr-xr-xmint-artwork.install13
3 files changed, 11 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54e7d42aaefd..6b75b30cd9b9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index b97144625d2c..ceb2b5d14a54 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
+}