File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,13 @@ rm --force /home/$SHADOW/.config/autostart/gio-fix-desktop-file-permissions.desk
16
16
cat << EOF > "$GIO_SCRIPT "
17
17
#! /usr/bin/env sh
18
18
19
- # gio needs to run as the user + dbus-launch, we have this script to create it and kill it afterwards
20
- export \$ (dbus-launch)
21
- DBUS_PROCESS=\$\$
19
+ # gio needs to run as the user with correct dbus settings
20
+ export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$( id -u user) /bus"
22
21
23
22
for FILE in /home/$USER /Skrivebord/*.desktop; do
24
23
gio set "\$ FILE" metadata::trusted true
25
24
done
26
25
27
- kill \$ DBUS_PROCESS
28
26
EOF
29
27
30
28
# Script to activate programs on the desktop
@@ -42,7 +40,9 @@ su --login user --command $GIO_SCRIPT
42
40
# Now set the permissions back to their restricted form
43
41
for FILE in /home/$USER /Skrivebord/*.desktop; do
44
42
chown root:$USER "\$ FILE"
45
- # Can't make sense of this as it already has execute permissions, but it won't work without it
43
+ # In order for gio changes to take effect, it is necessary to update the file time stamp
44
+ # This can be done with many commands such as chmod or simply touch
45
+ # However, in some cases the files might not have execute permission so we add it with chmod
46
46
chmod ug+x "\$ FILE"
47
47
done
48
48
EOF
You can’t perform that action at this time.
0 commit comments