Hello community, here is the log from the commit of package lxdm for openSUSE:Factory checked in at Wed Feb 24 02:18:06 CET 2010. -------- --- lxdm/lxdm.changes 2010-01-24 17:25:51.000000000 +0100 +++ /mounts/work_src_done/STABLE/lxdm/lxdm.changes 2010-02-12 11:40:32.000000000 +0100 @@ -1,0 +2,36 @@ +Fri Feb 12 10:00:57 UTC 2010 - andrea@opensuse.org + +- added lxdm-stderr_stdout_log.patch to log into /var/log/lxdm + all lxdm messages that was showed into tty1 + +------------------------------------------------------------------- +Thu Feb 11 10:00:27 UTC 2010 - andrea@opensuse.org + +- removed patches now into upstream code: lxdm-Xsession.patch + and lxdm-libexec.patch +- lxde moved to git, change version according to it + +------------------------------------------------------------------- +Tue Feb 9 17:17:03 UTC 2010 - andrea@opensuse.org + +- removed lxdmconf, it's now a separeted package + +------------------------------------------------------------------- +Sat Feb 6 00:43:46 UTC 2010 - andrea@opensuse.org + +- added lxdmconf configuration tool + +------------------------------------------------------------------- +Thu Feb 4 16:35:47 UTC 2010 - andrea@opensuse.org + +- fixed libexecdir path + +------------------------------------------------------------------- +Wed Feb 3 22:15:17 UTC 2010 - andrea@opensuse.org + +- new svn version 0.2.0svn2326 that adds theming support and + several bugfix and new features like theme support +- removed "lxdm-0.1.0-switch-to-old-tty.patch" +- all patched ported to apply on new changes + +------------------------------------------------------------------- @@ -20 +56 @@ - not it LXDM reads autologin users and + now LXDM reads autologin users and calling whatdependson for head-i586 Old: ---- lxdm-0.1.0-Xsession.patch lxdm-0.1.0-background.patch lxdm-0.1.0-iso_codes-path.patch lxdm-0.1.0-pam.patch lxdm-0.1.0-switch-to-old-tty.patch lxdm-0.1.0-use-sysconfig.patch lxdm-0.1.0.tar.bz2 New: ---- lxdm-background.patch lxdm-iso_codes-path.patch lxdm-pam.patch lxdm-stderr_stdout_log.patch lxdm-use-sysconfig.patch lxdm.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxdm.spec ++++++ --- /var/tmp/diff_new_pack.R7mEjK/_old 2010-02-24 02:17:47.000000000 +0100 +++ /var/tmp/diff_new_pack.R7mEjK/_new 2010-02-24 02:17:47.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package lxdm (Version 0.1.0) +# spec file for package lxdm (Version 0.2.0git20100211) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,29 +20,27 @@ Name: lxdm Summary: LXDE Display Manager -Version: 0.1.0 -Release: 2 +Version: 0.2.0git20100211 +Release: 1 License: GPLv2 and LGPLv2 Group: System/X11/Displaymanagers Url: http://lxde.org/ -Source0: %{name}-%{version}.tar.bz2 +Source0: %{name}.tar.bz2 Source1: README.SUSE -Patch0: %{name}-0.1.0-background.patch -Patch1: %{name}-0.1.0-Xsession.patch -Patch2: %{name}-0.1.0-pam.patch -Patch3: %{name}-0.1.0-iso_codes-path.patch -# PATCH-FEATURE-OPENSUSE lxdm-0.1.0-use-sysconfig.patch andrea@opensuse.org +Patch0: %{name}-background.patch +Patch1: %{name}-pam.patch +Patch2: %{name}-iso_codes-path.patch +# PATCH-FEATURE-OPENSUSE lxdm-use-sysconfig.patch andrea@opensuse.org # this patch allow lxdm to read system settings from /etc/sysconfig -Patch4: %{name}-0.1.0-use-sysconfig.patch -# PATCH-FEATURE-UPSTREAM lxdm-0.1.0-switch-to-old-tty.patch andrea@opensuse.org -# this patch allow lxdm to switch to tty1 on shutdown -Patch5: %{name}-0.1.0-switch-to-old-tty.patch +Patch3: %{name}-use-sysconfig.patch +Patch4: %{name}-stderr_stdout_log.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf automake gcc gcc-c++ gettext-tools make BuildRequires: ConsoleKit-devel gettext-runtime gtk2-devel intltool -BuildRequires: fdupes pam-devel pkg-config +BuildRequires: fdupes iso-codes-devel pam-devel pkg-config Requires: desktop-data-openSUSE Requires: pam +Recommends: lxdm-conf %description LXDM is the future display manager of LXDE, the Lightweight X11 Desktop @@ -50,30 +48,32 @@ KDM in LXDE distros. %prep -%setup -q +%setup -q -n %name %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %__cp %{SOURCE1} . %build -autoreconf -fi +./autogen.sh %configure %__make %{?jobs:-j%{jobs}} %install %makeinstall -%__rm %buildroot%{_bindir}/lxdm -ln -sf %_bindir/lxdm-binary %buildroot%{_bindir}/lxdm +%__mkdir_p %buildroot/%_bindir +%__rm %buildroot/%_sbindir/lxdm +%__rm -rf %buildroot/%_datadir/locale/frp +ln -sf %_sbindir/lxdm-binary %buildroot%_bindir/lxdm %fdupes %buildroot%{_datadir} %find_lang %{name} %__mkdir_p %buildroot/%{_localstatedir}/run touch %buildroot/%{_localstatedir}/run/%name.pid %clean + %__rm -rf %buildroot %files -f %{name}.lang @@ -83,8 +83,8 @@ %{_datadir}/lxdm/* %dir %{_sysconfdir}/lxdm/ %{_bindir}/lxdm -%{_bindir}/lxdm-binary -%{_bindir}/lxdm-greeter-gtk +%{_sbindir}/lxdm-binary +%{_libexecdir}/lxdm-greeter-gtk %config(noreplace) %{_sysconfdir}/lxdm/Xsession %config(noreplace) %{_sysconfdir}/lxdm/lxdm.conf %config(noreplace) %{_sysconfdir}/pam.d/lxdm ++++++ README.SUSE ++++++ --- /var/tmp/diff_new_pack.R7mEjK/_old 2010-02-24 02:17:47.000000000 +0100 +++ /var/tmp/diff_new_pack.R7mEjK/_new 2010-02-24 02:17:47.000000000 +0100 @@ -4,7 +4,7 @@ "autologin" and "session" are not available into /etc/lxdm/lxdm.conf -even if added on that conf file they will be skypped. +even if added on that conf file they will be ignored. In order to modify such values, please use "yast sysconfig" or manually edit: @@ -17,8 +17,6 @@ to choose default session: -to enable autologin: - /etc/sysconfig/windowmanager value DEFAULT_WM ++++++ lxdm-background.patch ++++++ diff -uNr old-lxdm//data/lxdm.conf.in lxdm/data/lxdm.conf.in --- old-lxdm//data/lxdm.conf.in 2010-01-26 20:03:32.000000000 +0100 +++ lxdm/data/lxdm.conf.in 2010-02-03 22:57:49.296834920 +0100 @@ -9,7 +9,7 @@ [display] gtk_theme=Clearlooks -bg=/usr/share/backgrounds/default.png +bg=/usr/share/wallpapers/default-1600x1200.png bottom_pane=1 lang=1 theme=Industrial ++++++ lxdm-iso_codes-path.patch ++++++ diff -uNr old-lxdm//src/gdm/gdm-languages.c lxdm/src/gdm/gdm-languages.c --- old-lxdm//src/gdm/gdm-languages.c 2010-02-03 23:01:45.343833701 +0100 +++ lxdm/src/gdm/gdm-languages.c 2010-02-03 23:02:44.087836232 +0100 @@ -47,8 +47,9 @@ #define ALIASES_FILE LIBLOCALEDIR "/locale.alias" #define ARCHIVE_FILE LIBLOCALEDIR "/locale-archive" -#define ISO_CODES_DATADIR ISO_CODES_PREFIX "/share/xml/iso-codes" -#define ISO_CODES_LOCALESDIR ISO_CODES_PREFIX "/share/locale" +//Hard code prefic on DATADIR waiting for a batter fix +#define ISO_CODES_DATADIR ISO_CODES_PREFIX "/share/xml/iso-codes" +#define ISO_CODES_LOCALESDIR ISO_CODES_PREFIX "/usr/share/locale" typedef struct _GdmLocale { char *id; ++++++ lxdm-pam.patch ++++++ diff -uNr old-lxdm//pam/lxdm lxdm/pam/lxdm --- old-lxdm//pam/lxdm 2010-02-03 23:00:44.940083434 +0100 +++ lxdm/pam/lxdm 2010-02-03 23:01:30.585083430 +0100 @@ -1,7 +1,8 @@ #%PAM-1.0 -auth include system-auth -account include system-auth -session optional pam_keyinit.so force revoke -session include system-auth -session required pam_loginuid.so -session optional pam_console.so +auth include common-auth +account include common-account +password include common-password +session optional pam_keyinit.so force revoke +session required pam_loginuid.so +session include common-session + ++++++ lxdm-stderr_stdout_log.patch ++++++ diff -uNrp old-lxdm//src/lxdm.c lxdm/src/lxdm.c --- old-lxdm//src/lxdm.c 2010-02-12 13:17:20.723873501 +0100 +++ lxdm/src/lxdm.c 2010-02-12 13:19:00.460873911 +0100 @@ -222,16 +222,30 @@ void lxdm_quit_self(void) exit(0); } +void log_clear(void) +{ + FILE *log; + log=fopen("/var/log/lxdm.log","w"); + if(!log) + return; + fclose(log); +} + void log_print(char *fmt, ...) { FILE *log; va_list ap; log = fopen("/var/log/lxdm.log", "a"); if(!log) return; + va_start(ap, fmt); vfprintf(log, fmt, ap); va_end(ap); fclose(log); + log=freopen("/var/log/lxdm.log","a",stdout); + setvbuf(stdout, NULL, _IOLBF, BUFSIZ); + ("/var/log/lxdm.log","a",stderr); + setvbuf(stderr, NULL, _IONBF, BUFSIZ); } GSList *do_scan_xsessions(void) @@ -593,6 +607,7 @@ void startx(void) if( !getenv("DISPLAY") ) putenv("DISPLAY=:0"); + log_print("%s\n","start X"); create_server_auth(); arg = g_key_file_get_string(config, "server", "arg", 0); @@ -606,6 +621,8 @@ void startx(void) { case 0: setpgid( 0, getpid() ); + // required to catch output + log_print("%s\n", "lxdm forked"); execvp(args[0], args); break; case -1: @@ -1058,6 +1075,7 @@ int main(int arc, char *arg[]) set_signal(); lxdm_get_tty(); + log_clear(); startx(); for( tmp = 0; tmp < 200; tmp++ ) ++++++ lxdm-use-sysconfig.patch ++++++ diff -uNrp lxdm/data/lxdm.conf.in new-lxdm//data/lxdm.conf.in --- lxdm/data/lxdm.conf.in 2010-02-07 00:07:11.000000000 +0100 +++ new-lxdm//data/lxdm.conf.in 2010-02-12 10:47:12.381111877 +0100 @@ -1,6 +1,4 @@ [base] -# autologin=dgod -# session=/usr/bin/startlxde # numlock=0 greeter=@libexecdir@/lxdm-greeter-gtk diff -uNrp lxdm/src/gdm/gdm-sysconfig.c new-lxdm//src/gdm/gdm-sysconfig.c --- lxdm/src/gdm/gdm-sysconfig.c 1970-01-01 01:00:00.000000000 +0100 +++ new-lxdm//src/gdm/gdm-sysconfig.c 2010-02-12 10:47:12.383111364 +0100 @@ -0,0 +1,439 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +/* Parser for shell-script-like key-value files. Far from complete, but + * deals with a couple of common shell oddities. For instance, the following + * are parsed correctly: + * + * KEY=value\0 + * KEY = value#comment\0 + * KEY = " value with spaces" \0 + * KEY = ' it\'s a value with "embedded" quotes'\0 + * KEY = "if quotes aren't closed, we assume the string ends at EOL\0 + * + * It should be good enough for the config files in /etc/sysconfig/. + */ + +#include "config.h" + +#include <unistd.h> +#include <string.h> + +#include <glib.h> +#include <glib/gi18n.h> + +#include "gdm-sysconfig.h" + +#define SPACE_CHARS " \t" +#define KEY_ALLOW_CHARS "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +static gchar ** +load_settings_file (const gchar *file_name) +{ + GIOChannel *channel; + GPtrArray *lines; + gchar *str; + + g_debug ("Loading settings from %s", file_name); + + channel = g_io_channel_new_file (file_name, "r", NULL); + if (!channel) { + g_debug ("Failed to open %s", file_name); + return NULL; + } + + lines = g_ptr_array_new (); + + while (g_io_channel_read_line (channel, &str, NULL, NULL, NULL) != G_IO_STATUS_EOF) { + if (str) { + gchar *p0; + + /* Remove line separators */ + + for (p0 = str + strlen (str) - 1; p0 >= str && strchr ("\r\n", *p0); p0--) + *p0 = '\0'; + + g_ptr_array_add (lines, str); + g_debug ("%s", str); + } else { + g_ptr_array_add (lines, g_strdup ("")); + g_debug ("", str); + } + } + + g_io_channel_shutdown (channel, FALSE, NULL); + g_io_channel_unref (channel); + + g_ptr_array_add (lines, NULL); + + return (gchar **) g_ptr_array_free (lines, FALSE); +} + +static gboolean +save_settings_file (const gchar *file_name, gchar **lines) +{ + GIOStatus last_status = G_IO_STATUS_ERROR; + GIOChannel *channel = NULL; + gchar *temp_file_name; + gint i; + + temp_file_name = g_strdup_printf ("%s.new.%u", file_name, g_random_int ()); + + channel = g_io_channel_new_file (temp_file_name, "w", NULL); + if (!channel) + goto out; + + if (!lines) + goto out; + + for (i = 0; lines [i]; i++) { + gsize bytes_written; + + if (lines [i] [0] != '\0') + last_status = g_io_channel_write_chars (channel, + lines [i], strlen (lines [i]), + &bytes_written, + NULL); + + if (last_status != G_IO_STATUS_NORMAL) + break; + + last_status = g_io_channel_write_unichar (channel, '\n', NULL); + + if (last_status != G_IO_STATUS_NORMAL) + break; + } + +out: + if (channel) { + g_io_channel_shutdown (channel, FALSE, NULL); + g_io_channel_unref (channel); + } + + if (last_status == G_IO_STATUS_NORMAL && g_rename (temp_file_name, file_name) != 0) + last_status = G_IO_STATUS_ERROR; + + g_free (temp_file_name); + return last_status == G_IO_STATUS_NORMAL ? TRUE : FALSE; +} + +static const gchar * +skip_from_start_to_key (const gchar *line) +{ + const gchar *p0; + + /* Skip initial space */ + + p0 = line + strspn (line, SPACE_CHARS); + + /* Ignore comments and other junk */ + + if (*p0 && strchr (KEY_ALLOW_CHARS, *p0)) + return p0; + + return NULL; +} + +static const gchar * +skip_from_start_to_value_of_key (const gchar *line, const gchar *key_normal, gint key_len) +{ + const gchar *p0, *p1; + gchar *potential_key_normal; + gboolean result; + + p0 = skip_from_start_to_key (line); + if (!p0) + return NULL; + + /* There's at least one key-like character, figure out how many */ + + p1 = p0 + strspn (p0, KEY_ALLOW_CHARS); + + /* Is this the key we're looking for? */ + + if (p1 - p0 != key_len) + return NULL; + + potential_key_normal = g_ascii_strdown (p0, p1 - p0); + result = strcmp (key_normal, potential_key_normal) == 0 ? TRUE : FALSE; + g_free (potential_key_normal); + + if (!result) + return NULL; + + /* It's the right key; skip over key-value separator */ + + p0 = p1 + strspn (p1, SPACE_CHARS); + if (*p0 != '=') + return NULL; + + p0++; + p0 += strspn (p0, SPACE_CHARS); + + return p0; +} + +static const gchar * +skip_over_value (const gchar *value_start, gchar *quotes_out) +{ + const gchar *p0 = value_start; + const gchar *p1; + gchar quotes; + + /* Is the value quoted? */ + + quotes = *p0; + if (quotes == '\'' || quotes == '"') { + /* Quoted sequence opened; find closing quote, but skip over escaped ones. If + * there's no closing quote on this line, assume the EOL closes it. */ + + *quotes_out = quotes; + + p1 = p0; + do { + p1++; + p1 = strchr (p1, quotes); + if (!p1) { + /* Hit EOL */ + + p1 = p0 + strlen (p0) - 1; + break; + } + } while (*(p1 - 1) == '\\'); + } else { + /* No quotes; look for comment or EOL */ + + *quotes_out = 0; + + p1 = strchr (p0, '#'); + if (!p1) + p1 = p0 + strlen (p0); + + for (p1--; p1 >= p0; p1--) + if (!strchr (SPACE_CHARS, *p1)) + break; + } + + return p1 + 1; +} + +static gchar * +get_value_of_key (const gchar *line, const gchar *key_normal, gint key_len) +{ + const gchar *p0, *p1; + gchar quotes; + gchar *value; + gchar *temp; + + p0 = skip_from_start_to_value_of_key (line, key_normal, key_len); + if (!p0) + return NULL; + + p1 = skip_over_value (p0, "es); + + if (quotes != 0) { + if (p1 - p0 > 2) { + temp = g_strndup (p0 + 1, p1 - p0 - 2); + value = g_strcompress (temp); + g_free (temp); + } else { + value = g_strdup (""); + } + } else { + temp = g_strndup (p0, p1 - p0); + value = g_strcompress (temp); + g_free (temp); + g_strchomp (value); + } + + return value; +} + +static gchar * +get_value (const gchar **lines, const gchar *key) +{ + gchar *value = NULL; + gchar *key_normal; + gint key_len; + gint i; + + g_debug ("Getting value of %s", key); + + if (!lines) { + g_debug ("Missing configuration data"); + return NULL; + } + + key_normal = g_ascii_strdown (key, -1); + key_len = strlen (key_normal); + + for (i = 0; lines [i]; i++) { + value = get_value_of_key (lines [i], key_normal, key_len); + if (value) + break; + } + + g_free (key_normal); + + g_debug ("Got value of %s: %s", key, value); + + return value; +} + +static gchar * +set_value_of_key (const gchar *line, const gchar *key_normal, gint key_len, const gchar *key, const gchar *value) +{ + const gchar *p0, *p1, *p2; + gchar quotes; + gchar *escaped_value; + gint escaped_value_len; + gchar *new_line; + gint len; + + p0 = skip_from_start_to_value_of_key (line, key_normal, key_len); + if (!p0) + return NULL; + + escaped_value = g_strescape (value, ""); + escaped_value_len = strlen (escaped_value); + + p1 = skip_over_value (p0, "es); + p2 = p1 + strlen (p1); + len = (p0 - line) + escaped_value_len + (p2 - p1); + + new_line = g_malloc (len + 1); + memcpy (new_line, line, p0 - line); + memcpy (new_line + (p0 - line), escaped_value, escaped_value_len); + memcpy (new_line + (p0 - line) + escaped_value_len, p1, p2 - p1); + + *(new_line + len - 1) = '\0'; + + g_free (escaped_value); + + return new_line; +} + +static gboolean +set_value (gchar **lines, const gchar *key, const gchar *value) +{ + gboolean result = FALSE; + gchar *key_normal; + gint key_len; + gint i; + + if (!lines) + return FALSE; + + key_normal = g_ascii_strdown (key, -1); + key_len = strlen (key_normal); + + for (i = 0; lines [i]; i++) { + gchar *new_line; + + new_line = set_value_of_key (lines [i], key_normal, key_len, key, value); + if (new_line) { + g_free (lines [i]); + lines [i] = new_line; + result = TRUE; + break; + } + } + + g_free (key_normal); + + return result; +} + +gchar ** +gdm_sysconfig_load_file (const gchar *file_name) +{ + g_return_val_if_fail (file_name != NULL, NULL); + + return load_settings_file (file_name); +} + +gboolean +gdm_sysconfig_save_file (const gchar *file_name, const gchar **sysconfig) +{ + g_return_val_if_fail (file_name != NULL, FALSE); + g_return_val_if_fail (sysconfig != NULL, FALSE); + + return save_settings_file (file_name, sysconfig); +} + +gchar * +gdm_sysconfig_get_value (const gchar **sysconfig, const gchar *key) +{ + g_return_val_if_fail (sysconfig != NULL, NULL); + g_return_val_if_fail (key != NULL, NULL); + + return get_value (sysconfig, key); +} + +gboolean +gdm_sysconfig_set_value (gchar **sysconfig, const gchar *key, const gchar *value) +{ + g_return_val_if_fail (sysconfig != NULL, FALSE); + g_return_val_if_fail (key != NULL, FALSE); + g_return_val_if_fail (value != NULL, FALSE); + + return set_value (sysconfig, key, value); +} + +gchar * +gdm_sysconfig_load_value (const gchar *file_name, const gchar *key) +{ + gchar **lines; + gchar *value; + + g_return_val_if_fail (file_name != NULL, NULL); + g_return_val_if_fail (key != NULL, NULL); + + lines = load_settings_file (file_name); + if (!lines) + return NULL; + + value = get_value (lines, key); + + g_strfreev (lines); + return value; +} + +gboolean +gdm_sysconfig_save_value (const gchar *file_name, const gchar *key, const gchar *value) +{ + gchar **lines; + gboolean result; + + g_return_val_if_fail (file_name != NULL, FALSE); + g_return_val_if_fail (key != NULL, FALSE); + g_return_val_if_fail (value != NULL, FALSE); + + lines = load_settings_file (file_name); + if (!lines) + return FALSE; + + result = set_value (lines, key, value); + if (result) + result = save_settings_file (file_name, lines); + + g_strfreev (lines); + return result; +} diff -uNrp lxdm/src/gdm/gdm-sysconfig.h new-lxdm//src/gdm/gdm-sysconfig.h --- lxdm/src/gdm/gdm-sysconfig.h 1970-01-01 01:00:00.000000000 +0100 +++ new-lxdm//src/gdm/gdm-sysconfig.h 2010-02-12 10:47:12.389362789 +0100 @@ -0,0 +1,41 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + + +#ifndef __GDM_SYSCONFIG_H +#define __GDM_SYSCONFIG_H + +#include <glib-object.h> +#include <glib/gstdio.h> + +G_BEGIN_DECLS + +gchar **gdm_sysconfig_load_file (const gchar *file_name); +gboolean gdm_sysconfig_save_file (const gchar *file_name, const gchar **sysconfig); + +gchar *gdm_sysconfig_get_value (const gchar **sysconfig, const gchar *key); +gboolean gdm_sysconfig_set_value (gchar **sysconfig, const gchar *key, const gchar *value); + +gchar *gdm_sysconfig_load_value (const gchar *file_name, const gchar *key); +gboolean gdm_sysconfig_save_value (const gchar *file_name, const gchar *key, const gchar *value); + +G_END_DECLS + +#endif /* __GDM_SYSCONFIG_H */ diff -uNrp lxdm/src/lxdm.c new-lxdm//src/lxdm.c --- lxdm/src/lxdm.c 2010-02-07 11:59:47.000000000 +0100 +++ new-lxdm//src/lxdm.c 2010-02-12 10:47:12.391111965 +0100 @@ -70,6 +70,14 @@ #include "lxdm.h" +#include "gdm/gdm-sysconfig.h" + +#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN" +#define SYSCONFIG_AUTOLOGIN_FILE "/etc/sysconfig/displaymanager" + +#define SYSCONFIG_SESSION_KEY "DEFAULT_WM" +#define SYSCONFIG_SESSION_FILE "/etc/sysconfig/windowmanager" + GKeyFile *config; static pid_t server; #if HAVE_LIBCK_CONNECTOR @@ -757,7 +765,7 @@ gboolean lxdm_get_session_info(char *ses char *name=NULL,*exec=NULL; if(!session || !session[0]) { - name=g_key_file_get_string(config, "base", "session", 0); + name=gdm_sysconfig_load_value(SYSCONFIG_SESSION_FILE, SYSCONFIG_SESSION_KEY); if(!name && getenv("PREFERRED")) name = g_strdup(getenv("PREFERRED")); if(!session && getenv("DESKTOP")) @@ -795,7 +803,7 @@ gboolean lxdm_get_session_info(char *ses if(!strcmp(name,"LXDE")) exec = g_strdup("startlxde"); else if( !strcmp(name, "GNOME") ) - exec = g_strdup("gnome-session"); + exec = g_strdup("gnome"); else if( !strcmp(name, "KDE") ) exec = g_strdup("startkde"); else if( !strcmp(name, "XFCE") ) @@ -885,7 +893,7 @@ void lxdm_do_login(struct passwd *pw, ch #if 0 if( !session || !session[0] ) /* this means use default session */ - session = g_key_file_get_string(config, "base", "session", 0); + session = gdm_sysconfig_load_value(SYSCONFIG_SESSION_FILE, SYSCONFIG_SESSION_KEY); if( !session && getenv("PREFERRED") ) session = g_strdup( getenv("PREFERRED") ); if( !session && getenv("DESKTOP") ) @@ -894,7 +902,7 @@ void lxdm_do_login(struct passwd *pw, ch if( !strcmp(p, "LXDE") ) session = g_find_program_in_path("startlxde"); else if( !strcmp(p, "GNOME") ) - session = g_find_program_in_path("gnome-session"); + session = g_find_program_in_path("gnome"); else if( !strcmp(p, "KDE") ) session = g_find_program_in_path("startkde"); else if( !strcmp(p, "XFCE") ) @@ -949,7 +957,7 @@ int lxdm_do_auto_login(void) struct passwd *pw; char *user; - user = g_key_file_get_string(config, "base", "autologin", 0); + user = gdm_sysconfig_load_value(SYSCONFIG_AUTOLOGIN_FILE, SYSCONFIG_AUTOLOGIN_KEY); if( !user ) return 0; if( AUTH_SUCCESS != lxdm_auth_user(user, 0, &pw) ) diff -uNrp lxdm/src/Makefile.am new-lxdm//src/Makefile.am --- lxdm/src/Makefile.am 2010-02-07 00:07:11.000000000 +0100 +++ new-lxdm//src/Makefile.am 2010-02-12 10:47:12.392111953 +0100 @@ -20,6 +20,7 @@ lxdm_binary_LDADD = \ lxdm_binary_SOURCES = \ lxdm.c lxdm.h \ ui.c \ + gdm/gdm-sysconfig.c gdm/gdm-sysconfig.h \ $(NULL) libexec_PROGRAMS = lxdm-greeter-gtk ++++++ lxdm-0.1.0.tar.bz2 -> lxdm.tar.bz2 ++++++ ++++ 30453 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org