Hello community,

here is the log from the commit of package lightdm for openSUSE:Factory
checked in at Mon Sep 5 16:38:06 CEST 2011.



--------
--- lightdm/lightdm.changes     2011-07-31 14:36:53.000000000 +0200
+++ lightdm/lightdm.changes     2011-09-03 14:39:52.000000000 +0200
@@ -1,0 +2,86 @@
+Sat Sep  3 12:27:28 UTC 2011 - [email protected]
+
+- add branding for lightdm-gtk-greeter
+
+-------------------------------------------------------------------
+Fri Sep  2 17:26:24 UTC 2011 - [email protected]
+
+- reworked lightdm-add-scripting-hooks.patch in order to match the
+  version committed upstream
+- added lightdm-set-gdmflexiserver-envvar.patch which sets the
+  GDMFLEXISERVER environment variable for the gdmflexiserver
+  wrapper
+- added lightdm-lock-screen-before-switch.patch in order to try
+  locking the screen before switching users
+- fixed usage of --libexecdir
+
+-------------------------------------------------------------------
+Sat Aug 27 20:49:21 UTC 2011 - [email protected]
+
+- use update-alternatives for selecting the default greeter
+
+-------------------------------------------------------------------
+Sat Aug 27 14:01:19 UTC 2011 - [email protected]
+
+- added lightdm-fix-underlinking.patch in order to fix an
+  underlinking issue with test-qt-greeter
+
+-------------------------------------------------------------------
+Thu Aug 25 08:56:38 UTC 2011 - [email protected]
+
+- Added proper Supplements for the greeters
+- remove version require for the greeters, 3rd party greeters
+  don't always follow the same version as lightdm
+
+-------------------------------------------------------------------
+Tue Aug 23 07:17:19 UTC 2011 - [email protected]
+
+- added lightdm-add-scripting-hooks.patch which implements
+  scripting hooks compatible with xdm/gdm (lp#602505)
+
+-------------------------------------------------------------------
+Mon Aug 22 20:51:09 UTC 2011 - [email protected]
+
+- update to verion 0.9.4
+  - lightdm-set-defaults enables tweaking the default session and
+    chosen greeter for lightdm
+  - move xsessions-directory and xgreeters-directory from
+    [SeatDefaults] to [LightDM].
+  - add AddSeat D-Bus method for adding dynamic seats
+  - added a dm-tool program that allows user switching and adding
+    seats
+  - allow remote X servers, e.g. launched using dm-tool
+    add-nested-seat
+  - don't allow autologin-username to be set to empty
+- removed obsolete lightdm-handle-empty-autologin-user.patch
+- package gdmflexiserver under libexecdir
+
+-------------------------------------------------------------------
+Mon Aug 22 18:51:01 UTC 2011 - [email protected]
+
+- added dbus-glib-1 as build requires to fix pkgconfig dependencies
+
+-------------------------------------------------------------------
+Mon Aug 22 12:32:53 UTC 2011 - [email protected]
+
+- fixed typo
+- removed dependency of lightdm-gobject-devel on lightdm
+- removed stale dependency of lightdm-gtk-greeter on gtk2
+
+-------------------------------------------------------------------
+Thu Aug 11 16:11:52 UTC 2011 - [email protected]
+
+- update to version 0.9.3
+  - unlock ConsoleKit sessions when switching to them
+  - add a gdmflexiserver binary that provides backwards
+    compatibility with existing sessions
+  - set XDG_SEAT_PATH and XDG_SESSION_PATH environment variables
+    for sessions
+  - always set XAUTHORITY environment variable so sudo keeps
+    accessing the correct X authority
+  - connect up lightdm_user_get_logged_in in liblightdm-gobject
+  - ignore sessions that fail TryExec or are hidden
+  - add missing home_directory User property missing in Vala
+    bindings
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  lightdm-0.9.2.tar.gz
  lightdm-handle-empty-autologin-user.patch

New:
----
  lightdm-0.9.4.tar.gz
  lightdm-add-scripting-hooks.patch
  lightdm-fix-underlinking.patch
  lightdm-lock-screen-before-switch.patch
  lightdm-set-gdmflexiserver-envvar.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lightdm.spec ++++++
--- /var/tmp/diff_new_pack.azIsdR/_old  2011-09-05 16:37:09.000000000 +0200
+++ /var/tmp/diff_new_pack.azIsdR/_new  2011-09-05 16:37:09.000000000 +0200
@@ -23,7 +23,7 @@
 %define qt_lib          lib%{qt_libname}-0
 
 Name:           lightdm
-Version:        0.9.2
+Version:        0.9.4
 Release:        1
 Summary:        Lightweight, Cross-desktop Display Manager
 Group:          System/X11/Displaymanagers
@@ -33,16 +33,23 @@
 Source1:        %{name}.pamd
 Source2:        %{name}-autologin.pamd
 Source100:      %{name}-rpmlintrc
-# PATCH-FEATURE-OPENSUSE lightdm-default-configuration.patch [email protected] 
-- Modifies configuration with suitable defaults for openSUSE
-Patch0:         lightdm-default-configuration.patch
+# PATCH-FEATURE-UPSTREAM lightdm-add-scripting-hooks.patch lp#602505 
[email protected] -- Implements scripting hooks compatible with xdm/gdm
+Patch0:         lightdm-add-scripting-hooks.patch
 # PATCH-FEATURE-OPENSUSE lightdm-sysconfig-support.patch [email protected] -- 
Adds support for reading configuration options from 
/etc/sysconfig/displaymanager and /etc/sysconfig/windowmanager
 Patch1:         lightdm-sysconfig-support.patch
 # PATCH-FEATURE-OPENSUSE lightdm-xauthlocalhostname-support.patch 
[email protected] -- Set XAUTHLOCALHOSTNAME to localhost for local logins to 
avoid issues in the session in case the hostname changes
 Patch2:         lightdm-xauthlocalhostname-support.patch
 # PATCH-FEATURE-OPENSUSE lightdm-desktop-session-env-pam.patch 
[email protected] -- Sets a PAM environment variable to let the pam 
gnome-keyring module know which session is started
 Patch3:         lightdm-desktop-session-env-pam.patch
-# PATCH-FIX-UPSTREAM lightdm-handle-empty-autologin-user.patch 
[email protected] -- Prevent auto-login as nobody when autologin-user or 
DISPLAYMANAGER_AUTOLOGIN are set to an empty string
-Patch4:         lightdm-handle-empty-autologin-user.patch
+# PATCH-FEATURE-OPENSUSE lightdm-set-gdmflexiserver-envvar.patch 
[email protected] -- Sets the GDMFLEXISERVER environment variable for the 
gdmflexiserver wrapper
+Patch4:         lightdm-set-gdmflexiserver-envvar.patch
+# PATCH-FEATURE-OPENSUSE lightdm-default-configuration.patch [email protected] 
-- Modifies configuration with suitable defaults for openSUSE
+Patch5:         lightdm-default-configuration.patch
+# PATCH-FIX-UPSTREAM lightdm-fix-underlinking.patch lp#835465 
[email protected] -- Fixes an underlinking issue with test-qt-greeter
+Patch6:         lightdm-fix-underlinking.patch
+# PATCH-FIX-UPSTREAM lightdm-lock-screen-before-switch.patch [email protected] 
-- Try to lock the screen before switching users
+Patch7:         lightdm-lock-screen-before-switch.patch
+
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(xcb)
 BuildRequires:  pkgconfig(xdmcp)
@@ -51,6 +58,7 @@
 BuildRequires:  pkgconfig(QtGui)
 BuildRequires:  pkgconfig(gtk+-3.0)
 BuildRequires:  pkgconfig(gobject-introspection-1.0)
+BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  gcc-c++
 BuildRequires:  vala
 BuildRequires:  pam-devel
@@ -58,7 +66,9 @@
 BuildRequires:  gtk-doc
 BuildRequires:  gnome-common
 Requires(pre):  pwdutils
-Requires:       lightdm-greeter = %{version}
+# 3rd party greeters don't have to follow
+# the same versioning of lightdm
+Requires:       lightdm-greeter
 Recommends:     %{name}-lang
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -70,6 +80,7 @@
 several toolkits such as Qt and GTK.
 
 
+
 %lang_package
 %package -n %{gobject_lib}
 
@@ -83,7 +94,6 @@
 
 Summary:        Development Files for %{gobject_lib}
 Group:          Development/Libraries/C and C++
-Requires:       %{name} = %{version}
 Requires:       %{gobject_lib} = %{version}
 
 %description gobject-devel
@@ -102,7 +112,6 @@
 
 Summary:        Development Files for %{qt_lib}
 Group:          Development/Libraries/C and C++
-Requires:       %{name} = %{version}
 Requires:       %{qt_lib} = %{version}
 
 %description qt-devel
@@ -113,20 +122,39 @@
 
 Summary:        GTK-based Greeter for LightDM
 Group:          System/X11/Displaymanagers
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
 Requires:       %{gobject_lib} = %{version}
-Requires:       gtk2 >= 2.24
+Requires:       %{name}-gtk-greeter-branding = %{version}
 Provides:       lightdm-greeter = %{version}
 
 %description gtk-greeter
 This is the reference implementation of a LightDM greeter based on the GTK
 toolkit.
 
+%package gtk-greeter-branding-upstream
+
+Summary:        Upstream branding of %{name}-gtk-greeter
+Group:          System/X11/Displaymanagers
+Requires:       %{name}-gtk-greeter = %{version}
+Provides:       %{name}-gtk-greeter-branding = %{version}
+Conflicts:      otherproviders(%{name}-gtk-greeter-branding)
+Supplements:    packageand(%{name}-gtk-greeter:branding-upstream)
+BuildArch:      noarch
+#BRAND: /etc/lightdm/lightdm-gtk-greeter.conf: Determines a number of greeter
+#BRAND: settings, in particular the background image.
+
+%description gtk-greeter-branding-upstream
+This package provides the upstream look and feel for the %{name}-gtk-greeter.
+
 %package qt-greeter
 
 Summary:        Qt-based Greeter for LightDM
 Group:          System/X11/Displaymanagers
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
 Requires:       %{qt_lib} = %{version}
-Provides:       liblightdm-greeter = %{version}
+Provides:       lightdm-greeter = %{version}
 
 %description qt-greeter
 This is the reference implementation of a LightDM greeter based on the Qt
@@ -139,13 +167,18 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 %build
 ./autogen.sh
 %configure \
+    --libexecdir=%{_libexecdir} \
     --disable-static \
     --enable-gtk-doc \
     --with-user-session=twm \
+    --with-greeter-session=lightdm-default-greeter \
     --with-greeter-user=lightdm
 make %{?_smp_mflags} V=1
 
@@ -158,6 +191,9 @@
 install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/lightdm
 install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/lightdm-autologin
 
+mv %{buildroot}%{_libexecdir}/lightdm-set-defaults \
+    %{buildroot}%{_libexecdir}/lightdm/lightdm-set-defaults
+
 install -d %{buildroot}%{_localstatedir}/log/lightdm
 install -d %{buildroot}%{_localstatedir}/run/lightdm
 install -d %{buildroot}%{_localstatedir}/lib/lightdm
@@ -181,10 +217,40 @@
 
 %postun -n %{qt_lib} -p /sbin/ldconfig
 
+%post qt-greeter
+/usr/sbin/update-alternatives --install \
+    %{_datadir}/xgreeters/lightdm-default-greeter.desktop \
+    lightdm-default-greeter.desktop \
+    %{_datadir}/xgreeters/lightdm-qt-greeter.desktop \
+    20
+
+%postun qt-greeter
+if [ $1 -eq 0 ]; then
+    /usr/sbin/update-alternatives --remove lightdm-default-greeter.desktop \
+        %{_datadir}/xgreeters/lightdm-qt-greeter.desktop
+fi
+
+%post gtk-greeter
+/usr/sbin/update-alternatives --install \
+    %{_datadir}/xgreeters/lightdm-default-greeter.desktop \
+    lightdm-default-greeter.desktop \
+    %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop \
+    20
+
+%postun gtk-greeter
+if [ $1 -eq 0 ]; then
+    /usr/sbin/update-alternatives --remove lightdm-default-greeter.desktop \
+        %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
+fi
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING ChangeLog NEWS README
+%{_bindir}/dm-tool
 %{_sbindir}/lightdm
+%dir %{_libexecdir}/lightdm/
+%{_libexecdir}/%{name}/lightdm-set-defaults
+%{_libexecdir}/%{name}/gdmflexiserver
 %dir %{_sysconfdir}/lightdm/
 %config %{_sysconfdir}/lightdm/lightdm.conf
 %config %{_sysconfdir}/lightdm/users.conf
@@ -227,14 +293,21 @@
 
 %files gtk-greeter
 %defattr(-,root,root,-)
-%config %{_sysconfdir}/lightdm/lightdm-gtk-greeter.conf
 %{_sbindir}/lightdm-gtk-greeter
 %{_datadir}/lightdm-gtk-greeter
 %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
+%ghost %attr(644,root,root) 
%{_datadir}/xgreeters/lightdm-default-greeter.desktop
+%ghost %attr(644,root,root) 
%{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
+
+%files gtk-greeter-branding-upstream
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/lightdm/lightdm-gtk-greeter.conf
 
 %files qt-greeter
 %defattr(-,root,root,-)
 %{_sbindir}/lightdm-qt-greeter
 %{_datadir}/xgreeters/lightdm-qt-greeter.desktop
+%ghost %attr(644,root,root) 
%{_datadir}/xgreeters/lightdm-default-greeter.desktop
+%ghost %attr(644,root,root) 
%{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
 
 %changelog

++++++ lightdm-0.9.2.tar.gz -> lightdm-0.9.4.tar.gz ++++++
++++ 26449 lines of diff (skipped)

++++++ lightdm-add-scripting-hooks.patch ++++++
# HG changeset patch
# Parent 68db418b62175b48f3976ce61149fe28b6e1e070
add scripting hooks for compatibility with xdm/gdm

diff --git a/data/lightdm.conf b/data/lightdm.conf
--- a/data/lightdm.conf
+++ b/data/lightdm.conf
@@ -41,6 +41,10 @@
 # allow-guest = True if guest login is allowed
 # guest-session = Session to load for guests (overrides user-session)
 # session-wrapper = Wrapper script to run session with
+# display-setup-script = Script to run when starting a greeter session (runs 
as root)
+# greeter-setup-script = Script to run when starting a greeter (runs as root)
+# session-setup-script = Script to run when starting a user session (runs as 
root)
+# session-cleanup-script = Script to run when quitting a user session (runs as 
root)
 # autologin-guest = True to log in as guest by default
 # autologin-user = User to log in with by default (overrides autologin-guest)
 # autologin-user-timeout = Number of seconds to wait before loading default 
