summaryrefslogtreecommitdiff
path: root/x11/sddm/files/patch-data_scripts_Xsession
diff options
context:
space:
mode:
Diffstat (limited to 'x11/sddm/files/patch-data_scripts_Xsession')
-rw-r--r--x11/sddm/files/patch-data_scripts_Xsession23
1 files changed, 23 insertions, 0 deletions
diff --git a/x11/sddm/files/patch-data_scripts_Xsession b/x11/sddm/files/patch-data_scripts_Xsession
new file mode 100644
index 000000000000..1bf7e32f6683
--- /dev/null
+++ b/x11/sddm/files/patch-data_scripts_Xsession
@@ -0,0 +1,23 @@
+Fix use of "$@" (see sh(1)).
+
+There's no systemd on FreeBSD so start the session using $STARTUP which is
+defined in 90-consolekit if ConsoleKit2 is installed. By default this allows
+local users to shutdown/reboot the machine and access devices like USB keys.
+
+Also use dbus-run-session so libdbus doesn't have to autolauch the session bus
+daemon on first use. Autolaunched dbus daemons tend to linger and may only
+exit if the X server exits.
+
+--- data/scripts/Xsession.orig 2017-12-05 16:00:16 UTC
++++ data/scripts/Xsession
+@@ -94,8 +94,8 @@ if [ -f "$USERXSESSION" ]; then
+ . "$USERXSESSION"
+ fi
+
+-if [ -z "$@" ]; then
++if [ -z "$1" ]; then
+ exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ else
+- exec $@
++ exec $STARTUP /usr/bin/dbus-run-session --dbus-daemon=/usr/bin/dbus-daemon -- "$@"
+ fi