File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 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
1616cat << EOF > "$GIO_SCRIPT "
1717#! /usr/bin/env sh
1818
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"
2221
2322for FILE in /home/$USER /Skrivebord/*.desktop; do
2423 gio set "\$ FILE" metadata::trusted true
2524done
2625
27- kill \$ DBUS_PROCESS
2826EOF
2927
3028# Script to activate programs on the desktop
@@ -42,7 +40,9 @@ su --login user --command $GIO_SCRIPT
4240# Now set the permissions back to their restricted form
4341for FILE in /home/$USER /Skrivebord/*.desktop; do
4442 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
4646 chmod ug+x "\$ FILE"
4747done
4848EOF
You can’t perform that action at this time.
0 commit comments