user
@@ -59,6 +63,10 @@
 #allow-guest=true
 #guest-session=UNIMPLEMENTED
 #session-wrapper=lightdm-session
+#display-setup-script=
+#greeter-setup-script=
+#session-setup-script=
+#session-cleanup-script=
 #autologin-guest=false
 #autologin-user=
 #autologin-user-timeout=0
diff --git a/src/display.c b/src/display.c
--- a/src/display.c
+++ b/src/display.c
@@ -29,6 +29,7 @@ enum {
     SWITCH_TO_USER,
     SWITCH_TO_GUEST,
     GET_GUEST_USERNAME,
+    GREETER_STARTED,
     SESSION_CREATED,
     SESSION_STARTED,
     SESSION_STOPPED,
@@ -761,6 +762,7 @@ start_greeter_session (Display *display)
     if (result)
     {
         display->priv->indicated_ready = TRUE;
+        g_signal_emit (display, signals[GREETER_STARTED], 0);
         g_signal_emit (display, signals[READY], 0);
     }
 
@@ -1096,6 +1098,14 @@ display_class_init (DisplayClass *klass)
                       NULL,
                       ldm_marshal_STRING__VOID,
                       G_TYPE_STRING, 0);
+    signals[GREETER_STARTED] =
+        g_signal_new ("greeter-started",
+                      G_TYPE_FROM_CLASS (klass),
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (DisplayClass, greeter_started),
+                      NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
     signals[SESSION_CREATED] =
         g_signal_new ("session-created",
                       G_TYPE_FROM_CLASS (klass),
diff --git a/src/display.h b/src/display.h
--- a/src/display.h
+++ b/src/display.h
@@ -44,6 +44,7 @@ typedef struct
     gboolean (*switch_to_user)(Display *display, User *user);
     gboolean (*switch_to_guest)(Display *display);
     gchar *(*get_guest_username)(Display *display);
+    void (*greeter_started)(Display *display);
     void (*session_created)(Display *display, Session *session);
     void (*session_started)(Display *display);
     void (*session_stopped)(Display *display);
diff --git a/src/seat.c b/src/seat.c
--- a/src/seat.c
+++ b/src/seat.c
@@ -14,7 +14,8 @@
 
 #include "seat.h"
 #include "display.h"
-#include "xserver.h"
+#include "xserver.h" // FIXME: Shouldn't know if it's an xserver
+#include "xserver-local.h" // FIXME: Shouldn't know if it's an xserver
 #include "guest-account.h"
 
 enum {
@@ -231,19 +232,161 @@ display_get_guest_username_cb (Display *
     return g_strdup (seat->priv->guest_username);
 }
 
+static gboolean
+run_script (Display *display, const gchar *script_name, User *user)
+{
+    GPtrArray *env_array;
+    gchar **argv, **envp;
+    gchar *env, *command;
+    gint exit_status;
+    DisplayServer *display_server;
+    GError *error = NULL;
+
+    if (getuid () != 0)
+        return TRUE;
+
+    if (!(g_file_test (script_name, G_FILE_TEST_IS_REGULAR) &&
+          g_file_test (script_name, G_FILE_TEST_IS_EXECUTABLE)))
+    {
+        g_warning ("Could not execute %s", script_name);
+        return FALSE;
+    }
+
+    if (!g_shell_parse_argv (script_name, NULL, &argv, &error)) {
+        g_warning ("Could not parse %s: %s", script_name, error->message);
+        g_error_free (error);
+        return FALSE;
+    }
+
+    env_array = g_ptr_array_sized_new (10);
+    if (!env_array)
+        return FALSE;
+
+    g_ptr_array_add (env_array, g_strdup ("SHELL=/bin/sh"));
+    g_ptr_array_add (env_array, g_strdup 
("PATH=/usr/local/bin:/usr/bin:/bin"));
+
+    if (user)
+    {
+        g_ptr_array_add (env_array, g_strdup_printf ("USER=%s", user_get_name 
(user)));
+        g_ptr_array_add (env_array, g_strdup_printf ("USERNAME=%s", 
user_get_name (user)));
+        g_ptr_array_add (env_array, g_strdup_printf ("LOGNAME=%s", 
user_get_name (user)));
+        g_ptr_array_add (env_array, g_strdup_printf ("HOME=%s", 
user_get_home_directory (user)));
+    }
+    else
+    {
+        g_ptr_array_add (env_array, g_strdup ("HOME=/"));
+    }
+
+    display_server = display_get_display_server (display);
+    // FIXME: This should be done in a different layer
+    if (IS_XSERVER (display_server))
+    {
+        XServer *xserver = XSERVER (display_server);
+        gchar *hostname, *xauthority_path;
+
+        g_ptr_array_add (env_array, g_strdup_printf ("DISPLAY=%s", 
xserver_get_address (xserver)));
+
+        if (!IS_XSERVER_LOCAL (xserver) &&
+            (hostname = xserver_get_hostname (xserver)))
+        {
+            g_ptr_array_add (env_array, g_strdup_printf ("REMOTE_HOST=%s", 
hostname));
+            g_free (hostname);
+        }
+
+        if (IS_XSERVER_LOCAL (xserver) &&
+            (xauthority_path = xserver_local_get_authority_file_path 
(XSERVER_LOCAL (xserver))))
+        {
+            g_ptr_array_add (env_array, g_strdup_printf ("XAUTHORITY=%s", 
xauthority_path));
+            g_free (xauthority_path);
+        }
+    }
+
+    g_ptr_array_add (env_array, NULL);
+    envp = (gchar **) g_ptr_array_free (env_array, FALSE);
+
+    env = g_strjoinv (" ", envp);
+    command = g_strjoin (" ", env, script_name, NULL);
+    g_debug ("Executing script: %s", command);
+    g_free (env);
+    g_free (command);
+    if (!g_spawn_sync (NULL,
+                       argv,
+                       envp,
+                       G_SPAWN_SEARCH_PATH,
+                       NULL,
+                       NULL,
+                       NULL,
+                       NULL,
+                       &exit_status,
+                       &error))
+    {
+        g_warning ("Error executing %s: %s", script_name, error->message);
+        g_error_free (error);
+    }
+    g_strfreev (argv);
+    g_strfreev (envp);
+
+    if (WIFEXITED (exit_status)) {
+        g_debug ("Exit status of %s: %d", script_name, WEXITSTATUS 
(exit_status));
+        return WEXITSTATUS (exit_status) == EXIT_SUCCESS;
+    }
+
+    return FALSE;
+}
+
 static void
 display_ready_cb (Display *display, Seat *seat)
 {
+    const gchar *script;
+
+    /* Run setup script */
+    script = seat_get_string_property (seat, "display-setup-script");
+    if (script)
+        run_script (display, script, NULL);
+
     /* Switch to this new display */
     SEAT_GET_CLASS (seat)->set_active_display (seat, display);
 }
 
 static void
+display_greeter_started_cb (Display *display, Seat *seat)
+{
+    Session *session;
+    const gchar *script;
+
+    session = display_get_session (display);
+
+    script = seat_get_string_property (seat, "greeter-setup-script");
+    if (script)
+        run_script (display, script, session_get_user (session)); 
+}
+
+static void
+display_session_created_cb (Display *display, Seat *seat)
+{
+    Session *session;
+    const gchar *script;
+
+    session = display_get_session (display);
+
+    script = seat_get_string_property (seat, "session-setup-script");
+    if (script)
+        run_script (display, script, session_get_user (session));
+}
+
+static void
 display_session_stopped_cb (Display *display, Seat *seat)
 {
     Session *session;
+    const gchar *script;
 
     session = display_get_session (display);
+
+    /* Cleanup */
+    script = seat_get_string_property (seat, "session-cleanup-script");
+    if (script)
+        run_script (display, script, session_get_user (session));
+
     if (seat->priv->guest_username && strcmp (user_get_name (session_get_user 
(session)), seat->priv->guest_username) == 0)
     {
         guest_account_cleanup (seat->priv->guest_username);
@@ -325,6 +468,8 @@ switch_to_user_or_start_greeter (Seat *s
     g_signal_connect (new_display, "switch-to-guest", G_CALLBACK 
(display_switch_to_guest_cb), seat);
     g_signal_connect (new_display, "get-guest-username", G_CALLBACK 
(display_get_guest_username_cb), seat);
     g_signal_connect (new_display, "ready", G_CALLBACK (display_ready_cb), 
seat);
+    g_signal_connect (new_display, "greeter-started", G_CALLBACK 
(display_greeter_started_cb), seat);
+    g_signal_connect (new_display, "session-created", G_CALLBACK 
(display_session_created_cb), seat);
     g_signal_connect (new_display, "session-stopped", G_CALLBACK 
(display_session_stopped_cb), seat);
     g_signal_connect (new_display, "stopped", G_CALLBACK (display_stopped_cb), 
seat);
     display_set_greeter_session (new_display, seat_get_string_property (seat, 
"greeter-session"));
diff --git a/src/xserver-local.c b/src/xserver-local.c
--- a/src/xserver-local.c
+++ b/src/xserver-local.c
@@ -196,6 +196,15 @@ xserver_local_get_vt (XServerLocal *serv
     return server->priv->vt;
 }
 
+gchar *
+xserver_local_get_authority_file_path (XServerLocal *server)
+{
+    g_return_val_if_fail (server != NULL, 0);
+    if (server->priv->authority_file)
+        return g_file_get_path (server->priv->authority_file);
+    return NULL;
+}
+
 static gchar *
 get_absolute_command (const gchar *command)
 {
diff --git a/src/xserver-local.h b/src/xserver-local.h
--- a/src/xserver-local.h
+++ b/src/xserver-local.h
@@ -57,6 +57,8 @@ void xserver_local_set_xdmcp_key (XServe
 
 gint xserver_local_get_vt (XServerLocal *server);
 
+gchar *xserver_local_get_authority_file_path (XServerLocal *server);
+
 G_END_DECLS
 
 #endif /* _XSERVER_LOCAL_H_ */
++++++ lightdm-default-configuration.patch ++++++
--- /var/tmp/diff_new_pack.azIsdR/_old  2011-09-05 16:37:10.000000000 +0200
+++ /var/tmp/diff_new_pack.azIsdR/_new  2011-09-05 16:37:10.000000000 +0200
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent 01212b89b5009138462f18b2761afeff203d17f2
+# Parent de431b5b06f188b2d9f49724a5cac9f523a8b0f9
 openSUSE-specific default configuration
 
 diff --git a/data/lightdm.conf b/data/lightdm.conf
 --- a/data/lightdm.conf
 +++ b/data/lightdm.conf
-@@ -16,7 +16,7 @@
+@@ -45,7 +45,7 @@
  #greeter-user=lightdm
  #minimum-display-number=0
  #minimum-vt=7
@@ -14,7 +14,7 @@
  #guest-account-script=guest-account
  #log-directory=/var/log/lightdm
  #run-directory=/var/run/lightdm
-@@ -45,7 +45,7 @@
+@@ -78,7 +78,7 @@
  # autologin-session = Session to load for automatic login (overrides 
user-session)
  #
  [SeatDefaults]
@@ -23,12 +23,19 @@
  #xserver-layout=
  #xserver-config=
  #xdmcp-manager=
-@@ -58,7 +58,7 @@
+@@ -89,11 +89,11 @@
  #user-session=default
  #allow-guest=true
  #guest-session=UNIMPLEMENTED
 -#session-wrapper=lightdm-session
 +session-wrapper=/etc/X11/xdm/Xsession
+ #display-setup-script=
+-#greeter-setup-script=
+-#session-setup-script=
+-#session-cleanup-script=
++greeter-setup-script=/etc/X11/xdm/Xsetup
++session-setup-script=/etc/X11/xdm/Xstartup
++session-cleanup-script=/etc/X11/xdm/Xreset
  #autologin-guest=false
  #autologin-user=
  #autologin-user-timeout=0

++++++ lightdm-desktop-session-env-pam.patch ++++++
--- /var/tmp/diff_new_pack.azIsdR/_old  2011-09-05 16:37:10.000000000 +0200
+++ /var/tmp/diff_new_pack.azIsdR/_new  2011-09-05 16:37:10.000000000 +0200
@@ -1,40 +1,23 @@
 # HG changeset patch
-# Parent ee07a16ac75168b54e672ee1b5740e0358624c45
+# Parent 1d329005a5224b3b88546b87ec2221e5590b1149
+pass a DESKTOP_SESSION environment variable with the name of the selected 
session into the PAM environment
 
 diff --git a/src/display.c b/src/display.c
 --- a/src/display.c
 +++ b/src/display.c
-@@ -441,7 +441,7 @@ autologin_authentication_result_cb (PAMS
-     if (result == PAM_SUCCESS)
-     {
-         g_debug ("User %s authorized", pam_session_get_username 
(display->priv->pam_session));
--        pam_session_open (display->priv->pam_session);
-+        pam_session_open (display->priv->pam_session, 
display->priv->user_session);
-         started_session = start_user_session (display);
-         if (!started_session)
-             g_debug ("Failed to start autologin session");
-@@ -552,7 +552,7 @@ greeter_session_stopped_cb (Session *ses
-     {
-         display->priv->in_user_session = TRUE;
-         display->priv->pam_session = g_object_ref (greeter_get_pam_session 
(display->priv->greeter));
--        pam_session_open (display->priv->pam_session);
-+        pam_session_open (display->priv->pam_session, 
display->priv->user_session);
-         started_session = start_user_session (display);
-         if (!started_session)
-             g_debug ("Failed to start user session");
-@@ -750,7 +750,7 @@ start_greeter_session (Display *display)
-     }
-     display->priv->in_user_session = FALSE;
-     display->priv->pam_session = pam_session_new (display->priv->pam_service, 
user_get_name (user));
--    pam_session_open (display->priv->pam_session);
-+    pam_session_open (display->priv->pam_session, NULL);
-     g_object_unref (user);
+@@ -596,6 +596,8 @@ create_session (Display *display, PAMSes
+     session_set_is_greeter (session, is_greeter);
+     session_set_authentication (session, authentication);
+     session_set_command (session, command);
++    if (!is_greeter)
++        session_set_user_session_name (session, session_name);
  
-     log_dir = config_get_string (config_get_instance (), "LightDM", 
"log-directory");
+     process_set_env (PROCESS (session), "DESKTOP_SESSION", session_name); // 
FIXME: Apparently deprecated?
+     process_set_env (PROCESS (session), "GDMSESSION", session_name); // 
FIXME: Not cross-desktop
 diff --git a/src/pam-session.c b/src/pam-session.c
 --- a/src/pam-session.c
 +++ b/src/pam-session.c
-@@ -110,7 +110,7 @@ pam_session_get_is_authenticated (PAMSes
+@@ -113,7 +113,7 @@ pam_session_get_is_authenticated (PAMSes
  }
  
  gboolean
@@ -43,16 +26,14 @@
  {
      int result = PAM_SUCCESS;
  
-@@ -120,6 +120,16 @@ pam_session_open (PAMSession *session)
+@@ -123,6 +123,14 @@ pam_session_open (PAMSession *session)
  
      if (!passwd_file && getuid () == 0)
      {
 +        gchar *desktop_session;
 +
-+        if (session_name)
++        if (session_name && (desktop_session = g_strdup_printf 
("DESKTOP_SESSION=%s", session_name)))
 +        {
-+            desktop_session = g_strdup_printf ("DESKTOP_SESSION=%s", 
session_name);
-+            /* FIXME check desktop_session? */
 +            pam_putenv (session->priv->pam_handle, desktop_session);
 +            g_free (desktop_session);
 +        }
@@ -63,7 +44,7 @@
 diff --git a/src/pam-session.h b/src/pam-session.h
 --- a/src/pam-session.h
 +++ b/src/pam-session.h
-@@ -50,7 +50,7 @@ gboolean pam_session_authenticate (PAMSe
+@@ -52,7 +52,7 @@ gboolean pam_session_authenticate (PAMSe
  
  gboolean pam_session_get_is_authenticated (PAMSession *session);
  
@@ -72,3 +53,61 @@
  
  gboolean pam_session_get_in_session (PAMSession *session);
  
+diff --git a/src/session.c b/src/session.c
+--- a/src/session.c
++++ b/src/session.c
+@@ -25,6 +25,9 @@ struct SessionPrivate
+     /* Authentication for this session */
+     PAMSession *authentication;
+   
++    /* Name of the user session */
++    gchar *user_session_name;
++
+     /* Command to run for this session */
+     gchar *command;
+ 
+@@ -88,6 +91,21 @@ session_get_command (Session *session)
+     return session->priv->command;
+ }
+ 
++session_set_user_session_name (Session *session, const gchar 
*user_session_name)
++{
++    g_return_if_fail (session != NULL);
++
++    g_free (session->priv->user_session_name);
++    session->priv->user_session_name = g_strdup (user_session_name);
++}
++
++const gchar *
++session_get_user_session_name (Session *session)
++{
++    g_return_val_if_fail (session != NULL, NULL);
++    return session->priv->user_session_name;
++}
++
+ void
+ session_set_cookie (Session *session, const gchar *cookie)
+ {
+@@ -197,7 +215,7 @@ session_start (Session *session)
+ 
+     g_debug ("Launching session");
+ 
+-    pam_session_open (session->priv->authentication);
++    pam_session_open (session->priv->authentication, 
session->priv->user_session_name);
+ 
+     user = pam_session_get_user (session->priv->authentication);
+     process_set_env (PROCESS (session), "PATH", 
"/usr/local/bin:/usr/bin:/bin");
+diff --git a/src/session.h b/src/session.h
+--- a/src/session.h
++++ b/src/session.h
+@@ -55,6 +55,10 @@ void session_set_command (Session *sessi
+ 
+ const gchar *session_get_command (Session *session);
+ 
++void session_set_user_session_name (Session *session, const gchar 
*user_session_name);
++
++const gchar *session_get_user_session_name (Session *session);
++
+ void session_set_cookie (Session *session, const gchar *cookie);
+ 
+ const gchar *session_get_cookie (Session *session);

++++++ lightdm-fix-underlinking.patch ++++++
# HG changeset patch
# Parent a18ca4bf18b3649c54c157da91efaace5bcfd5d0
fix an underlinking issue with test-qt-greeter

diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am
--- a/tests/src/Makefile.am
+++ b/tests/src/Makefile.am
@@ -53,11 +53,13 @@ test-qt-greeter_moc.cpp: test-qt-greeter
 test_qt_greeter_SOURCES = test-qt-greeter.cpp test-qt-greeter.h 
test-qt-greeter_moc.cpp status.c status.h
 test_qt_greeter_CXXFLAGS = \
        -I$(top_srcdir)/liblightdm-qt \
-       $(LIGHTDM_QT_GREETER_CFLAGS)
+       $(LIGHTDM_QT_GREETER_CFLAGS) \
+       $(XCB_CFLAGS)
 test_qt_greeter_LDADD = \
        -L$(top_builddir)/liblightdm-qt \
        -llightdm-qt-1 \
-       $(LIGHTDM_QT_GREETER_LIBS)
+       $(LIGHTDM_QT_GREETER_LIBS) \
+       $(XCB_LIBS)
 
 test_session_SOURCES = test-session.c status.c status.h
 test_session_CFLAGS = \
++++++ lightdm-lock-screen-before-switch.patch ++++++
# HG changeset patch
# Parent 9b1573da6be87e6608fdc6807225ca87cdfc006a
try to lock the screen before switching users

diff --git a/utils/gdmflexiserver b/utils/gdmflexiserver
--- a/utils/gdmflexiserver
+++ b/utils/gdmflexiserver
@@ -9,9 +9,47 @@
 #
 # See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
 
+PATH=/usr/local/bin:/bin:/usr/bin
+export PATH
+
 if [ -z "$XDG_SEAT_PATH" ]; then
   # something went wrong
   exit 1
 fi
 
+find_command () {
+    cmd="$1"
+    oIFS="${IFS}"; IFS=:
+    set -- ${PATH}
+    IFS="${oIFS}"
+
+    for part; do
+        [ -x "${part}/${cmd}" ] && return 0
+    done
+    return 1
+}
+
+lock_screen () {
+    for lock_cmd in \
+        "xscreensaver-command -lock" \
+        "gnome-screensaver-command --lock" \
+        "dbus-send --session --dest=org.freedesktop.ScreenSaver 
--type=method_call /ScreenSaver org.freedesktop.ScreenSaver.Lock"
+    do
+        ${lock_cmd} >/dev/null 2>&1 && return
+    done
+
+    for lock_cmd in \
+        "slock" \
+        "xlock -mode blank"
+    do
+        set -- ${lock_cmd}
+        if find_command "$1"; then
+            ${lock_cmd} >/dev/null 2>&1 &
+            return
+        fi
+    done
+}
+
+lock_screen
+
 dbus-send --system --type=method_call --print-reply 
--dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH 
org.freedesktop.DisplayManager.Seat.SwitchToGreeter
++++++ lightdm-set-gdmflexiserver-envvar.patch ++++++
# HG changeset patch
# Parent 6f6ad13bc3f9a6ec6247851d548370f93bb4f601
set the GDMFLEXISERVER environment variable for the gdmflexiserver wrapper

diff --git a/src/session.c b/src/session.c
--- a/src/session.c
+++ b/src/session.c
@@ -223,6 +223,7 @@ session_start (Session *session)
     process_set_env (PROCESS (session), "USERNAME", user_get_name (user)); // 
FIXME: Is this required?
     process_set_env (PROCESS (session), "HOME", user_get_home_directory 
(user));
     process_set_env (PROCESS (session), "SHELL", user_get_shell (user));
+    process_set_env (PROCESS (session), "GDMFLEXISERVER", PKGLIBEXEC_DIR 
"/gdmflexiserver");
     set_env_from_authentication (session, session->priv->authentication);
 
     /* Insert our own utility directory to PATH
++++++ lightdm-sysconfig-support.patch ++++++
--- /var/tmp/diff_new_pack.azIsdR/_old  2011-09-05 16:37:10.000000000 +0200
+++ /var/tmp/diff_new_pack.azIsdR/_new  2011-09-05 16:37:10.000000000 +0200
@@ -49,7 +49,7 @@
 diff --git a/src/display.c b/src/display.c
 --- a/src/display.c
 +++ b/src/display.c
-@@ -966,7 +966,10 @@ static void
+@@ -1004,7 +1004,10 @@ static void
  display_init (Display *display)
  {
      display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, DISPLAY_TYPE, 
DisplayPrivate);
@@ -70,9 +70,9 @@
  #include "configuration.h"
 +#include "opensuse-sysconfig.h"
  #include "display-manager.h"
- #include "xserver.h"
- #include "user.h"
-@@ -53,6 +54,114 @@ typedef struct
+ #include "xdmcp-server.h"
+ #include "seat-xdmcp-session.h"
+@@ -55,6 +56,114 @@ typedef struct
  
  #define LDM_BUS_NAME "org.freedesktop.DisplayManager"
  
@@ -187,7 +187,7 @@
  static void
  log_cb (const gchar *log_domain, GLogLevelFlags log_level,
          const gchar *message, gpointer data)
-@@ -886,6 +995,9 @@ main (int argc, char **argv)
+@@ -985,6 +1094,9 @@ main (int argc, char **argv)
  
      loop = g_main_loop_new (NULL, FALSE);
  

++++++ lightdm-xauthlocalhostname-support.patch ++++++
--- /var/tmp/diff_new_pack.azIsdR/_old  2011-09-05 16:37:10.000000000 +0200
+++ /var/tmp/diff_new_pack.azIsdR/_new  2011-09-05 16:37:10.000000000 +0200
@@ -1,11 +1,22 @@
 # HG changeset patch
-# Parent 809135989727855e0efe09f0198856238c586e03
+# Parent fe8c7281c141b60c639196e03934595e0e8328b8
 set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the 
session in case the hostname changes
 
+diff --git a/src/seat.c b/src/seat.c
+--- a/src/seat.c
++++ b/src/seat.c
+@@ -297,6 +297,7 @@ run_script (Display *display, const gcha
+             (xauthority_path = xserver_local_get_authority_file_path 
(XSERVER_LOCAL (xserver))))
+         {
+             g_ptr_array_add (env_array, g_strdup_printf ("XAUTHORITY=%s", 
xauthority_path));
++            g_ptr_array_add (env_array, g_strdup 
("XAUTHLOCALHOSTNAME=localhost"));
+             g_free (xauthority_path);
+         }
+     }
 diff --git a/src/xserver-local.c b/src/xserver-local.c
 --- a/src/xserver-local.c
 +++ b/src/xserver-local.c
-@@ -336,7 +336,8 @@ xserver_local_start (DisplayServer *disp
+@@ -345,7 +345,8 @@ xserver_local_start (DisplayServer *disp
      XServerLocal *server = XSERVER_LOCAL (display_server);
      gboolean result;
      gchar *filename, *dir, *path, *absolute_command;
@@ -15,7 +26,7 @@
      GString *command;
      GError *error = NULL;
  
-@@ -380,7 +381,6 @@ xserver_local_start (DisplayServer *disp
+@@ -389,7 +390,6 @@ xserver_local_start (DisplayServer *disp
      if (server->priv->layout)
          g_string_append_printf (command, " -layout %s", server->priv->layout);
  


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to