File lightdm-fix-session-setup-script-env.patch of Package lightdm

# HG changeset patch
# Parent f537e458b1a5e1e92d5030bdc77dfc1540433c70
Put user information in the environment when running session-setup-script

diff --git a/src/seat.c b/src/seat.c
--- a/src/seat.c
+++ b/src/seat.c
@@ -470,12 +470,16 @@ static void
 run_session (Seat *seat, Session *session)
 {
     const gchar *script;
+    User *user = NULL;
 
     if (IS_GREETER (session))
         script = seat_get_string_property (seat, "greeter-setup-script");
     else
+    {
         script = seat_get_string_property (seat, "session-setup-script");
-    if (script && !run_script (seat, session_get_display_server (session), script, NULL))
+        user = session_get_user (session);
+    }
+    if (script && !run_script (seat, session_get_display_server (session), script, user))
     {
         l_debug (seat, "Switching to greeter due to failed setup script");
         switch_to_greeter_from_failed_session (seat, session);
openSUSE Build Service is sponsored by