]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Merge mterrys changes to the PATH mangling for gdmflexiserver
authorRobert Ancell <robert.ancell@canonical.com>
Thu, 18 Aug 2011 00:11:39 +0000 (10:11 +1000)
committerRobert Ancell <robert.ancell@canonical.com>
Thu, 18 Aug 2011 00:11:39 +0000 (10:11 +1000)
87 files changed:
.bzrignore
Makefile.am
NEWS
configure.ac
data/lightdm.conf
greeters/gtk/lightdm-gtk-greeter.c
liblightdm-gobject/language.c
liblightdm-gobject/layout.c
liblightdm-gobject/session.c
liblightdm-gobject/user.c
po/POTFILES.in
po/ar.po
po/ast.po
po/be.po
po/bg.po
po/bs.po [new file with mode: 0644]
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en_AU.po
po/en_GB.po
po/eo.po
po/es.po
po/et.po
po/eu.po
po/fi.po
po/fr.po
po/gd.po [new file with mode: 0644]
po/gl.po
po/he.po
po/hr.po
po/hu.po
po/ia.po [new file with mode: 0644]
po/id.po
po/it.po
po/ja.po
po/kk.po
po/ko.po
po/lb.po
po/lt.po
po/ml.po
po/ms.po
po/nb.po
po/nl.po
po/oc.po [new file with mode: 0644]
po/pl.po
po/pt.po
po/pt_BR.po
po/ro.po
po/ru.po
po/sk.po
po/sl.po
po/sq.po
po/sr.po
po/sv.po
po/ta.po
po/te.po
po/th.po
po/tr.po
po/ug.po [new file with mode: 0644]
po/uk.po
po/vi.po
po/wae.po
po/zh_CN.po
po/zh_TW.po
src/Makefile.am
src/configuration.c
src/configuration.h
src/display-manager.c
src/display-manager.h
src/display.c
src/display.h
src/greeter.c
src/lightdm.c
src/seat-xlocal.c
src/seat-xremote.c [new file with mode: 0644]
src/seat-xremote.h [new file with mode: 0644]
src/seat.c
src/seat.h
src/session.c
src/xserver.c
utils/Makefile.am [new file with mode: 0644]
utils/dm-tool.c [new file with mode: 0644]
utils/gdmflexiserver [moved from src/gdmflexiserver with 100% similarity]
utils/lightdm-set-defaults.c [new file with mode: 0644]

index 56e2c619e7733d64da1eda83b2f2fd63ce6ae771..622ae7e608e3a8a261b9006b9dabd17e65bd6d51 100644 (file)
@@ -62,3 +62,5 @@ tests/src/test-qt-greeter
 tests/src/test-runner
 tests/src/test-session
 tests/src/test-xserver
+utils/lightdm-set-defaults
+utils/dm-tool
index c7cb54265768ca8a6aa67a74c60864deade5e88f..1143c076cb145d247c02e3b41f12b02b9bc4ce94 100644 (file)
@@ -5,7 +5,7 @@ endif
 if COMPILE_LIBLIGHTDM_QT
 SUBDIRS += liblightdm-qt
 endif
-SUBDIRS += data greeters po src doc tests
+SUBDIRS += data greeters po src doc tests utils
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc
 
diff --git a/NEWS b/NEWS
index 064deb6a45f02dfa19a535e2956e141a65b48259..b1a6ec654c0e9a2f78f428a6241f598420891778 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,21 @@
+Overview of changes in lightdm 0.9.4
+
+    * lightdm-set-defaults enables tweaking the default session and chosen
+      greeter for lightdm. This is useful for derivatives waiting to not ship
+      the whole configuration file of lightdm
+    * Fix crash in GTK+ greeter when a user is added
+    * Move xsessions-directory and xgreeters-directory from [SeatDefaults] to
+      [LightDM].  This is a configuration break, but making it on the assumption
+      that these settings are not likely to have been overridden.
+    * Fix fallback from org.freedesktop.Accounts to passwd format
+    * Fix duplicate user entries being shown when using passwd file
+    * 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
+    * Fix bug where sessions were started when the greeter quit and the user
+      hadn't been authorized.
+    * Fix bug where sessions used the seat bus name
+
 Overview of changes in lightdm 0.9.3
 
     * Unlock ConsoleKit sessions when switching to them
index 14b8ab3800aa90989e55945e02917fe76c302d3a..c6e6949be5ea99e2a1391d5703a711d5e1c786f6 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(lightdm, 0.9.3)
+AC_INIT(lightdm, 0.9.4)
 AC_CONFIG_MACRO_DIR(m4)
 AC_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE
@@ -13,8 +13,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
 
 GOBJECT_INTROSPECTION_CHECK(0.9.5)
 
-AC_PATH_PROG([VALA_API_GEN], [vapigen])
-
 GNOME_COMPILE_WARNINGS(maximum)
 
 dnl ###########################################################################
@@ -195,6 +193,7 @@ po/Makefile.in
 src/Makefile
 tests/Makefile
 tests/src/Makefile
+utils/Makefile
 ])
 AC_OUTPUT
 
index 0c8791160f0fc763eae28fbc5229371db99ab039..afeed8b696dac2399060e238e6cb34c8e48025b7 100644 (file)
@@ -10,6 +10,8 @@
 # log-directory = Directory to log information to
 # run-directory = Directory to put running state in
 # cache-directory = Directory to cache to
+# xsessions-directory = Directory to find X sessions
+# xgreeters-directory = Directory to find X greeters
 #
 [LightDM]
 #start-default-seat=true
@@ -21,6 +23,8 @@
 #log-directory=/var/log/lightdm
 #run-directory=/var/run/lightdm
 #cache-directory=/var/cache/lightdm
+#xsessions-directory=/usr/share/xsessions
+#xgreeters-directory=/usr/share/xgreeters
 
 #
 # Seat defaults
@@ -31,8 +35,6 @@
 # xdmcp-manager = XDMCP manager to connect to
 # xdmcp-port = XDMCP UDP/IP port to communicate on
 # xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
-# xsessions-directory = Directory to find X sessions
-# xgreeters-directory = Directory to find X greeters
 # greeter-session = Session to load for greeter
 # greeter-hide-users = True to hide the user list
 # user-session = Session to load for users
@@ -51,8 +53,6 @@
 #xdmcp-manager=
 #xdmcp-port=177
 #xdmcp-key=
-#xsessions-directory=/usr/share/xsessions
-#xgreeters-directory=/usr/share/xgreeters
 #greeter-session=example-gtk-gnome
 #greeter-hide-users=false
 #user-session=default
index f32be267b7c6617daf69f96cd7cd3367468e06da..2800eb21bd502e4601e85e1d427706b5f7d68b0b 100644 (file)
@@ -388,7 +388,7 @@ get_user_iter (const gchar *username, GtkTreeIter *iter)
         gboolean matched;
 
         gtk_tree_model_get (model, iter, 0, &name, -1);
-        matched = strcmp (name, username) == 0;
+        matched = g_strcmp0 (name, username) == 0;
         g_free (name);
         if (matched)
             return TRUE;
index b7f4d7d73ffd7c257062bbbb711e4ba7707100d2..e929a35c4a0535e2604f37e8189d4fc202d7547c 100644 (file)
@@ -298,25 +298,25 @@ lightdm_language_class_init (LightDMLanguageClass *klass)
     object_class->set_property = lightdm_language_set_property;
     object_class->get_property = lightdm_language_get_property;
 
-    g_object_class_install_property(object_class,
-                                    PROP_CODE,
-                                    g_param_spec_string("code",
-                                                        "code",
-                                                        "Language code",
-                                                        NULL,
-                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-    g_object_class_install_property(object_class,
-                                    PROP_NAME,
-                                    g_param_spec_string("name",
-                                                        "name",
-                                                        "Name of the language",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    PROP_TERRITORY,
-                                    g_param_spec_string("territory",
-                                                        "territory",
-                                                        "Territory the language is from",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     PROP_CODE,
+                                     g_param_spec_string ("code",
+                                                          "code",
+                                                          "Language code",
+                                                          NULL,
+                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+    g_object_class_install_property (object_class,
+                                     PROP_NAME,
+                                     g_param_spec_string ("name",
+                                                          "name",
+                                                          "Name of the language",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     PROP_TERRITORY,
+                                     g_param_spec_string ("territory",
+                                                          "territory",
+                                                          "Territory the language is from",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
 }
index b5bd5adf9e353c6c52133d5c90ad77541c3ae470..1fb89bc1f1cda60a9260063cf58b81aebd9abc88 100644 (file)
@@ -235,25 +235,25 @@ lightdm_layout_class_init (LightDMLayoutClass *klass)
     object_class->set_property = lightdm_layout_set_property;
     object_class->get_property = lightdm_layout_get_property;
 
-    g_object_class_install_property(object_class,
-                                    PROP_NAME,
-                                    g_param_spec_string("name",
-                                                        "name",
-                                                        "Name of the layout",
-                                                        NULL,
-                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-    g_object_class_install_property(object_class,
-                                    PROP_SHORT_DESCRIPTION,
-                                    g_param_spec_string("short-description",
-                                                        "short-description",
-                                                        "Short description of the layout",
-                                                        NULL,
-                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-    g_object_class_install_property(object_class,
-                                    PROP_DESCRIPTION,
-                                    g_param_spec_string("description",
-                                                        "description",
-                                                        "Long description of the layout",
-                                                        NULL,
-                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+    g_object_class_install_property (object_class,
+                                     PROP_NAME,
+                                     g_param_spec_string ("name",
+                                                          "name",
+                                                          "Name of the layout",
+                                                          NULL,
+                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+    g_object_class_install_property (object_class,
+                                     PROP_SHORT_DESCRIPTION,
+                                     g_param_spec_string ("short-description",
+                                                          "short-description",
+                                                          "Short description of the layout",
+                                                          NULL,
+                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+    g_object_class_install_property (object_class,
+                                     PROP_DESCRIPTION,
+                                     g_param_spec_string ("description",
+                                                          "description",
+                                                          "Long description of the layout",
+                                                          NULL,
+                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 }
index 671f8dde78c6b53eb36259827c99196b8841d3ba..c2f193defd0bc5d6b142ac434691c6aae998af17 100644 (file)
@@ -275,25 +275,25 @@ lightdm_session_class_init (LightDMSessionClass *klass)
     object_class->set_property = lightdm_session_set_property;
     object_class->get_property = lightdm_session_get_property;
 
-    g_object_class_install_property(object_class,
-                                    PROP_KEY,
-                                    g_param_spec_string ("key",
-                                                         "key",
-                                                         "Session key",
-                                                         NULL,
-                                                         G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    PROP_NAME,
-                                    g_param_spec_string ("name",
-                                                         "name",
-                                                         "Session name",
-                                                         NULL,
-                                                         G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    PROP_COMMENT,
-                                    g_param_spec_string ("comment",
-                                                         "comment",
-                                                         "Session comment",
-                                                         NULL,
-                                                         G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     PROP_KEY,
+                                     g_param_spec_string ("key",
+                                                          "key",
+                                                          "Session key",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     PROP_NAME,
+                                     g_param_spec_string ("name",
+                                                          "name",
+                                                          "Session name",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     PROP_COMMENT,
+                                     g_param_spec_string ("comment",
+                                                          "comment",
+                                                          "Session comment",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
 }
index 515cd575608b8308f1214349c278b395246b6dc6..5ac57f6d30521682dd38ba768cfbb8c90b38ff33 100644 (file)
@@ -186,7 +186,7 @@ user_changed_cb (LightDMUser *user, LightDMUserList *user_list)
 }
 
 static void
-load_passwd_file (LightDMUserList *user_list)
+load_passwd_file (LightDMUserList *user_list, gboolean emit_add_signal)
 {
     LightDMUserListPrivate *priv = GET_LIST_PRIVATE (user_list);
     GKeyFile *config;
@@ -326,7 +326,8 @@ load_passwd_file (LightDMUserList *user_list)
         LightDMUser *info = link->data;
         g_debug ("User %s added", lightdm_user_get_name (info));
         g_signal_connect (info, "changed", G_CALLBACK (user_changed_cb), user_list);
-        g_signal_emit (user_list, list_signals[USER_ADDED], 0, info);
+        if (emit_add_signal)
+            g_signal_emit (user_list, list_signals[USER_ADDED], 0, info);
     }
     g_list_free (new_users);
     for (link = changed_users; link; link = link->next)
@@ -364,7 +365,7 @@ passwd_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileM
     if (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
     {
         g_debug ("%s changed, reloading user list", g_file_get_path (file));
-        load_passwd_file (user_list);
+        load_passwd_file (user_list, TRUE);
     }
 }
 
@@ -667,7 +668,6 @@ static void
 update_users (LightDMUserList *user_list)
 {
     LightDMUserListPrivate *priv = GET_LIST_PRIVATE (user_list);
-    GFile *passwd_file;
     GError *error = NULL;
 
     if (priv->have_users)
@@ -686,6 +686,21 @@ update_users (LightDMUserList *user_list)
         g_warning ("Error contacting org.freedesktop.Accounts: %s", error->message);
     g_clear_error (&error);
 
+    /* Check if the service exists */
+    if (priv->accounts_service_proxy)
+    {
+        gchar *name;
+
+        name = g_dbus_proxy_get_name_owner (priv->accounts_service_proxy);
+        if (!name)
+        {
+            g_debug ("org.freedesktop.Accounts does not exist, falling back to passwd file");
+            g_object_unref (priv->accounts_service_proxy);
+            priv->accounts_service_proxy = NULL;
+        }
+        g_free (name);
+    }
+
     if (priv->accounts_service_proxy)
     {
         GVariant *result;
@@ -737,7 +752,9 @@ update_users (LightDMUserList *user_list)
     }
     else
     {
-        load_passwd_file (user_list);
+        GFile *passwd_file;
+
+        load_passwd_file (user_list, FALSE);
 
         /* Watch for changes to user list */
         passwd_file = g_file_new_for_path (PASSWD_FILE);
@@ -1250,69 +1267,69 @@ lightdm_user_class_init (LightDMUserClass *klass)
     object_class->get_property = lightdm_user_get_property;
     object_class->finalize = lightdm_user_finalize;
 
-    g_object_class_install_property(object_class,
-                                    USER_PROP_NAME,
-                                    g_param_spec_string("name",
-                                                        "name",
-                                                        "Username",
-                                                        NULL,
-                                                        G_PARAM_READWRITE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_REAL_NAME,
-                                    g_param_spec_string("real-name",
-                                                        "real-name",
-                                                        "Users real name",
-                                                        NULL,
-                                                        G_PARAM_READWRITE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_DISPLAY_NAME,
-                                    g_param_spec_string("display-name",
-                                                        "display-name",
-                                                        "Users display name",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_HOME_DIRECTORY,
-                                    g_param_spec_string("home-directory",
-                                                        "home-directory",
-                                                        "Home directory",
-                                                        NULL,
-                                                        G_PARAM_READWRITE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_IMAGE,
-                                    g_param_spec_string("image",
-                                                        "image",
-                                                        "Avatar image",
-                                                        NULL,
-                                                        G_PARAM_READWRITE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_LANGUAGE,
-                                    g_param_spec_string("language",
-                                                        "language",
-                                                        "Language used by this user",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_LAYOUT,
-                                    g_param_spec_string("layout",
-                                                        "layout",
-                                                        "Keyboard layout used by this user",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_SESSION,
-                                    g_param_spec_string("session",
-                                                        "session",
-                                                        "Session used by this user",
-                                                        NULL,
-                                                        G_PARAM_READABLE));
-    g_object_class_install_property(object_class,
-                                    USER_PROP_LOGGED_IN,
-                                    g_param_spec_boolean("logged-in",
-                                                         "logged-in",
-                                                         "TRUE if the user is currently in a session",
-                                                         FALSE,
-                                                         G_PARAM_READWRITE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_NAME,
+                                     g_param_spec_string ("name",
+                                                          "name",
+                                                          "Username",
+                                                          NULL,
+                                                          G_PARAM_READWRITE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_REAL_NAME,
+                                     g_param_spec_string ("real-name",
+                                                          "real-name",
+                                                          "Users real name",
+                                                          NULL,
+                                                          G_PARAM_READWRITE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_DISPLAY_NAME,
+                                     g_param_spec_string ("display-name",
+                                                          "display-name",
+                                                          "Users display name",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_HOME_DIRECTORY,
+                                     g_param_spec_string ("home-directory",
+                                                          "home-directory",
+                                                          "Home directory",
+                                                          NULL,
+                                                          G_PARAM_READWRITE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_IMAGE,
+                                     g_param_spec_string ("image",
+                                                          "image",
+                                                          "Avatar image",
+                                                          NULL,
+                                                          G_PARAM_READWRITE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_LANGUAGE,
+                                     g_param_spec_string ("language",
+                                                         "language",
+                                                         "Language used by this user",
+                                                         NULL,
+                                                         G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_LAYOUT,
+                                     g_param_spec_string ("layout",
+                                                          "layout",
+                                                          "Keyboard layout used by this user",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_SESSION,
+                                     g_param_spec_string ("session",
+                                                          "session",
+                                                          "Session used by this user",
+                                                          NULL,
+                                                          G_PARAM_READABLE));
+    g_object_class_install_property (object_class,
+                                     USER_PROP_LOGGED_IN,
+                                     g_param_spec_boolean ("logged-in",
+                                                           "logged-in",
+                                                           "TRUE if the user is currently in a session",
+                                                           FALSE,
+                                                           G_PARAM_READWRITE));
 
     /**
      * LightDMUser::changed:
index 64a7b04c30a84fa1bd729c1d2401a8995f492a10..7af598d42aa6978ae9787b0babcc68558b4b99cf 100644 (file)
@@ -4,3 +4,4 @@
 [type: gettext/glade]greeters/gtk/greeter.ui
 greeters/gtk/lightdm-gtk-greeter.c
 src/lightdm.c
+utils/lightdm-set-defaults.c
index 72662daab70de1d053c3b92208189ae4bcba90f2..c75e1164a22e8d7c13a5d31fba9ab621ca3dc153 100644 (file)
--- a/po/ar.po
+++ b/po/ar.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index e00ade5ec190a64ac5cdc6af51b1a899c2a96115..0d765dd4d0d6d5ff1e92a979c429c5714d0a0b01 100644 (file)
--- a/po/ast.po
+++ b/po/ast.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 5ed759b672beac735f9f9ace2c8299f891dc82f5..6368e0d7781eb2e9570507f146a31fd87a28ed8e 100644 (file)
--- a/po/be.po
+++ b/po/be.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 644fdb19f85f89a05c0eb5861540ac88fa7ee018..e7ef1ad25b4bf22bc30dbf395cbfb472ca241419 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
diff --git a/po/bs.po b/po/bs.po
new file mode 100644 (file)
index 0000000..c69b55c
--- /dev/null
+++ b/po/bs.po
@@ -0,0 +1,101 @@
+# Bosnian translation for lightdm
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the lightdm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lightdm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-06 11:05+0000\n"
+"PO-Revision-Date: 2011-08-15 15:46+0000\n"
+"Last-Translator: Daniel4x <daniel4molnar@gmail.com>\n"
+"Language-Team: Bosnian <bs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-08-17 04:57+0000\n"
+"X-Generator: Launchpad (build 13697)\n"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:322
+msgid "Are you sure you want to close all programs and restart the computer?"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:1
+msgid "Cancel"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:323
+msgid "Restart"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:347
+msgid ""
+"Are you sure you want to close all programs and shutdown the computer?"
+msgstr ""
+"Jeste li sigurni da želite zatvoriti sve programe i isključiti računar?"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:348
+msgid "Shutdown"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:4
+msgid "Large Font"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:611
+msgid "High Constrast"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:615
+msgid "Options"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:620
+msgid "Language"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:646
+msgid "Keyboard Layout"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:668
+msgid "Session"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:8
+msgid "Suspend"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:2
+msgid "Hibernate"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:6
+msgid "Restart..."
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:7
+msgid "Shutdown..."
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:100
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s - Display Manager"
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:106
+#, c-format
+msgid ""
+"Help Options:\n"
+"  -c, --config <file>             Use configuration file\n"
+"      --pid-file <file>           File to write PID into\n"
+"  -d, --debug                     Print debugging messages\n"
+"      --test-mode                 Run as unprivileged user\n"
+"  -v, --version                   Show release version\n"
+"  -h, --help                      Show help options"
+msgstr ""
index 7b9a53f988049a9c9e90831b0791f9f08b94be01..1924e53dd6a08f8ac8759bf304429185476da368 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index fd035f134bd7444edef21e55c9e1611563be5015..0f13bf9b9ba33ad2396b60026b75479c287204ec 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 5d4568a7e761d7665c97da9a4a11c6e02fbf9e52..3b045a4bc88193a92a4df0d06a4d7218e1c7fff1 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -15,8 +15,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 1bc8a2b839e57aba6c3eb0b6cb2567128dea6352..a295de4908534442013afd25a1d611009d4504c9 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 9218cd106736eb0fc9c33a7d2cb2022a5623bb35..71766c53cf8ec075f3d9d564002934d72d40d922 100644 (file)
--- a/po/el.po
+++ b/po/el.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index c441d2e47b2f8508b6008a31f6959ea836e959ad..0e039414fedb7e0552775b5a81aac79bbd870acc 100644 (file)
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index bb818fd0a7d3a0f4e56b125f21c7d4c5878af498..fe9d5c8a7d18910a7d5012a56f8a7200838c2835 100644 (file)
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 6dd1369bd5ab449ecf8f9c8980ed38f72f06a9cf..f5f11f976eb706591c4bf0b918e22002413fe498 100644 (file)
--- a/po/eo.po
+++ b/po/eo.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 9f2b63fc0447432f899c32f3400762a285208092..e49005c12eaab4b2e4cd9c579bf8e66db06a99a0 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 0924afa9896dee5c1b8cdc97c531348c9c4f3249..3fe2afd661d9fee9e92088e1636eed867a1f51d7 100644 (file)
--- a/po/et.po
+++ b/po/et.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 1dafdb9047dfcaee95eb9f86f8011e134fd47deb..7af641355e5d99d7895542ae58c31e75c20ec786 100644 (file)
--- a/po/eu.po
+++ b/po/eu.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 7e2fce416c0b97079736ebe7c30a32fa5506f5d0..b6cced546036a954d990d5d86f415e18e7e46591 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index e0f5768f99e31e578d90bb6152c629990a6a5fed..8deb5b84e50030e051670c7d01b9aa7a788edaa4 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
diff --git a/po/gd.po b/po/gd.po
new file mode 100644 (file)
index 0000000..1d788e6
--- /dev/null
+++ b/po/gd.po
@@ -0,0 +1,100 @@
+# Gaelic; Scottish translation for lightdm
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the lightdm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lightdm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-06 11:05+0000\n"
+"PO-Revision-Date: 2011-08-16 22:47+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Gaelic; Scottish <gd@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-08-17 04:57+0000\n"
+"X-Generator: Launchpad (build 13697)\n"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:322
+msgid "Are you sure you want to close all programs and restart the computer?"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:1
+msgid "Cancel"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:323
+msgid "Restart"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:347
+msgid ""
+"Are you sure you want to close all programs and shutdown the computer?"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:348
+msgid "Shutdown"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:4
+msgid "Large Font"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:611
+msgid "High Constrast"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:615
+msgid "Options"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:620
+msgid "Language"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:646
+msgid "Keyboard Layout"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:668
+msgid "Session"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:8
+msgid "Suspend"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:2
+msgid "Hibernate"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:6
+msgid "Restart..."
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:7
+msgid "Shutdown..."
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:100
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s - Display Manager"
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:106
+#, c-format
+msgid ""
+"Help Options:\n"
+"  -c, --config <file>             Use configuration file\n"
+"      --pid-file <file>           File to write PID into\n"
+"  -d, --debug                     Print debugging messages\n"
+"      --test-mode                 Run as unprivileged user\n"
+"  -v, --version                   Show release version\n"
+"  -h, --help                      Show help options"
+msgstr ""
index 88a3c02a803ecf9ae1177d9b3041cfc6a2f6a37b..d81ea48591215a13c5fe0add9965097ce021ca57 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 4e82598ce086f4745a6398d1385bc466999254f8..4cf12b21b865212bbf5c22cea506954713874da8 100644 (file)
--- a/po/he.po
+++ b/po/he.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 0625c32796dc20f59093e4d75c08232bda1ada91..fcf337aca0c304b7309c01c3d41f5edbea7f37d9 100644 (file)
--- a/po/hr.po
+++ b/po/hr.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 99d9abd63a8c0c93e0ee11d50d40c552c3286671..2c206a8eab941992acd3c96eede9a24ad7aa686b 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
diff --git a/po/ia.po b/po/ia.po
new file mode 100644 (file)
index 0000000..69efa79
--- /dev/null
+++ b/po/ia.po
@@ -0,0 +1,100 @@
+# Interlingua translation for lightdm
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the lightdm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lightdm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-06 11:05+0000\n"
+"PO-Revision-Date: 2011-08-11 05:03+0000\n"
+"Last-Translator: Emilio Sepulveda <emilio@chilemoz.org>\n"
+"Language-Team: Interlingua <ia@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-08-12 04:45+0000\n"
+"X-Generator: Launchpad (build 13662)\n"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:322
+msgid "Are you sure you want to close all programs and restart the computer?"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:1
+msgid "Cancel"
+msgstr "Cancellar"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:323
+msgid "Restart"
+msgstr "Re-initiar"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:347
+msgid ""
+"Are you sure you want to close all programs and shutdown the computer?"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:348
+msgid "Shutdown"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:4
+msgid "Large Font"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:611
+msgid "High Constrast"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:615
+msgid "Options"
+msgstr "Optiones"
+
+#: ../greeters/ldm-gtk-greeter.c:620
+msgid "Language"
+msgstr "Linguage"
+
+#: ../greeters/ldm-gtk-greeter.c:646
+msgid "Keyboard Layout"
+msgstr "Disposition de claviero"
+
+#: ../greeters/ldm-gtk-greeter.c:668
+msgid "Session"
+msgstr "Session"
+
+#: ../greeters/gtk/greeter.ui.h:8
+msgid "Suspend"
+msgstr "Suspender"
+
+#: ../greeters/gtk/greeter.ui.h:2
+msgid "Hibernate"
+msgstr "Hibernar"
+
+#: ../greeters/gtk/greeter.ui.h:6
+msgid "Restart..."
+msgstr "Reinitiar..."
+
+#: ../greeters/gtk/greeter.ui.h:7
+msgid "Shutdown..."
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:100
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s - Display Manager"
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:106
+#, c-format
+msgid ""
+"Help Options:\n"
+"  -c, --config <file>             Use configuration file\n"
+"      --pid-file <file>           File to write PID into\n"
+"  -d, --debug                     Print debugging messages\n"
+"      --test-mode                 Run as unprivileged user\n"
+"  -v, --version                   Show release version\n"
+"  -h, --help                      Show help options"
+msgstr ""
index 72800b561caa5df9583885eb9862138ee21b490d..19d9c0ef6392f3515f3b05a0c6af7bbde56c74d9 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 8c35630abbb90edc1094a92a6aa25350444dde8e..cbc965539196f39bc05f44ac8371bd4b32d2c9df 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 9c48ef7da28c978a187450e82429d415a443d6c6..e5e2ddda969ad4b7d3c327644416cb88b7bdc39c 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 7db1ec218e0fe8f5da5422355b51bc4695b4dd6b..c8f3f4fde61a930ee2f3273e3d02a1e5bdef0fdc 100644 (file)
--- a/po/kk.po
+++ b/po/kk.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 85a7ca186620a63e812911e63dbdabdfff8e6de9..2e1794863b79939b4abd52a3230aeb2ed2d0ca6a 100644 (file)
--- a/po/ko.po
+++ b/po/ko.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 0cd2a3fa13cb55fa092bc182a0300f4047ed00b3..ffc13923b3e6f88d42493ecd05751781f558c100 100644 (file)
--- a/po/lb.po
+++ b/po/lb.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index d7e7ace421aaa232115d054e09fab8d6aa1bc767..d2e89a5ab95489a0babeda676a53dc7138560d04 100644 (file)
--- a/po/lt.po
+++ b/po/lt.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 32d5a9e2decb2398992fc64686eb1fb0a5aa7583..6625f2d55a390737f5fe65fbf29bfeaac30756d6 100644 (file)
--- a/po/ml.po
+++ b/po/ml.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 244bfa937160907afef78af1e76d4daaace63028..2b88f9306eff935eda74fcbd270e04e3fa8664e3 100644 (file)
--- a/po/ms.po
+++ b/po/ms.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index d546143a20387ba8aba519a0ba6cffc5241f7078..97bae1e6bc97cae97d8fa02985b58d6b0e6b45d6 100644 (file)
--- a/po/nb.po
+++ b/po/nb.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 0d219022699feb1349a61a08803676176d34ab71..917da21a5afa9f609729236bf1136a71271f5409 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
diff --git a/po/oc.po b/po/oc.po
new file mode 100644 (file)
index 0000000..c476d83
--- /dev/null
+++ b/po/oc.po
@@ -0,0 +1,100 @@
+# Occitan (post 1500) translation for lightdm
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the lightdm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lightdm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-06 11:05+0000\n"
+"PO-Revision-Date: 2011-08-14 13:45+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Occitan (post 1500) <oc@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-08-15 04:42+0000\n"
+"X-Generator: Launchpad (build 13674)\n"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:322
+msgid "Are you sure you want to close all programs and restart the computer?"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:1
+msgid "Cancel"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:323
+msgid "Restart"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:347
+msgid ""
+"Are you sure you want to close all programs and shutdown the computer?"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:348
+msgid "Shutdown"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:4
+msgid "Large Font"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:611
+msgid "High Constrast"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:615
+msgid "Options"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:620
+msgid "Language"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:646
+msgid "Keyboard Layout"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:668
+msgid "Session"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:8
+msgid "Suspend"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:2
+msgid "Hibernate"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:6
+msgid "Restart..."
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:7
+msgid "Shutdown..."
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:100
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s - Display Manager"
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:106
+#, c-format
+msgid ""
+"Help Options:\n"
+"  -c, --config <file>             Use configuration file\n"
+"      --pid-file <file>           File to write PID into\n"
+"  -d, --debug                     Print debugging messages\n"
+"      --test-mode                 Run as unprivileged user\n"
+"  -v, --version                   Show release version\n"
+"  -h, --help                      Show help options"
+msgstr ""
index 64501eb7ca2d638f10fd3e01d12ca9375c935e23..22da49f9305c69f7f0ebb9388b7feff7f4d167ef 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 186d5079b58a0c89725379a8d019630f64e3fd59..32cc6a4dbfbb452cdda12e6969ba8a3e2531bbd3 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index fe0e33b2eeba6c187797e0ed2b3ff79fca621fa5..674a24a48ec9e1777d35ae70e98cbeb9dc2cae65 100644 (file)
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 8475440ba93b4492b28e5b3b5a7290894dcebb11..fb8ff264522ff03a0c331117c6d34894d91114ee 100644 (file)
--- a/po/ro.po
+++ b/po/ro.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 4e165ce314e96133384f9f2c6357d13bfb36c2fd..6d0a53cfcf2547f2ff32a97e0f1f0ff2d9d56e6d 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 978fe2e5f4f20bd72aa32c43d8f5c3e1adbeab1d..5634a8767f22f09473f98443550bc558021b533d 100644 (file)
--- a/po/sk.po
+++ b/po/sk.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index c43337d5304a033796a8af1afbac56eb79aa5925..abd6df27db490ae6f8c3636cb1c7a254b2f5eaa6 100644 (file)
--- a/po/sl.po
+++ b/po/sl.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index f561e191d58f0759090bdd7576be58ef581ab043..c4bbfa439ae53c2b98ac13b800cb8cf990051e8d 100644 (file)
--- a/po/sq.po
+++ b/po/sq.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:40+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index a25628ec26664f7e9659f4a8a2dfb0c9e0527a44..f8ab612a8b63ceb9408860a26b5b038018821ec7 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 6a4dd99ebd8f391342c95612724a7ce3a577511a..7a8a9c250a836845b1267c72cfe509d4577f7d2d 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 9b0f5dff8902c477266a0b2690456dbfd8d55c56..5a34f58b6e39b95ed4171a95faec47958f68f78a 100644 (file)
--- a/po/ta.po
+++ b/po/ta.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index de333b25fec8271ab929c5a584781df16625ee2e..b7641ad8ebc65683d035f0e6467a42a545ddb4d1 100644 (file)
--- a/po/te.po
+++ b/po/te.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 4b41cc2af2699074d67a9321c6f3b257af4f8703..11603ba3a0b438225d4ad47bfcc2d63ec792e175 100644 (file)
--- a/po/th.po
+++ b/po/th.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 837e8e84c3af1990674c9b07b671e73a88f888ce..f7b81420094d33005ff6658346ed9c4df228d0dd 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
diff --git a/po/ug.po b/po/ug.po
new file mode 100644 (file)
index 0000000..aafb664
--- /dev/null
+++ b/po/ug.po
@@ -0,0 +1,100 @@
+# Uyghur translation for lightdm
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the lightdm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lightdm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-06 11:05+0000\n"
+"PO-Revision-Date: 2011-08-11 07:42+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Uyghur <ug@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-08-12 04:45+0000\n"
+"X-Generator: Launchpad (build 13662)\n"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:322
+msgid "Are you sure you want to close all programs and restart the computer?"
+msgstr "ھەممە پروگراممىنى ئېتىپ كومپيۇتېرنى قايتا قوزغامسىز؟"
+
+#: ../greeters/gtk/greeter.ui.h:1
+msgid "Cancel"
+msgstr "ئەمەلدىن قالدۇر"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:323
+msgid "Restart"
+msgstr "قايتا قوزغات"
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:347
+msgid ""
+"Are you sure you want to close all programs and shutdown the computer?"
+msgstr ""
+
+#: ../greeters/gtk/lightdm-gtk-greeter.c:348
+msgid "Shutdown"
+msgstr "تاقا"
+
+#: ../greeters/gtk/greeter.ui.h:4
+msgid "Large Font"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:611
+msgid "High Constrast"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:615
+msgid "Options"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:620
+msgid "Language"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:646
+msgid "Keyboard Layout"
+msgstr ""
+
+#: ../greeters/ldm-gtk-greeter.c:668
+msgid "Session"
+msgstr ""
+
+#: ../greeters/gtk/greeter.ui.h:8
+msgid "Suspend"
+msgstr "توڭلات"
+
+#: ../greeters/gtk/greeter.ui.h:2
+msgid "Hibernate"
+msgstr "ئۈچەك"
+
+#: ../greeters/gtk/greeter.ui.h:6
+msgid "Restart..."
+msgstr "قايتا قوزغات…"
+
+#: ../greeters/gtk/greeter.ui.h:7
+msgid "Shutdown..."
+msgstr "تاقا…"
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:100
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s - Display Manager"
+msgstr ""
+
+#. Description on how to use Light Display Manager displayed on command-line
+#: ../src/lightdm.c:106
+#, c-format
+msgid ""
+"Help Options:\n"
+"  -c, --config <file>             Use configuration file\n"
+"      --pid-file <file>           File to write PID into\n"
+"  -d, --debug                     Print debugging messages\n"
+"      --test-mode                 Run as unprivileged user\n"
+"  -v, --version                   Show release version\n"
+"  -h, --help                      Show help options"
+msgstr ""
index 22e258809aa6ecad0049b4a2c50a5eb3a07377ee..a64b3bc08faf7e85b1ac57a4de279440fc4eca6f 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index cd084a1e7adb813ed37972ef51ea383f503b5d85..3f716e42bca034c7728d37cba6d8faa4965fd8e4 100644 (file)
--- a/po/vi.po
+++ b/po/vi.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 56be1f99433b2c688724577264820987a461414a..2c0b4f00d528e44c3604649f00442011105ac63e 100644 (file)
--- a/po/wae.po
+++ b/po/wae.po
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 89af0042c363afc656ad533ada163174bc532b9e..3ee7c5ff1e5ac20959163aaab040a3bd19fab14c 100644 (file)
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index b4c8fa9f43d3f519b20ac6d68bbe67e7b6672114..581fc601d5dda4c2f39c3c0143b75a9eae1a4b9d 100644 (file)
@@ -14,8 +14,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-08-09 04:56+0000\n"
-"X-Generator: Launchpad (build 13628)\n"
+"X-Launchpad-Export-Date: 2011-08-10 04:41+0000\n"
+"X-Generator: Launchpad (build 13636)\n"
 
 #: ../greeters/gtk/lightdm-gtk-greeter.c:322
 msgid "Are you sure you want to close all programs and restart the computer?"
index 8fc14fd34d7ac1353c01a7240c67dd8562884855..c2143b74c0308f064de7d881997d6ac46326fb27 100644 (file)
@@ -1,7 +1,5 @@
 sbin_PROGRAMS = lightdm
 
-dist_pkglibexec_SCRIPTS = gdmflexiserver
-
 ldm-marshal.c: ldm-marshal.list
        @GLIB_GENMARSHAL@ --prefix=ldm_marshal $(srcdir)/ldm-marshal.list --header --body > ldm-marshal.c
 
@@ -38,6 +36,8 @@ lightdm_SOURCES = \
        seat-xdmcp-session.h \
        seat-xlocal.c \
        seat-xlocal.h \
+       seat-xremote.c \
+       seat-xremote.h \
        session.c \
        session.h \
        user.c \
index f9bc6460feddd5dcb3395f77031670787839b89f..4d2fca666cbb8b321386216db98fbd334e4ce623 100644 (file)
@@ -40,6 +40,12 @@ config_get_groups (Configuration *config)
     return g_key_file_get_groups (config->priv->key_file, NULL);
 }
 
+gchar **
+config_get_keys (Configuration *config, const gchar *group_name)
+{
+    return g_key_file_get_keys (config->priv->key_file, group_name, NULL, NULL);
+}
+
 gboolean
 config_has_key (Configuration *config, const gchar *section, const gchar *key)
 {
index ce2927876d81f287624762f0cc3612af69220c9e..13d952d2fe490f0f977c34b1ad41eeb3dfcdf7fa 100644 (file)
@@ -40,6 +40,8 @@ gboolean config_load_from_file (Configuration *config, const gchar *path, GError
 
 gchar **config_get_groups (Configuration *config);
 
+gchar **config_get_keys (Configuration *config, const gchar *group_name);
+
 gboolean config_has_key (Configuration *config, const gchar *section, const gchar *key);
 
 void config_set_string (Configuration *config, const gchar *section, const gchar *key, const gchar *value);
index a05a499ab625faffcafb241ba8dfe45c766e3a40..3541e50f4bbadedf06cb04e195400ed17889d608 100644 (file)
@@ -18,9 +18,8 @@
 #include "display-manager.h"
 #include "configuration.h"
 #include "display.h"
-#include "xdmcp-server.h"
 #include "seat-xlocal.h"
-#include "seat-xdmcp-session.h"
+#include "seat-xremote.h"
 #include "plymouth.h"
 
 enum {
@@ -37,11 +36,11 @@ struct DisplayManagerPrivate
     /* The seats available */
     GList *seats;
 
-    /* XDMCP server */
-    XDMCPServer *xdmcp_server;
-
     /* TRUE if stopping the display manager (waiting for seats to stop) */
     gboolean stopping;
+
+    /* TRUE if stopped */
+    gboolean stopped;
 };
 
 G_DEFINE_TYPE (DisplayManager, display_manager, G_TYPE_OBJECT);
@@ -58,92 +57,52 @@ display_manager_get_seats (DisplayManager *manager)
     return manager->priv->seats;
 }
 
-static gboolean
-add_seat (DisplayManager *manager, Seat *seat)
+static void
+check_stopped (DisplayManager *manager)
 {
-    gboolean result;
-  
-    result = seat_start (SEAT (seat));
-    if (!result)
-        return FALSE;
+    if (manager->priv->stopping &&
+        !manager->priv->stopped &&
+        g_list_length (manager->priv->seats) == 0)
+    {
+        manager->priv->stopped = TRUE;
+        g_debug ("Display manager stopped");
+        g_signal_emit (manager, signals[STOPPED], 0);
+    }
+}
 
-    manager->priv->seats = g_list_append (manager->priv->seats, g_object_ref (seat));
-    g_signal_emit (manager, signals[SEAT_ADDED], 0, seat);
+static void
+seat_stopped_cb (Seat *seat, DisplayManager *manager)
+{
+    manager->priv->seats = g_list_remove (manager->priv->seats, seat);
+    g_signal_handlers_disconnect_matched (seat, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, manager);
 
-    return TRUE;
+    check_stopped (manager);
+
+    if (!manager->priv->stopping)
+        g_signal_emit (manager, signals[SEAT_REMOVED], 0, seat);
 }
 
-static gboolean
-xdmcp_session_cb (XDMCPServer *server, XDMCPSession *session, DisplayManager *manager)
+gboolean
+display_manager_add_seat (DisplayManager *manager, Seat *seat)
 {
-    SeatXDMCPSession *seat;
     gboolean result;
 
-    seat = seat_xdmcp_session_new (session);
-    result = add_seat (manager, SEAT (seat));
-    g_object_unref (seat);
-  
-    return result;
-}
+    result = seat_start (SEAT (seat));
+    if (!result)
+        return FALSE;
 
-static void
-add_static_seat (DisplayManager *manager, const gchar *config_section)
-{
-    gchar *type = NULL;
-    Seat *seat;
-
-    if (config_section)
-        type = config_get_string (config_get_instance (), config_section, "type");
-    if (!type)
-        type = config_get_string (config_get_instance (), "SeatDefaults", "type");
-    if (!type)
-    {
-        g_debug ("Seat missing type field");
-        return;
-    }
+    manager->priv->seats = g_list_append (manager->priv->seats, g_object_ref (seat));
+    g_signal_connect (seat, "stopped", G_CALLBACK (seat_stopped_cb), manager);
+    g_signal_emit (manager, signals[SEAT_ADDED], 0, seat);
 
-    seat = seat_new (type, config_section);
-    if (seat)
-    {
-        if (!add_seat (manager, seat))
-            g_warning ("Failed to start seat %s", config_section);
-        g_object_unref (seat);
-    }
-    else
-        g_debug ("Unknown seat type %s", type);
+    return TRUE;
 }
 
 void
 display_manager_start (DisplayManager *manager)
 {
-    gchar **groups, **i;
-
     g_return_if_fail (manager != NULL);
 
-    /* Load the seat modules */
-    seat_register_module ("xlocal", SEAT_XLOCAL_TYPE);
-
-    /* Load the static display entries */
-    groups = config_get_groups (config_get_instance ());
-    for (i = groups; *i; i++)
-    {
-        gchar *config_section = *i;
-
-        if (!g_str_has_prefix (config_section, "Seat:"))
-            continue;
-
-        g_debug ("Loading seat %s", config_section);
-        add_static_seat (manager, config_section);
-    }
-    g_strfreev (groups);
-
-    /* If no seats start a default one */
-    if (!manager->priv->seats && config_get_boolean (config_get_instance (), "LightDM", "start-default-seat"))
-    {
-        g_debug ("Adding default seat");
-        add_static_seat (manager, NULL);
-    }
-
     /* Disable Plymouth if no X servers are replacing it */
     if (plymouth_get_is_active ())
     {
@@ -151,85 +110,9 @@ display_manager_start (DisplayManager *manager)
         plymouth_quit (FALSE);
     }
 
-    /* Start the XDMCP server */
-    if (config_get_boolean (config_get_instance (), "XDMCPServer", "enabled"))
-    {
-        gchar *key_name, *key = NULL;
-
-        manager->priv->xdmcp_server = xdmcp_server_new ();
-        if (config_has_key (config_get_instance (), "XDMCPServer", "port"))
-        {
-            gint port;
-            port = config_get_integer (config_get_instance (), "XDMCPServer", "port");
-            if (port > 0)
-                xdmcp_server_set_port (manager->priv->xdmcp_server, port);
-        }
-        g_signal_connect (manager->priv->xdmcp_server, "new-session", G_CALLBACK (xdmcp_session_cb), manager);
-
-        key_name = config_get_string (config_get_instance (), "XDMCPServer", "key");
-        if (key_name)
-        {
-            gchar *dir, *path;
-            GKeyFile *keys;
-            GError *error = NULL;
-
-            dir = config_get_string (config_get_instance (), "LightDM", "config-directory");
-            path = g_build_filename (dir, "keys.conf", NULL);
-            g_free (dir);
-
-            keys = g_key_file_new ();
-            if (g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error))
-            {
-                if (g_key_file_has_key (keys, "keyring", key_name, NULL))
-                    key = g_key_file_get_string (keys, "keyring", key_name, NULL);
-                else
-                    g_debug ("Key %s not defined", error->message);
-            }
-            else
-                g_debug ("Error getting key %s", error->message);
-            g_clear_error (&error);
-            g_free (path);
-            g_key_file_free (keys);
-        }
-        if (key)
-            xdmcp_server_set_key (manager->priv->xdmcp_server, key);
-        g_free (key_name);
-        g_free (key);
-
-        g_debug ("Starting XDMCP server on UDP/IP port %d", xdmcp_server_get_port (manager->priv->xdmcp_server));
-        xdmcp_server_start (manager->priv->xdmcp_server); 
-    }
-
     g_signal_emit (manager, signals[STARTED], 0);
 }
 
-static gboolean
-check_stopped (DisplayManager *manager)
-{
-    if (g_list_length (manager->priv->seats) == 0)
-    {
-        g_debug ("Display manager stopped");
-        g_signal_emit (manager, signals[STOPPED], 0);
-        return TRUE;
-    }
-    return FALSE;
-}
-
-static void
-seat_stopped_cb (Seat *seat, DisplayManager *manager)
-{
-    manager->priv->seats = g_list_remove (manager->priv->seats, seat);
-    g_signal_handlers_disconnect_matched (seat, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, manager);
-
-    if (manager->priv->stopping)
-    {      
-        check_stopped (manager);
-        return;
-    }
-
-    g_signal_emit (manager, signals[SEAT_REMOVED], 0, seat);
-}
-
 void
 display_manager_stop (DisplayManager *manager)
 {
@@ -244,20 +127,10 @@ display_manager_stop (DisplayManager *manager)
 
     manager->priv->stopping = TRUE;
 
-    if (manager->priv->xdmcp_server)
-    {
-        // FIXME: xdmcp_server_stop
-        g_object_unref (manager->priv->xdmcp_server);
-        manager->priv->xdmcp_server = NULL;
-    }
-
-    if (check_stopped (manager))
-        return;
-
+    check_stopped (manager);
     for (link = manager->priv->seats; link; link = link->next)
     {
         Seat *seat = link->data;
-        g_signal_connect (seat, "stopped", G_CALLBACK (seat_stopped_cb), manager);
         seat_stop (seat);
     }
 }
@@ -266,6 +139,10 @@ static void
 display_manager_init (DisplayManager *manager)
 {
     manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, DISPLAY_MANAGER_TYPE, DisplayManagerPrivate);
+
+    /* Load the seat modules */
+    seat_register_module ("xlocal", SEAT_XLOCAL_TYPE);
+    seat_register_module ("xremote", SEAT_XREMOTE_TYPE);
 }
 
 static void
@@ -276,8 +153,6 @@ display_manager_finalize (GObject *object)
 
     self = DISPLAY_MANAGER (object);
 
-    if (self->priv->xdmcp_server)
-        g_object_unref (self->priv->xdmcp_server);
     for (link = self->priv->seats; link; link = link->next)
         g_object_unref (link->data);
     g_list_free (self->priv->seats);
index 33fb61d15d7c7f935552d392140ee0be9f0445e7..f34c9ea4c2e07886536846c46be012ec9b23c138 100644 (file)
@@ -43,6 +43,8 @@ GType display_manager_get_type (void);
 
 DisplayManager *display_manager_new (void);
 
+gboolean display_manager_add_seat (DisplayManager *manager, Seat *seat);
+
 GList *display_manager_get_seats (DisplayManager *manager);
 
 void display_manager_start (DisplayManager *manager);
index e378eca68265ad79e08938b24395172153f49e24..a82a971479754304f4f8f6aeaae1247856e761aa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.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 3 of the License, or (at your option) any later
@@ -51,9 +51,6 @@ struct DisplayPrivate
     /* Display server */
     DisplayServer *display_server;
 
-    /* User to run greeter as */
-    gchar *greeter_user;
-
     /* Greeter session */
     gchar *greeter_session;
 
@@ -62,12 +59,6 @@ struct DisplayPrivate
 
     /* Session requested to log into */
     gchar *user_session;
-  
-    /* Directory to load X sessions from */
-    gchar *xsessions_dir;
-
-    /* Directory to load X greeters from */
-    gchar *xgreeters_dir;
 
     /* Program to run sessions through */
     gchar *session_wrapper;
@@ -77,13 +68,16 @@ struct DisplayPrivate
 
     /* PAM service to authenticate against for automatic logins */
     gchar *pam_autologin_service;
+  
+    /* TRUE if a session should be started on greeter quit */
+    gboolean start_session_on_greeter_quit;
 
     /* TRUE if in a user session */
     gboolean in_user_session;
-  
+
     /* TRUE if have emitted ready signal */
     gboolean indicated_ready;
-  
+
     /* Session process */
     Session *session;
 
@@ -97,16 +91,19 @@ struct DisplayPrivate
 
     /* TRUE if start greeter if fail to login */
     gboolean start_greeter_if_fail;
-  
+
     /* Hint to select user in greeter */
     gchar *select_user_hint;
     gboolean select_guest_hint;
-  
+
     /* TRUE if allowed to log into guest account */
     gboolean allow_guest;
 
     /* TRUE if stopping the display (waiting for dispaly server, greeter and session to stop) */
-    gboolean stopping;    
+    gboolean stopping;
+
+    /* TRUE if stopped */
+    gboolean stopped;
 };
 
 G_DEFINE_TYPE (Display, display, G_TYPE_OBJECT);
@@ -114,41 +111,6 @@ G_DEFINE_TYPE (Display, display, G_TYPE_OBJECT);
 static gboolean start_greeter_session (Display *display);
 static gboolean start_user_session (Display *display, PAMSession *authentication);
 
-// FIXME: Should be a construct property
-// FIXME: Move into seat.c
-void
-display_load_config (Display *display, const gchar *config_section)
-{
-    g_return_if_fail (display != NULL);
-    
-    display->priv->greeter_user = config_get_string (config_get_instance (), "LightDM", "greeter-user");
-
-    if (config_section)
-        display->priv->greeter_session = config_get_string (config_get_instance (), config_section, "greeter-session");
-    if (!display->priv->greeter_session)
-        display->priv->greeter_session = config_get_string (config_get_instance (), "SeatDefaults", "greeter-session");
-    if (config_section && config_has_key (config_get_instance (), config_section, "greeter-hide-users"))
-        display->priv->greeter_hide_users = config_get_boolean (config_get_instance (), config_section, "greeter-hide-users");
-    else if (config_has_key (config_get_instance (), "SeatDefaults", "greeter-hide-users"))
-        display->priv->greeter_hide_users = config_get_boolean (config_get_instance (), "SeatDefaults", "greeter-hide-users");
-    if (config_section)
-        display->priv->user_session = config_get_string (config_get_instance (), config_section, "user-session");
-    if (!display->priv->user_session)
-        display->priv->user_session = config_get_string (config_get_instance (), "SeatDefaults", "user-session");
-    if (config_section)
-        display->priv->xsessions_dir = config_get_string (config_get_instance (), config_section, "xsessions-directory");
-    if (!display->priv->xsessions_dir)
-        display->priv->xsessions_dir = config_get_string (config_get_instance (), "SeatDefaults", "xsessions-directory");
-    if (config_section)
-        display->priv->xgreeters_dir = config_get_string (config_get_instance (), config_section, "xgreeters-directory");
-    if (!display->priv->xgreeters_dir)
-        display->priv->xgreeters_dir = config_get_string (config_get_instance (), "SeatDefaults", "xgreeters-directory");
-    if (config_section)
-        display->priv->session_wrapper = config_get_string (config_get_instance (), config_section, "session-wrapper");
-    if (!display->priv->session_wrapper)
-        display->priv->session_wrapper = config_get_string (config_get_instance (), "SeatDefaults", "session-wrapper");
-}
-
 // FIXME: Should be a construct property
 void
 display_set_display_server (Display *display, DisplayServer *display_server)
@@ -183,6 +145,22 @@ display_get_session (Display *display)
     return display->priv->session;
 }
 
+void
+display_set_greeter_session (Display *display, const gchar *greeter_session)
+{
+    g_return_if_fail (display != NULL);
+    g_free (display->priv->greeter_session);
+    display->priv->greeter_session = g_strdup (greeter_session);
+}
+
+void
+display_set_session_wrapper (Display *display, const gchar *session_wrapper)
+{
+    g_return_if_fail (display != NULL);
+    g_free (display->priv->session_wrapper);
+    display->priv->session_wrapper = g_strdup (session_wrapper);
+}
+
 void
 display_set_allow_guest (Display *display, gboolean allow_guest)
 {
@@ -209,15 +187,19 @@ display_set_select_user_hint (Display *display, const gchar *username, gboolean
     display->priv->select_guest_hint = is_guest;
 }
 
+void
+display_set_hide_users_hint (Display *display, gboolean hide_users)
+{
+    g_return_if_fail (display != NULL);
+    display->priv->greeter_hide_users = hide_users;
+}
+
 void
 display_set_user_session (Display *display, const gchar *session_name)
 {
     g_return_if_fail (display != NULL);
-    if (session_name)
-    {
-        g_free (display->priv->user_session);
-        display->priv->user_session = g_strdup (session_name);
-    }
+    g_free (display->priv->user_session);
+    display->priv->user_session = g_strdup (session_name);
 }
 
 static gboolean
@@ -263,7 +245,7 @@ start_ck_session (Display *display, const gchar *session_type, User *user)
                                            NULL,
                                            "org.freedesktop.ConsoleKit",
                                            "/org/freedesktop/ConsoleKit/Manager",
-                                           "org.freedesktop.ConsoleKit.Manager", 
+                                           "org.freedesktop.ConsoleKit.Manager",
                                            NULL, &error);
     if (!proxy)
         g_warning ("Unable to get connection to ConsoleKit: %s", error->message);
@@ -337,7 +319,7 @@ end_ck_session (const gchar *cookie)
                                            NULL,
                                            "org.freedesktop.ConsoleKit",
                                            "/org/freedesktop/ConsoleKit/Manager",
-                                           "org.freedesktop.ConsoleKit.Manager", 
+                                           "org.freedesktop.ConsoleKit.Manager",
                                            NULL, NULL);
     result = g_dbus_proxy_call_sync (proxy,
                                      "CloseSession",
@@ -384,9 +366,11 @@ static void
 check_stopped (Display *display)
 {
     if (display->priv->stopping &&
+        !display->priv->stopped &&
         display->priv->display_server == NULL &&
         display->priv->session == NULL)
     {
+        display->priv->stopped = TRUE;
         g_debug ("Display stopped");
         g_signal_emit (display, signals[STOPPED], 0);
     }
@@ -427,7 +411,7 @@ autologin_authentication_result_cb (PAMSession *authentication, int result, Disp
     }
 
     if (!started_session)
-       display_stop (display);
+        display_stop (display);
 }
 
 static gboolean
@@ -508,19 +492,22 @@ greeter_session_stopped_cb (Session *session, Display *display)
     if (!display->priv->display_server)
         return;
 
-    /* Start the session for the authenticated user */  
-    if (greeter_get_guest_authenticated (display->priv->greeter))
+    /* Start the session for the authenticated user */
+    if (display->priv->start_session_on_greeter_quit)
     {
-        started_session = autologin_guest (display, FALSE);
-        if (!started_session)
-            g_debug ("Failed to start guest session");
-    }
-    else
-    {
-        display->priv->in_user_session = TRUE;
-        started_session = start_user_session (display, greeter_get_authentication (display->priv->greeter));
-        if (!started_session)
-            g_debug ("Failed to start user session");
+        if (greeter_get_guest_authenticated (display->priv->greeter))
+        {
+            started_session = autologin_guest (display, FALSE);
+            if (!started_session)
+                g_debug ("Failed to start guest session");
+        }
+        else
+        {
+            display->priv->in_user_session = TRUE;
+            started_session = start_user_session (display, greeter_get_authentication (display->priv->greeter));
+            if (!started_session)
+                g_debug ("Failed to start user session");
+        }
     }
 
     g_signal_handlers_disconnect_matched (display->priv->greeter, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, display);
@@ -559,12 +546,12 @@ create_session (Display *display, PAMSession *authentication, const gchar *sessi
 
     // FIXME: This is X specific, move into xsession.c
     if (is_greeter)
-        sessions_dir = display->priv->xgreeters_dir;
+        sessions_dir = config_get_string (config_get_instance (), "LightDM", "xgreeters-directory");
     else
-        sessions_dir = display->priv->xsessions_dir;    
-
+        sessions_dir = config_get_string (config_get_instance (), "LightDM", "xsessions-directory");
     filename = g_strdup_printf ("%s.desktop", session_name);
     path = g_build_filename (sessions_dir, filename, NULL);
+    g_free (sessions_dir);
     g_free (filename);
 
     session_desktop_file = g_key_file_new ();
@@ -641,7 +628,7 @@ create_session (Display *display, PAMSession *authentication, const gchar *sessi
         process_set_env (PROCESS (session), "LIGHTDM_TEST_HOME_DIR", g_getenv ("LIGHTDM_TEST_HOME_DIR"));
         process_set_env (PROCESS (session), "LD_LIBRARY_PATH", g_getenv ("LD_LIBRARY_PATH"));
     }
+
     return session;
 }
 
@@ -678,7 +665,8 @@ greeter_start_session_cb (Greeter *greeter, const gchar *session_name, Display *
 
     /* Stop the greeter, the session will start when the greeter has quit */
     g_debug ("Stopping greeter");
-    session_stop (display->priv->session);  
+    display->priv->start_session_on_greeter_quit = TRUE;
+    session_stop (display->priv->session);
 
     return TRUE;
 }
@@ -695,19 +683,23 @@ start_greeter_session (Display *display)
 
     if (getuid () != 0)
         user = user_get_current ();
-    else if (display->priv->greeter_user)
+    else
     {
-        user = user_get_by_name (display->priv->greeter_user);
-        if (!user)
+        gchar *greeter_user;
+
+        greeter_user = config_get_string (config_get_instance (), "LightDM", "greeter-user");
+        if (!greeter_user)
         {
-            g_debug ("Unable to start greeter, user %s does not exist", display->priv->greeter_user);
+            g_warning ("Greeter must not be run as root");
             return FALSE;
         }
-    }
-    else
-    {
-        g_warning ("Greeter must not be run as root");
-        return FALSE;
+
+        user = user_get_by_name (greeter_user);
+        if (!user)
+            g_debug ("Unable to start greeter, user %s does not exist", greeter_user);
+        g_free (greeter_user);
+        if (!user)
+            return FALSE;
     }
     display->priv->in_user_session = FALSE;
 
@@ -739,7 +731,7 @@ start_greeter_session (Display *display)
         if (display->priv->autologin_user)
             greeter_set_hint (display->priv->greeter, "autologin-user", display->priv->autologin_user);
         else if (display->priv->autologin_guest)
-            greeter_set_hint (display->priv->greeter, "autologin-guest", "true");        
+            greeter_set_hint (display->priv->greeter, "autologin-guest", "true");
     }
     if (display->priv->select_user_hint)
         greeter_set_hint (display->priv->greeter, "select-user", display->priv->select_user_hint);
@@ -784,7 +776,7 @@ start_user_session (Display *display, PAMSession *authentication)
     gboolean result = FALSE;
 
     g_debug ("Starting user session");
-  
+
     user = pam_session_get_user (authentication);
 
     /* Load the users login settings (~/.dmrc) */
@@ -925,7 +917,7 @@ display_unlock (Display *display)
                                            NULL,
                                            "org.freedesktop.ConsoleKit",
                                            "/org/freedesktop/ConsoleKit/Manager",
-                                           "org.freedesktop.ConsoleKit.Manager", 
+                                           "org.freedesktop.ConsoleKit.Manager",
                                            NULL, &error);
     if (!proxy)
         g_warning ("Unable to get connection to ConsoleKit: %s", error->message);
@@ -961,7 +953,7 @@ display_unlock (Display *display)
                                            NULL,
                                            "org.freedesktop.ConsoleKit",
                                            session_path,
-                                           "org.freedesktop.ConsoleKit.Session", 
+                                           "org.freedesktop.ConsoleKit.Session",
                                            NULL, &error);
     if (!proxy)
         g_warning ("Unable to get connection to ConsoleKit session: %s", error->message);
@@ -1029,12 +1021,9 @@ display_finalize (GObject *object)
 
     if (self->priv->display_server)
         g_object_unref (self->priv->display_server);
-    g_free (self->priv->greeter_user);
     g_free (self->priv->greeter_session);
     if (self->priv->greeter)
         g_object_unref (self->priv->greeter);
-    g_free (self->priv->xsessions_dir);
-    g_free (self->priv->xgreeters_dir);
     g_free (self->priv->session_wrapper);
     g_free (self->priv->pam_service);
     g_free (self->priv->pam_autologin_service);
index 28c707e9fc4855880396e1aff915e51774a18b12..e1351336ccc8e7c219737527b3cfc65e321b4c60 100644 (file)
@@ -52,8 +52,6 @@ typedef struct
 
 GType display_get_type (void);
 
-void display_load_config (Display *display, const gchar *config_section);
-
 void display_set_display_server (Display *display, DisplayServer *display_server);
 
 DisplayServer *display_get_display_server (Display *display);
@@ -62,12 +60,18 @@ const gchar *display_get_username (Display *display);
 
 Session *display_get_session (Display *display);
 
+void display_set_greeter_session (Display *display, const gchar *greeter_session);
+
+void display_set_session_wrapper (Display *display, const gchar *session_wrapper);
+
 void display_set_allow_guest (Display *display, gboolean allow_guest);
 
 void display_set_autologin_user (Display *display, const gchar *username, gboolean is_guest, gint timeout);
 
 void display_set_select_user_hint (Display *display, const gchar *username, gboolean is_guest);
 
+void display_set_hide_users_hint (Display *display, gboolean hide_users);
+
 void display_set_user_session (Display *display, const gchar *session_name);
 
 gboolean display_start (Display *display);
index 56a3a4f430d940f63d6c01a4ec55502a4fc0b60a..0cb9fdf59abe349f7d11d5eaf8cdc6a077f2b21e 100644 (file)
@@ -376,13 +376,14 @@ handle_start_session (Greeter *greeter, const gchar *session)
     if (strcmp (session, "") == 0)
         session = NULL;
 
-    if (session)
-        g_debug ("Start session %s", session);
-    else
-        g_debug ("Start default session");
-
     if (greeter->priv->guest_account_authenticated || pam_session_get_is_authenticated (greeter->priv->authentication))
+    {
+        if (session)
+            g_debug ("Start session %s", session);
+        else
+            g_debug ("Start default session");     
         g_signal_emit (greeter, signals[START_SESSION], 0, session, &result);
+    }
     else
     {
         g_debug ("Ignoring start session request, user is not authorized");
index b9b0af957c39495eb72f4cabb72915b0db131f5c..43b978ee193d2e66e1f6e7907bad2bc87547f6f1 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "configuration.h"
 #include "display-manager.h"
+#include "xdmcp-server.h"
+#include "seat-xdmcp-session.h"
 #include "xserver.h"
 #include "user.h"
 #include "pam-session.h"
@@ -33,7 +35,7 @@ static FILE *log_file;
 static gboolean debug = FALSE;
 
 static DisplayManager *display_manager = NULL;
-
+static XDMCPServer *xdmcp_server = NULL;
 static GDBusConnection *bus = NULL;
 static guint bus_id;
 static GDBusNodeInfo *seat_info;
@@ -122,6 +124,7 @@ signal_cb (Process *process, int signum)
 {
     g_debug ("Caught %s signal, shutting down", g_strsignal (signum));
     display_manager_stop (display_manager);
+    // FIXME: Stop XDMCP server
 }
 
 static void
@@ -209,6 +212,34 @@ handle_display_manager_get_property (GDBusConnection       *connection,
     return result;
 }
 
+static void
+set_seat_properties (Seat *seat, const gchar *config_section)
+{
+    gchar **keys;
+    gint i;
+
+    keys = config_get_keys (config_get_instance (), "SeatDefaults");
+    for (i = 0; keys[i]; i++)
+    {
+        gchar *value = config_get_string (config_get_instance (), "SeatDefaults", keys[i]);
+        seat_set_property (seat, keys[i], value);
+        g_free (value);
+    }
+    g_strfreev (keys);
+
+    if (config_section)
+    {
+        keys = config_get_keys (config_get_instance (), config_section);
+        for (i = 0; keys[i]; i++)
+        {
+            gchar *value = config_get_string (config_get_instance (), config_section, keys[i]);
+            seat_set_property (seat, keys[i], value);
+            g_free (value);
+        }
+        g_strfreev (keys);
+    }
+}
+
 static void
 handle_display_manager_call (GDBusConnection       *connection,
                              const gchar           *sender,
@@ -219,7 +250,47 @@ handle_display_manager_call (GDBusConnection       *connection,
                              GDBusMethodInvocation *invocation,
                              gpointer               user_data)
 {
-    if (g_strcmp0 (method_name, "GetSeatForCookie") == 0)
+    if (g_strcmp0 (method_name, "AddSeat") == 0)
+    {
+        gchar *type;
+        GVariantIter *property_iter;
+        gchar *name, *value;
+        Seat *seat;
+
+        if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa(ss))")))
+            return;
+
+        g_variant_get (parameters, "(&sa(ss))", &type, &property_iter);
+
+        g_debug ("Adding seat of type %s", type);
+
+        seat = seat_new (type);
+        if (seat)
+        {
+            set_seat_properties (seat, NULL);
+            while (g_variant_iter_loop (property_iter, "(&s&s)", &name, &value))
+                seat_set_property (seat, name, value);
+        }
+        g_variant_iter_free (property_iter);
+
+        if (!seat)
+        {
+            // FIXME: Need to make proper error
+            g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Unable to create seat of type %s", type);
+            return;
+        }
+
+        if (display_manager_add_seat (display_manager, seat))
+        {
+            BusEntry *entry;
+
+            entry = g_hash_table_lookup (seat_bus_entries, seat);
+            g_dbus_method_invocation_return_value (invocation, g_variant_new ("(o)", entry->path));
+        }
+        else// FIXME: Need to make proper error
+            g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Failed to start seat");
+    }
+    else if (g_strcmp0 (method_name, "GetSeatForCookie") == 0)
     {
         gchar *cookie;
         Seat *seat = NULL;
@@ -228,11 +299,9 @@ handle_display_manager_call (GDBusConnection       *connection,
         if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(s)")))
             return;
 
-        g_variant_get (parameters, "(s)", &cookie);
+        g_variant_get (parameters, "(&s)", &cookie);
 
         get_session_for_cookie (cookie, &seat);
-        g_free (cookie);
-
         if (seat)
             entry = g_hash_table_lookup (seat_bus_entries, seat);
         if (entry)
@@ -249,10 +318,9 @@ handle_display_manager_call (GDBusConnection       *connection,
         if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(s)")))
             return;
 
-        g_variant_get (parameters, "(s)", &cookie);
+        g_variant_get (parameters, "(&s)", &cookie);
 
         session = get_session_for_cookie (cookie, NULL);
-        g_free (cookie);
         if (session)
             entry = g_hash_table_lookup (session_bus_entries, session);
         if (entry)
@@ -397,6 +465,7 @@ static void
 bus_entry_free (gpointer data)
 {
     BusEntry *entry = data;
+
     g_dbus_connection_unregister_object (bus, entry->bus_id);
 
     g_dbus_connection_emit_signal (bus,
@@ -442,7 +511,7 @@ session_started_cb (Display *display, Seat *seat)
     session = display_get_session (display);
 
     seat_entry = g_hash_table_lookup (seat_bus_entries, seat);
-    entry = bus_entry_new (process_get_env (PROCESS (session), "XDG_SEAT_PATH"), seat_entry ? seat_entry->path : NULL, "SessionRemoved");
+    entry = bus_entry_new (process_get_env (PROCESS (session), "XDG_SESSION_PATH"), seat_entry ? seat_entry->path : NULL, "SessionRemoved");
     g_hash_table_insert (session_bus_entries, g_object_ref (session), entry);
 
     entry->bus_id = g_dbus_connection_register_object (bus,
@@ -513,7 +582,7 @@ seat_added_cb (DisplayManager *display_manager, Seat *seat)
 }
 
 static void
-seat_removed_cb (Seat *seat)
+seat_removed_cb (DisplayManager *display_manager, Seat *seat)
 {
     g_hash_table_remove (seat_bus_entries, seat);
 }
@@ -528,6 +597,11 @@ bus_acquired_cb (GDBusConnection *connection,
         "  <interface name='org.freedesktop.DisplayManager'>"
         "    <property name='Seats' type='ao' access='read'/>"
         "    <property name='Sessions' type='ao' access='read'/>"
+        "    <method name='AddSeat'>"
+        "      <arg name='type' direction='in' type='s'/>"
+        "      <arg name='properties' direction='in' type='a(ss)'/>"
+        "      <arg name='seat' direction='out' type='o'/>"
+        "    </method>"
         "    <method name='GetSeatForCookie'>"
         "      <arg name='cookie' direction='in' type='s'/>"
         "      <arg name='seat' direction='out' type='o'/>"
@@ -636,11 +710,27 @@ path_make_absolute (gchar *path)
     return abs_path;
 }
 
+static gboolean
+xdmcp_session_cb (XDMCPServer *server, XDMCPSession *session)
+{
+    SeatXDMCPSession *seat;
+    gboolean result;
+
+    seat = seat_xdmcp_session_new (session);
+    set_seat_properties (SEAT (seat), NULL);
+    result = display_manager_add_seat (display_manager, SEAT (seat));
+    g_object_unref (seat);
+  
+    return result;
+}
+
 int
 main (int argc, char **argv)
 {
     FILE *pid_file;
     GOptionContext *option_context;
+    gchar **groups, **i;
+    gint n_seats = 0;
     gboolean explicit_config = FALSE;
     gboolean test_mode = FALSE;
     gchar *pid_path = "/var/run/lightdm.pid";
@@ -831,10 +921,6 @@ main (int argc, char **argv)
         config_set_string (config_get_instance (), "SeatDefaults", "type", "xlocal");
     if (!config_has_key (config_get_instance (), "SeatDefaults", "xserver-command"))
         config_set_string (config_get_instance (), "SeatDefaults", "xserver-command", "X");
-    if (!config_has_key (config_get_instance (), "SeatDefaults", "xsessions-directory"))
-        config_set_string (config_get_instance (), "SeatDefaults", "xsessions-directory", XSESSIONS_DIR);
-    if (!config_has_key (config_get_instance (), "SeatDefaults", "xgreeters-directory"))
-        config_set_string (config_get_instance (), "SeatDefaults", "xgreeters-directory", XGREETERS_DIR);
     if (!config_has_key (config_get_instance (), "SeatDefaults", "allow-guest"))
         config_set_boolean (config_get_instance (), "SeatDefaults", "allow-guest", TRUE);
     if (!config_has_key (config_get_instance (), "SeatDefaults", "greeter-session"))
@@ -852,6 +938,10 @@ main (int argc, char **argv)
     if (!config_has_key (config_get_instance (), "LightDM", "cache-directory"))
         config_set_string (config_get_instance (), "LightDM", "cache-directory", default_cache_dir);
     g_free (default_cache_dir);
+    if (!config_has_key (config_get_instance (), "LightDM", "xsessions-directory"))
+        config_set_string (config_get_instance (), "LightDM", "xsessions-directory", XSESSIONS_DIR);
+    if (!config_has_key (config_get_instance (), "LightDM", "xgreeters-directory"))
+        config_set_string (config_get_instance (), "LightDM", "xgreeters-directory", XGREETERS_DIR);
 
     /* Override defaults */
     if (minimum_vt)
@@ -869,6 +959,12 @@ main (int argc, char **argv)
     if (cache_dir)
         config_set_string (config_get_instance (), "LightDM", "cache-directory", cache_dir);
     g_free (cache_dir);
+    if (xsessions_dir)
+        config_set_string (config_get_instance (), "LightDM", "xsessions-directory", xsessions_dir);
+    g_free (xsessions_dir);
+    if (xgreeters_dir)
+        config_set_string (config_get_instance (), "LightDM", "xgreeters-directory", xgreeters_dir);
+    g_free (xgreeters_dir);
     if (xserver_command)
         config_set_string (config_get_instance (), "SeatDefaults", "xserver-command", xserver_command);
     g_free (xserver_command);
@@ -881,12 +977,6 @@ main (int argc, char **argv)
     if (session_wrapper)
         config_set_string (config_get_instance (), "SeatDefaults", "session-wrapper", session_wrapper);
     g_free (session_wrapper);
-    if (xsessions_dir)
-        config_set_string (config_get_instance (), "SeatDefaults", "xsessions-directory", xsessions_dir);
-    g_free (xsessions_dir);
-    if (xgreeters_dir)
-        config_set_string (config_get_instance (), "SeatDefaults", "xgreeters-directory", xgreeters_dir);
-    g_free (xgreeters_dir);
 
     /* Create run and cache directories */
     g_mkdir_with_parents (config_get_string (config_get_instance (), "LightDM", "log-directory"), S_IRWXU | S_IXGRP | S_IXOTH);  
@@ -925,8 +1015,105 @@ main (int argc, char **argv)
     display_manager = display_manager_new ();
     g_signal_connect (display_manager, "stopped", G_CALLBACK (display_manager_stopped_cb), NULL);
 
+    /* Load the static display entries */
+    groups = config_get_groups (config_get_instance ());
+    for (i = groups; *i; i++)
+    {
+        gchar *config_section = *i;
+        gchar *type;
+        Seat *seat;
+
+        if (!g_str_has_prefix (config_section, "Seat:"))
+            continue;
+
+        g_debug ("Loading seat %s", config_section);
+        type = config_get_string (config_get_instance (), config_section, "type");
+        if (!type)
+            type = config_get_string (config_get_instance (), config_section, "type");
+        seat = seat_new (type);
+        g_free (type);
+        if (seat)
+        {
+            set_seat_properties (seat, config_section);
+            display_manager_add_seat (display_manager, seat);
+            n_seats++;
+        }
+        else
+            g_warning ("Failed to create seat %s", config_section);
+    }
+    g_strfreev (groups);
+
+    /* If no seats start a default one */
+    if (n_seats == 0 && config_get_boolean (config_get_instance (), "LightDM", "start-default-seat"))
+    {
+        gchar *type;
+        Seat *seat;
+
+        g_debug ("Adding default seat");
+
+        type = config_get_string (config_get_instance (), "SeatDefaults", "type");
+        seat = seat_new (type);
+        g_free (type);
+        if (seat)
+        {
+            set_seat_properties (seat, NULL);
+            display_manager_add_seat (display_manager, seat);
+        }
+        else
+            g_warning ("Failed to create default seat");
+    }
+
     display_manager_start (display_manager);
 
+    /* Start the XDMCP server */
+    if (config_get_boolean (config_get_instance (), "XDMCPServer", "enabled"))
+    {
+        gchar *key_name, *key = NULL;
+
+        xdmcp_server = xdmcp_server_new ();
+        if (config_has_key (config_get_instance (), "XDMCPServer", "port"))
+        {
+            gint port;
+            port = config_get_integer (config_get_instance (), "XDMCPServer", "port");
+            if (port > 0)
+                xdmcp_server_set_port (xdmcp_server, port);
+        }
+        g_signal_connect (xdmcp_server, "new-session", G_CALLBACK (xdmcp_session_cb), NULL);
+
+        key_name = config_get_string (config_get_instance (), "XDMCPServer", "key");
+        if (key_name)
+        {
+            gchar *dir, *path;
+            GKeyFile *keys;
+            GError *error = NULL;
+
+            dir = config_get_string (config_get_instance (), "LightDM", "config-directory");
+            path = g_build_filename (dir, "keys.conf", NULL);
+            g_free (dir);
+
+            keys = g_key_file_new ();
+            if (g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error))
+            {
+                if (g_key_file_has_key (keys, "keyring", key_name, NULL))
+                    key = g_key_file_get_string (keys, "keyring", key_name, NULL);
+                else
+                    g_debug ("Key %s not defined", error->message);
+            }
+            else
+                g_debug ("Error getting key %s", error->message);
+            g_clear_error (&error);
+            g_free (path);
+            g_key_file_free (keys);
+        }
+        if (key)
+            xdmcp_server_set_key (xdmcp_server, key);
+        g_free (key_name);
+        g_free (key);
+
+        g_debug ("Starting XDMCP server on UDP/IP port %d", xdmcp_server_get_port (xdmcp_server));
+        xdmcp_server_start (xdmcp_server);
+    }
+
     g_main_loop_run (loop);
 
     return EXIT_SUCCESS;
index 8ea36856300917f53429677e0f910ff44b55d4a1..5d3570c119db13062793bca2e405c2521c15aa18 100644 (file)
 
 G_DEFINE_TYPE (SeatXLocal, seat_xlocal, SEAT_TYPE);
 
-struct SeatXLocalPrivate
-{
-    /* TRUE if stopping this seat (waiting for displays to stop) */
-    gboolean stopping;
-};
-
 static void
 seat_xlocal_setup (Seat *seat)
 {
@@ -37,62 +31,38 @@ seat_xlocal_add_display (Seat *seat)
 {
     XServerLocal *xserver;
     XDisplay *display;
-    const gchar *config_section;
-    gchar *command = NULL, *layout = NULL, *config_file = NULL, *xdmcp_manager = NULL, *key_name = NULL, *key = NULL;
+    const gchar *command = NULL, *layout = NULL, *config_file = NULL, *xdmcp_manager = NULL, *key_name = NULL;
     gint port = 0;
 
-    g_debug ("Starting Local X Display");
+    g_debug ("Starting local X display");
   
     xserver = xserver_local_new ();
 
-    config_section = seat_get_config_section (seat);
-
     /* If running inside an X server use Xephyr instead */
     if (g_getenv ("DISPLAY"))
-        command = g_strdup ("Xephyr");
-    if (!command && config_section)
-        command = config_get_string (config_get_instance (), config_section, "xserver-command");
+        command = "Xephyr";
     if (!command)
-        command = config_get_string (config_get_instance (), "SeatDefaults", "xserver-command");
+        command = seat_get_string_property (seat, "xserver-command");
     if (command)
         xserver_local_set_command (xserver, command);
-    g_free (command);
 
-    if (config_section)
-        layout = config_get_string (config_get_instance (), config_section, "xserver-layout");
-    if (!layout)
-        layout = config_get_string (config_get_instance (), "SeatDefaults", "layout");
+    layout = seat_get_string_property (seat, "xserver-layout");
     if (layout)
         xserver_local_set_layout (xserver, layout);
-    g_free (layout);
 
-    if (config_section)
-        config_file = config_get_string (config_get_instance (), config_section, "xserver-config");
-    if (!config_file)
-        config_file = config_get_string (config_get_instance (), "SeatDefaults", "xserver-config");
+    config_file = seat_get_string_property (seat, "xserver-config");
     if (config_file)
         xserver_local_set_config (xserver, config_file);
-    g_free (config_file);
 
-    if (config_section)
-        xdmcp_manager = config_get_string (config_get_instance (), config_section, "xdmcp-manager");
-    if (!xdmcp_manager)
-        xdmcp_manager = config_get_string (config_get_instance (), "SeatDefaults", "xdmcp-manager");
+    xdmcp_manager = seat_get_string_property (seat, "xdmcp-manager");
     if (xdmcp_manager)
         xserver_local_set_xdmcp_server (xserver, xdmcp_manager);
-    g_free (xdmcp_manager);
 
-    if (config_section && config_has_key (config_get_instance (), config_section, "xdmcp-port"))
-        port = config_get_integer (config_get_instance (), config_section, "xdmcp-port");
-    else if (config_has_key (config_get_instance (), "SeatDefaults", "xdmcp-port"))
-        port = config_get_integer (config_get_instance (), "SeatDefaults", "xdmcp-port");
+    port = seat_get_integer_property (seat, "xdmcp-port");
     if (port > 0)
         xserver_local_set_xdmcp_port (xserver, port);
 
-    if (config_section)
-        key_name = config_get_string (config_get_instance (), config_section, "xdmcp-key");
-    if (!key_name)
-        key_name = config_get_string (config_get_instance (), "SeatDefaults", "xdmcp-key");
+    key_name = seat_get_string_property (seat, "xdmcp-key");
     if (key_name)
     {
         gchar *dir, *path;
@@ -106,10 +76,16 @@ seat_xlocal_add_display (Seat *seat)
         keys = g_key_file_new ();
         if (g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error))
         {
+            gchar *key = NULL;
+
             if (g_key_file_has_key (keys, "keyring", key_name, NULL))
                 key = g_key_file_get_string (keys, "keyring", key_name, NULL);
             else
                 g_debug ("Key %s not defined", error->message);
+
+            if (key)
+                xserver_local_set_xdmcp_key (xserver, key);
+            g_free (key);
         }
         else
             g_debug ("Error getting key %s", error->message);
@@ -117,10 +93,6 @@ seat_xlocal_add_display (Seat *seat)
         g_clear_error (&error);
         g_key_file_free (keys);
     }
-    if (key)
-        xserver_local_set_xdmcp_key (xserver, key);
-    g_free (key_name);
-    g_free (key);
 
     display = xdisplay_new (XSERVER (xserver));
     g_object_unref (xserver);
@@ -141,27 +113,17 @@ seat_xlocal_set_active_display (Seat *seat, Display *display)
 static void
 seat_xlocal_display_removed (Seat *seat, Display *display)
 {
-    SeatXLocalPrivate *priv = SEAT_XLOCAL (seat)->priv;
-
     /* Show a new greeter */
-    if (!priv->stopping && display == seat_get_active_display (seat))
+    if (!seat_get_is_stopping (seat) && display == seat_get_active_display (seat))
     {
         g_debug ("Active display stopped, switching to greeter");
         seat_switch_to_greeter (seat);
     }
 }
 
-static void
-seat_xlocal_stop (Seat *seat)
-{
-    SEAT_XLOCAL (seat)->priv->stopping = TRUE;
-    SEAT_CLASS (seat_xlocal_parent_class)->stop (seat);
-}
-
 static void
 seat_xlocal_init (SeatXLocal *seat)
 {
-    seat->priv = G_TYPE_INSTANCE_GET_PRIVATE (seat, SEAT_XLOCAL_TYPE, SeatXLocalPrivate);
 }
 
 static void
@@ -173,7 +135,4 @@ seat_xlocal_class_init (SeatXLocalClass *klass)
     seat_class->add_display = seat_xlocal_add_display;
     seat_class->set_active_display = seat_xlocal_set_active_display;
     seat_class->display_removed = seat_xlocal_display_removed;
-    seat_class->stop = seat_xlocal_stop;
-
-    g_type_class_add_private (klass, sizeof (SeatXLocalPrivate));
 }
diff --git a/src/seat-xremote.c b/src/seat-xremote.c
new file mode 100644 (file)
index 0000000..f99566f
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010-2011 Robert Ancell.
+ * Author: Robert Ancell <robert.ancell@canonical.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 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <string.h>
+
+#include "seat-xremote.h"
+#include "configuration.h"
+#include "xdisplay.h"
+#include "xserver-remote.h"
+#include "vt.h"
+
+G_DEFINE_TYPE (SeatXRemote, seat_xremote, SEAT_TYPE);
+
+struct SeatXRemotePrivate
+{
+    /* Display being controlled by this seat */
+    XDisplay *display;
+};
+
+static void
+seat_xremote_setup (Seat *seat)
+{
+    seat_set_can_switch (seat, FALSE);
+    SEAT_CLASS (seat_xremote_parent_class)->setup (seat);
+}
+
+static Display *
+seat_xremote_add_display (Seat *seat)
+{
+    XServerRemote *xserver;
+    const gchar *hostname;
+    gint number;
+
+    /* Can only have one display */
+    if (SEAT_XREMOTE (seat)->priv->display)
+        return NULL;
+
+    hostname = seat_get_string_property (seat, "xserver-hostname");
+    if (!hostname)
+        hostname = "localhost";
+    number = seat_get_integer_property (seat, "xserver-display-number");
+
+    g_debug ("Starting remote X display %s:%d", hostname, number);
+
+    xserver = xserver_remote_new (hostname, number, NULL);
+
+    SEAT_XREMOTE (seat)->priv->display = xdisplay_new (XSERVER (xserver));
+    g_object_unref (xserver);
+  
+    return DISPLAY (SEAT_XREMOTE (seat)->priv->display);
+}
+
+static void
+seat_xremote_display_removed (Seat *seat, Display *display)
+{
+    /* Can't restart the display, so remote this seat */
+    seat_stop (seat);
+}
+
+static void
+seat_xremote_init (SeatXRemote *seat)
+{
+    seat->priv = G_TYPE_INSTANCE_GET_PRIVATE (seat, SEAT_XREMOTE_TYPE, SeatXRemotePrivate);
+}
+
+static void
+seat_xremote_class_init (SeatXRemoteClass *klass)
+{
+    SeatClass *seat_class = SEAT_CLASS (klass);
+
+    seat_class->setup = seat_xremote_setup;
+    seat_class->add_display = seat_xremote_add_display;
+    seat_class->display_removed = seat_xremote_display_removed;
+
+    g_type_class_add_private (klass, sizeof (SeatXRemotePrivate));
+}
diff --git a/src/seat-xremote.h b/src/seat-xremote.h
new file mode 100644 (file)
index 0000000..583923c
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010-2011 Robert Ancell.
+ * Author: Robert Ancell <robert.ancell@canonical.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 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#ifndef _SEAT_XREMOTE_H_
+#define _SEAT_XREMOTE_H_
+
+#include <glib-object.h>
+#include "seat.h"
+
+G_BEGIN_DECLS
+
+#define SEAT_XREMOTE_TYPE (seat_xremote_get_type())
+#define SEAT_XREMOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAT_XREMOTE_TYPE, SeatXRemote))
+
+typedef struct SeatXRemotePrivate SeatXRemotePrivate;
+
+typedef struct
+{
+    Seat               parent_instance;
+    SeatXRemotePrivate *priv;
+} SeatXRemote;
+
+typedef struct
+{
+    SeatClass parent_class;
+} SeatXRemoteClass;
+
+GType seat_xremote_get_type (void);
+
+G_END_DECLS
+
+#endif /* _SEAT_XREMOTE_H_ */
index 507a31146a1c00dfa794e59f9c72bf382edee21a..3cabd9ff24afe045622551c68f9fdf4c06c49d24 100644 (file)
@@ -9,10 +9,10 @@
  * license.
  */
 
+#include <stdlib.h>
 #include <string.h>
 
 #include "seat.h"
-#include "configuration.h"
 #include "display.h"
 #include "xserver.h"
 #include "guest-account.h"
@@ -29,22 +29,14 @@ static guint signals[LAST_SIGNAL] = { 0 };
 struct SeatPrivate
 {
     /* Configuration for this seat */
-    gchar *config_section;
+    GHashTable *properties;
 
     /* TRUE if able to switch users */
     gboolean can_switch;
 
-    /* TRUE if allowed to log into guest account */
-    gboolean allow_guest;
-
     /* Name of guest account */
     gchar *guest_username;
 
-    /* User to automatically log in as */
-    gchar *autologin_username;
-    gboolean autologin_guest;
-    guint autologin_timeout;
-
     /* The displays for this seat */
     GList *displays;
 
@@ -53,6 +45,9 @@ struct SeatPrivate
 
     /* TRUE if stopping this seat (waiting for displays to stop) */
     gboolean stopping;
+
+    /* TRUE if stopped */
+    gboolean stopped;
 };
 
 G_DEFINE_TYPE (Seat, seat, G_TYPE_OBJECT);
@@ -81,27 +76,57 @@ seat_register_module (const gchar *name, GType type)
 }
 
 Seat *
-seat_new (const gchar *module, const gchar *config_section)
+seat_new (const gchar *module_name)
 {
     Seat *seat;
     SeatModule *m = NULL;
+  
+    g_return_val_if_fail (module_name != NULL, NULL);
 
     if (seat_modules)
-        m = g_hash_table_lookup (seat_modules, module);
+        m = g_hash_table_lookup (seat_modules, module_name);
     if (!m)
         return NULL;
 
     seat = g_object_new (m->type, NULL);
-    seat->priv->config_section = g_strdup (config_section);
 
     return seat;
 }
 
+void
+seat_set_property (Seat *seat, const gchar *name, const gchar *value)
+{
+    g_return_if_fail (seat != NULL);
+    g_hash_table_insert (seat->priv->properties, g_strdup (name), g_strdup (value));
+}
+
+gboolean
+seat_has_property (Seat *seat, const gchar *name)
+{
+    g_return_val_if_fail (seat != NULL, FALSE);
+    return g_hash_table_lookup (seat->priv->properties, name) != NULL;
+}
+
 const gchar *
-seat_get_config_section (Seat *seat)
+seat_get_string_property (Seat *seat, const gchar *name)
 {
     g_return_val_if_fail (seat != NULL, NULL);
-    return seat->priv->config_section;
+    return g_hash_table_lookup (seat->priv->properties, name);
+}
+
+gboolean
+seat_get_boolean_property (Seat *seat, const gchar *name)
+{
+    return g_strcmp0 (seat_get_string_property (seat, name), "true") == 0;
+}
+
+gint
+seat_get_integer_property (Seat *seat, const gchar *name)
+{
+    const gchar *value;
+
+    value = seat_get_string_property (seat, name);
+    return value ? atoi (value) : 0;
 }
 
 void
@@ -154,7 +179,7 @@ gboolean
 seat_get_allow_guest (Seat *seat)
 {
     g_return_val_if_fail (seat != NULL, FALSE);  
-    return seat->priv->allow_guest && guest_account_is_installed ();
+    return seat_get_boolean_property (seat, "allow-guest") && guest_account_is_installed ();
 }
 
 static gboolean
@@ -227,16 +252,17 @@ display_session_stopped_cb (Display *display, Seat *seat)
     }
 }
 
-static gboolean
+static void
 check_stopped (Seat *seat)
 {
-    if (g_list_length (seat->priv->displays) == 0)
+    if (seat->priv->stopping &&
+        !seat->priv->stopped &&
+        g_list_length (seat->priv->displays) == 0)
     {
+        seat->priv->stopped = TRUE;
         g_debug ("Seat stopped");
         g_signal_emit (seat, signals[STOPPED], 0);
-        return TRUE;
     }
-    return FALSE;
 }
 
 static void
@@ -247,8 +273,7 @@ display_stopped_cb (Display *display, Seat *seat)
     g_signal_emit (seat, signals[DISPLAY_REMOVED], 0, display);
     g_object_unref (display);
 
-    if (seat->priv->stopping)
-        check_stopped (seat);
+    check_stopped (seat);
 }
 
 static gboolean
@@ -296,18 +321,22 @@ switch_to_user_or_start_greeter (Seat *seat, const gchar *username, gboolean is_
     }
 
     new_display = SEAT_GET_CLASS (seat)->add_display (seat);
-    display_load_config (DISPLAY (new_display), seat->priv->config_section);
     g_signal_connect (new_display, "switch-to-user", G_CALLBACK (display_switch_to_user_cb), seat);
     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, "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"));
+    display_set_session_wrapper (new_display, seat_get_string_property (seat, "session-wrapper"));
+    display_set_hide_users_hint (new_display, seat_get_boolean_property (seat, "greeter-hide-users"));
     display_set_allow_guest (new_display, seat_get_allow_guest (seat));
     if (autologin)
         display_set_autologin_user (new_display, username, is_guest, 0);
     else
         display_set_select_user_hint (new_display, username, is_guest);
+    if (!session_name)
+        session_name = seat_get_string_property (seat, "user-session");
     display_set_user_session (new_display, session_name);
 
     seat->priv->displays = g_list_append (seat->priv->displays, new_display);
@@ -373,38 +402,30 @@ seat_stop (Seat *seat)
     SEAT_GET_CLASS (seat)->stop (seat);
 }
 
+gboolean
+seat_get_is_stopping (Seat *seat)
+{
+    g_return_val_if_fail (seat != NULL, FALSE);
+    return seat->priv->stopping;
+}
+
 static void
 seat_real_setup (Seat *seat)
 {
-    if (seat->priv->config_section && config_has_key (config_get_instance (), seat->priv->config_section, "allow-guest"))
-        seat->priv->allow_guest = config_get_boolean (config_get_instance (), seat->priv->config_section, "allow-guest");
-    else if (config_has_key (config_get_instance (), "SeatDefaults", "allow-guest"))
-        seat->priv->allow_guest = config_get_boolean (config_get_instance (), "SeatDefaults", "allow-guest");
-    if (seat->priv->config_section && config_has_key (config_get_instance (), seat->priv->config_section, "autologin-guest"))
-        seat->priv->autologin_guest = config_get_boolean (config_get_instance (), seat->priv->config_section, "autologin-guest");
-    else if (config_has_key (config_get_instance (), "SeatDefaults", "autologin-guest"))
-        seat->priv->autologin_guest = config_get_boolean (config_get_instance (), "SeatDefaults", "autologin-guest");
-    if (seat->priv->config_section)
-        seat->priv->autologin_username = config_get_string (config_get_instance (), seat->priv->config_section, "autologin-user");
-    if (!seat->priv->autologin_username)
-        seat->priv->autologin_username = config_get_string (config_get_instance (), "SeatDefaults", "autologin-user");
-    if (seat->priv->config_section && config_has_key (config_get_instance (), seat->priv->config_section, "autologin-user-timeout"))
-        seat->priv->autologin_timeout = config_get_integer (config_get_instance (), seat->priv->config_section, "autologin-user-timeout");
-    else
-        seat->priv->autologin_timeout = config_get_integer (config_get_instance (), "SeatDefaults", "autologin-user-timeout");
-    if (seat->priv->autologin_timeout < 0)
-        seat->priv->autologin_timeout = 0;
 }
 
 static gboolean
 seat_real_start (Seat *seat)
 {
+    const gchar *autologin_username;
+
     g_debug ("Starting seat");
 
     /* Start showing a greeter */
-    if (seat->priv->autologin_username)
-        return switch_to_user_or_start_greeter (seat, seat->priv->autologin_username, FALSE, NULL, TRUE);
-    else if (seat->priv->autologin_guest)
+    autologin_username = seat_get_string_property (seat, "autologin-user");
+    if (autologin_username)
+        return switch_to_user_or_start_greeter (seat, autologin_username, FALSE, NULL, TRUE);
+    else if (seat_get_boolean_property (seat, "autologin-guest"))
         return switch_to_user_or_start_greeter (seat, NULL, TRUE, NULL, TRUE);
     else
         return switch_to_user_or_start_greeter (seat, NULL, FALSE, NULL, FALSE);
@@ -440,7 +461,8 @@ seat_real_stop (Seat *seat)
 {
     GList *link;
 
-    if (check_stopped (seat))
+    check_stopped (seat);
+    if (seat->priv->stopped)
         return;
 
     for (link = seat->priv->displays; link; link = link->next)
@@ -454,6 +476,7 @@ static void
 seat_init (Seat *seat)
 {
     seat->priv = G_TYPE_INSTANCE_GET_PRIVATE (seat, SEAT_TYPE, SeatPrivate);
+    seat->priv->properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 }
 
 static void
@@ -463,7 +486,8 @@ seat_finalize (GObject *object)
 
     self = SEAT (object);
 
-    g_free (self->priv->config_section);
+    g_hash_table_unref (self->priv->properties);
+    g_free (self->priv->guest_username);
     g_list_free_full (self->priv->displays, g_object_unref);
     if (self->priv->active_display)
         g_object_unref (self->priv->active_display);
index 5bca03bab92ad1453c29004f4842195a351f9813..72cebedaa8f30aedd9034514c826da94d70ad19b 100644 (file)
@@ -50,9 +50,17 @@ GType seat_get_type (void);
 
 void seat_register_module (const gchar *name, GType type);
 
-Seat *seat_new (const gchar *module, const gchar *config_section);
+Seat *seat_new (const gchar *module_name);
 
-const gchar *seat_get_config_section (Seat *seat);
+void seat_set_property (Seat *seat, const gchar *name, const gchar *value);
+
+gboolean seat_has_property (Seat *seat, const gchar *name);
+
+const gchar *seat_get_string_property (Seat *seat, const gchar *name);
+
+gboolean seat_get_boolean_property (Seat *seat, const gchar *name);
+
+gint seat_get_integer_property (Seat *seat, const gchar *name);
 
 void seat_set_can_switch (Seat *seat, gboolean can_switch);
 
@@ -76,6 +84,8 @@ gboolean seat_switch_to_guest (Seat *seat, const gchar *session_name);
 
 void seat_stop (Seat *seat);
 
+gboolean seat_get_is_stopping (Seat *seat);
+
 G_END_DECLS
 
 #endif /* _SEAT_H_ */
index 7e3a9b487928970fa0c19e44360206aecac58e02..9e9bfad15cf4add1db780991bebd94b8508188fa 100644 (file)
@@ -19,7 +19,6 @@
 #include <grp.h>
 
 #include "session.h"
-#include "configuration.h"
 
 struct SessionPrivate
 {
index ac128329ae32a1bfa502636fce1033e4e29fb2a8..20cb0b44ff04fa1bf9d77fd9f85ffdbf41cfb0b1 100644 (file)
@@ -14,7 +14,6 @@
 #include <xcb/xcb.h>
 
 #include "xserver.h"
-#include "configuration.h"
 #include "xsession.h"
 
 struct XServerPrivate
@@ -90,9 +89,13 @@ void
 xserver_set_authority (XServer *server, XAuthority *authority)
 {
     g_return_if_fail (server != NULL);
+
     if (server->priv->authority)
         g_object_unref (server->priv->authority);
-    server->priv->authority = g_object_ref (authority);
+    if (authority)
+        server->priv->authority = g_object_ref (authority);
+    else
+        server->priv->authority = NULL;
 }
 
 XAuthority *
diff --git a/utils/Makefile.am b/utils/Makefile.am
new file mode 100644 (file)
index 0000000..41df48b
--- /dev/null
@@ -0,0 +1,29 @@
+bin_PROGRAMS = dm-tool
+libexec_PROGRAMS = lightdm-set-defaults
+dist_pkglibexec_SCRIPTS = gdmflexiserver
+
+dm_tool_SOURCES = \
+       dm-tool.c
+
+dm_tool_CFLAGS = \
+       $(LIGHTDM_CFLAGS) \
+       -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
+       -DLOCALE_DIR=\"$(datadir)/locale\"
+
+dm_tool_LDADD = \
+       $(LIGHTDM_LIBS)
+
+lightdm_set_defaults_SOURCES = \
+       lightdm-set-defaults.c
+
+lightdm_set_defaults_CFLAGS = \
+       $(LIGHTDM_CFLAGS) \
+       -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
+       -DLOCALE_DIR=\"$(datadir)/locale\"
+
+lightdm_set_defaults_LDADD = \
+       $(LIGHTDM_LIBS)
+
+DISTCLEANFILES = \
+    Makefile.in
+
diff --git a/utils/dm-tool.c b/utils/dm-tool.c
new file mode 100644 (file)
index 0000000..0be71e0
--- /dev/null
@@ -0,0 +1,467 @@
+/*
+ * Copyright (C) 2010-2011 Robert Ancell.
+ * Author: Robert Ancell <robert.ancell@canonical.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 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+
+static GDBusProxy *dm_proxy, *seat_proxy;
+
+static gint xephyr_display_number;
+static GPid xephyr_pid;
+
+static void
+usage ()
+{
+    g_printerr (/* Text printed out when an unknown command-line argument provided */
+                _("Run 'dm-tool --help' to see a full list of available command line options."));
+    g_printerr ("\n");
+}
+
+static void
+xephyr_setup_cb (gpointer user_data)
+{
+    signal (SIGUSR1, SIG_IGN);
+}
+
+static void
+xephyr_signal_cb (int signum)
+{
+    gchar *display_number_string, *path;
+    GVariantBuilder *properties;
+    GVariant *result;
+    GError *error = NULL;
+
+    properties = g_variant_builder_new (G_VARIANT_TYPE ("a(ss)"));
+    display_number_string = g_strdup_printf ("%d", xephyr_display_number);
+    g_variant_builder_add_value (properties, g_variant_new ("(ss)", "xserver-display-number", display_number_string));
+    g_free (display_number_string);
+
+    result = g_dbus_proxy_call_sync (dm_proxy,
+                                     "AddSeat",
+                                     g_variant_new ("(sa(ss))", "xremote", properties),
+                                     G_DBUS_CALL_FLAGS_NONE,
+                                     -1,
+                                     NULL,
+                                     &error);
+    g_variant_builder_unref (properties);
+    if (!result)
+    {
+        g_printerr ("Unable to add seat: %s\n", error->message);
+        kill (xephyr_pid, SIGQUIT);
+        exit (EXIT_FAILURE);
+    }
+
+    if (!g_variant_is_of_type (result, G_VARIANT_TYPE ("(o)")))
+    {
+        g_printerr ("Unexpected response to AddSeat: %s\n", g_variant_get_type_string (result));
+        exit (EXIT_FAILURE);
+    }
+
+    g_variant_get (result, "(&o)", &path);
+    g_print ("%s\n", path);
+
+    exit (EXIT_SUCCESS);
+}
+
+int
+main (int argc, char **argv)
+{
+    gchar *command;
+    gint n_options;
+    gchar **options;
+    GError *error = NULL;
+    gint arg_index;
+    GBusType bus_type = G_BUS_TYPE_SYSTEM;
+
+    g_type_init ();
+
+    for (arg_index = 1; arg_index < argc; arg_index++)
+    {
+        gchar *arg = argv[arg_index];
+
+        if (!g_str_has_prefix (arg, "-"))
+            break;
+      
+        if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0)
+        {
+            g_printerr ("Usage:\n"
+                        "  dm-tool [OPTION...] COMMAND [ARGS...] - Display Manager tool\n"
+                        "\n"
+                        "Options:\n"
+                        "  -h, --help        Show help options\n"
+                        "  -v, --version     Show release version\n"
+                        "  --session-bus     Use session D-Bus\n"
+                        "\n"
+                        "Commands:\n"
+                        "  switch-to-greeter                   Switch to the greeter\n"
+                        "  switch-to-user USERNAME [SESSION]   Switch to a user session\n"
+                        "  switch-to-guest [SESSION]           Switch to a guest session\n"
+                        "  list-seats                          List the active seats\n"
+                        "  add-nested-seat                     Start a nested display\n"
+                        "  add-seat TYPE [NAME=VALUE...]       Add a dynamic seat\n");
+            return EXIT_SUCCESS;
+        }
+        else if (strcmp (arg, "-v") == 0 || strcmp (arg, "--version") == 0)
+        {
+            /* NOTE: Is not translated so can be easily parsed */
+            g_printerr ("lightdm %s\n", VERSION);
+            return EXIT_SUCCESS;
+        }
+        else if (strcmp (arg, "--session-bus") == 0)
+            bus_type = G_BUS_TYPE_SESSION;
+        else
+        {
+            g_printerr ("Unknown option %s\n", arg);
+            usage ();
+            return EXIT_FAILURE;
+        }
+    }
+
+    if (arg_index >= argc)
+    {
+        g_printerr ("Missing command\n");
+        usage ();
+        return EXIT_FAILURE;
+    }
+
+    dm_proxy = g_dbus_proxy_new_for_bus_sync (bus_type,
+                                              G_DBUS_PROXY_FLAGS_NONE,
+                                              NULL,
+                                              "org.freedesktop.DisplayManager",
+                                              "/org/freedesktop/DisplayManager",
+                                              "org.freedesktop.DisplayManager",
+                                              NULL,
+                                              &error);
+    if (!dm_proxy)
+    {
+        g_printerr ("Unable to contact display manager: %s\n", error->message);
+        return EXIT_FAILURE;
+    }
+    g_clear_error (&error);
+
+    seat_proxy = g_dbus_proxy_new_for_bus_sync (bus_type,
+                                                G_DBUS_PROXY_FLAGS_NONE,
+                                                NULL,
+                                                "org.freedesktop.DisplayManager",
+                                                g_getenv ("XDG_SEAT_PATH"),
+                                                "org.freedesktop.DisplayManager.Seat",
+                                                NULL,
+                                                &error);
+    if (!seat_proxy)
+    {
+        g_printerr ("Unable to contact display manager: %s\n", error->message);
+        return EXIT_FAILURE;
+    }
+    g_clear_error (&error);
+
+    command = argv[arg_index];
+    arg_index++;
+    n_options = argc - arg_index;
+    options = argv + arg_index;
+    if (strcmp (command, "switch-to-greeter") == 0)
+    {
+        if (n_options != 0)
+        {
+            g_printerr ("Usage switch-to-greeter\n");
+            usage ();
+            return EXIT_FAILURE;
+        }
+
+        if (!g_dbus_proxy_call_sync (seat_proxy,
+                                     "SwitchToGreeter",
+                                     g_variant_new ("()"),
+                                     G_DBUS_CALL_FLAGS_NONE,
+                                     -1,
+                                     NULL,
+                                     &error))
+        {
+            g_printerr ("Unable to switch to greeter: %s\n", error->message);
+            return EXIT_FAILURE;
+        }
+        return EXIT_SUCCESS;
+    }
+    else if (strcmp (command, "switch-to-user") == 0)
+    {
+        gchar *username, *session = "";
+
+        if (n_options > 1)
+        {
+            g_printerr ("Usage switch-to-user USERNAME [SESSION]\n");
+            usage ();
+            return EXIT_FAILURE;
+        }
+
+        username = options[0];
+        if (n_options == 2)
+            session = options[1];
+
+        if (!g_dbus_proxy_call_sync (seat_proxy,
+                                     "SwitchToUser",
+                                     g_variant_new ("(ss)", username, session),
+                                     G_DBUS_CALL_FLAGS_NONE,
+                                     -1,
+                                     NULL,
+                                     &error))
+        {
+            g_printerr ("Unable to switch to user %s: %s\n", username, error->message);
+            return EXIT_FAILURE;
+        }
+        return EXIT_SUCCESS;
+    }
+    else if (strcmp (command, "switch-to-guest") == 0)
+    {
+        gchar *session = "";
+
+        if (n_options > 1)
+        {
+            g_printerr ("Usage switch-to-guest [SESSION]\n");
+            usage ();
+            return EXIT_FAILURE;
+        }
+
+        if (n_options == 1)
+            session = options[0];
+
+        if (!g_dbus_proxy_call_sync (seat_proxy,
+                                     "SwitchToGuest",
+                                     g_variant_new ("(s)", session),
+                                     G_DBUS_CALL_FLAGS_NONE,
+                                     -1,
+                                     NULL,
+                                     &error))
+        {
+            g_printerr ("Unable to switch to guest: %s\n", error->message);
+            return EXIT_FAILURE;
+        }
+        return EXIT_SUCCESS;
+    }
+    else if (strcmp (command, "list-seats") == 0)
+    {
+        GVariant *seats, *sessions;
+        GVariantIter *seat_iter;
+        gchar *seat_path;
+
+        if (!g_dbus_proxy_get_name_owner (dm_proxy))
+        {
+            g_printerr ("Unable to contact display manager\n");
+            return EXIT_FAILURE;
+        }
+        seats = g_dbus_proxy_get_cached_property (dm_proxy, "Seats");
+
+        g_variant_get (seats, "ao", &seat_iter);
+        while (g_variant_iter_loop (seat_iter, "&o", &seat_path))
+        {
+            gchar *seat_name;
+            GDBusProxy *seat_proxy;
+            gchar **property_names;
+            GVariant *sessions;
+            GVariantIter *session_iter;
+            gchar *session_path;
+            gint i;
+
+            if (g_str_has_prefix (seat_path, "/org/freedesktop/DisplayManager/"))
+                seat_name = seat_path + strlen ("/org/freedesktop/DisplayManager/");
+            else
+                seat_name = seat_path;
+
+            seat_proxy = g_dbus_proxy_new_sync (g_dbus_proxy_get_connection (dm_proxy),
+                                                G_DBUS_PROXY_FLAGS_NONE,
+                                                NULL,
+                                                "org.freedesktop.DisplayManager",
+                                                seat_path,
+                                                "org.freedesktop.DisplayManager.Seat",
+                                                NULL,
+                                                NULL);
+            if (!seat_proxy || !g_dbus_proxy_get_name_owner (seat_proxy))
+                continue;
+
+            g_print ("%s\n", seat_name);
+            property_names = g_dbus_proxy_get_cached_property_names (seat_proxy);
+            for (i = 0; property_names[i]; i++)
+            {
+                GVariant *value;
+
+                if (strcmp (property_names[i], "Sessions") == 0)
+                    continue;
+
+                value = g_dbus_proxy_get_cached_property (seat_proxy, property_names[i]);
+                g_print ("  %s=%s\n", property_names[i], g_variant_print (value, FALSE));
+                g_variant_unref (value);
+            }
+
+            sessions = g_dbus_proxy_get_cached_property (seat_proxy, "Sessions");
+            if (!sessions)
+                continue;
+
+            g_variant_get (sessions, "ao", &session_iter);
+            while (g_variant_iter_loop (session_iter, "&o", &session_path))
+            {
+                GDBusProxy *session_proxy;
+                gchar *session_name;
+
+                if (g_str_has_prefix (session_path, "/org/freedesktop/DisplayManager/"))
+                    session_name = session_path + strlen ("/org/freedesktop/DisplayManager/");
+                else
+                    session_name = session_path;
+
+                session_proxy = g_dbus_proxy_new_sync (g_dbus_proxy_get_connection (dm_proxy),
+                                                       G_DBUS_PROXY_FLAGS_NONE,
+                                                       NULL,
+                                                       "org.freedesktop.DisplayManager",
+                                                       session_path,
+                                                       "org.freedesktop.DisplayManager.Session",
+                                                       NULL,
+                                                       NULL);
+                if (!session_proxy || !g_dbus_proxy_get_name_owner (session_proxy))
+                    continue;
+
+                g_print ("  %s\n", session_name);
+                property_names = g_dbus_proxy_get_cached_property_names (session_proxy);
+                for (i = 0; property_names[i]; i++)
+                {
+                    GVariant *value;
+
+                    if (strcmp (property_names[i], "Seat") == 0)
+                        continue;
+
+                    value = g_dbus_proxy_get_cached_property (session_proxy, property_names[i]);
+                    g_print ("    %s=%s\n", property_names[i], g_variant_print (value, FALSE));
+                    g_variant_unref (value);
+                }
+
+                g_object_unref (session_proxy);
+            }
+            g_variant_iter_free (session_iter);
+
+            g_object_unref (seat_proxy);
+        }
+        g_variant_iter_free (seat_iter);
+
+        return EXIT_SUCCESS;
+    }
+    else if (strcmp (command, "add-nested-seat") == 0)
+    {
+        gchar *path, *xephyr_command, **xephyr_argv;
+        GMainLoop *loop;
+
+        path = g_find_program_in_path ("Xephyr");
+        if (!path)
+        {
+            g_printerr ("Unable to find Xephyr, please install it\n");
+            return EXIT_FAILURE;
+        }
+
+        /* Get a unique display number.  It's racy, but the only reliable method to get one */
+        xephyr_display_number = 0;
+        while (TRUE)
+        {
+            gchar *lock_name;
+            gboolean has_lock;
+
+            lock_name = g_strdup_printf ("/tmp/.X%d-lock", xephyr_display_number);
+            has_lock = g_file_test (lock_name, G_FILE_TEST_EXISTS);
+            g_free (lock_name);
+          
+            if (has_lock)
+                xephyr_display_number++;
+            else
+                break;
+        }
+
+        /* Wait for signal from Xephyr is ready */
+        signal (SIGUSR1, xephyr_signal_cb);
+
+        xephyr_command = g_strdup_printf ("Xephyr :%d", xephyr_display_number);
+        if (!g_shell_parse_argv (xephyr_command, NULL, &xephyr_argv, &error) ||
+            !g_spawn_async (NULL, xephyr_argv, NULL,
+                            G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
+                            xephyr_setup_cb, NULL,
+                            &xephyr_pid, &error))
+        {
+            g_printerr ("Error running Xephyr: %s\n", error->message);
+            exit (EXIT_FAILURE);
+        }
+        g_clear_error (&error);
+
+        /* Block until ready */
+        loop = g_main_loop_new (NULL, FALSE);
+        g_main_loop_run (loop);
+    }
+    else if (strcmp (command, "add-seat") == 0)
+    {
+        GVariant *result;
+        gchar *type, *path;
+        GVariantBuilder *properties;
+        gint i;
+
+        if (n_options < 1)
+        {
+            g_printerr ("Usage add-seat TYPE [NAME=VALUE...]\n");
+            usage ();
+            return EXIT_FAILURE;
+        }
+
+        type = options[0];
+        properties = g_variant_builder_new (G_VARIANT_TYPE ("a(ss)"));
+      
+        for (i = 1; i < n_options; i++)
+        {
+            gchar *property, *name, *value;
+
+            property = g_strdup (options[i]);
+            name = property;
+            value = strchr (property, '=');
+            if (value)
+            {
+                *value = '\0';
+                value++;
+            }
+            else
+               value = "";
+
+            g_variant_builder_add_value (properties, g_variant_new ("(ss)", name, value));
+            g_free (property);
+        }
+
+        result = g_dbus_proxy_call_sync (dm_proxy,
+                                         "AddSeat",
+                                         g_variant_new ("(sa(ss))", type, properties),
+                                         G_DBUS_CALL_FLAGS_NONE,
+                                         -1,
+                                         NULL,
+                                         &error);
+        g_variant_builder_unref (properties);
+        if (!result)
+        {
+            g_printerr ("Unable to add seat: %s\n", error->message);
+            return EXIT_FAILURE;
+        }
+
+        if (!g_variant_is_of_type (result, G_VARIANT_TYPE ("(o)")))
+        {
+            g_printerr ("Unexpected response to AddSeat: %s\n", g_variant_get_type_string (result));
+            return EXIT_FAILURE;
+        }
+
+        g_variant_get (result, "(&o)", &path);
+        g_print ("%s\n", path);
+
+        return EXIT_SUCCESS;
+    }
+
+    g_printerr ("Unknown command %s\n", command);
+    usage ();
+    return EXIT_FAILURE;
+}
similarity index 100%
rename from src/gdmflexiserver
rename to utils/gdmflexiserver
diff --git a/utils/lightdm-set-defaults.c b/utils/lightdm-set-defaults.c
new file mode 100644 (file)
index 0000000..6efe565
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2011 Didier Roche.
+ * Author: Didier Roche <didrocks@ubuntu.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 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#define SEATDEFAULT_KEY_GROUP "SeatDefaults"
+#define SESSION_KEY_NAME  "user-session"
+#define GREETER_KEY_NAME  "greeter-session"
+
+#define IS_STRING_EMPTY(x) ((x)==NULL||(x)[0]=='\0')
+
+static gboolean debug = FALSE;
+static gboolean keep_old = FALSE;
+static gboolean remove = FALSE;
+
+static char    *session = NULL;
+static char    *greeter = NULL;
+
+static GOptionEntry entries[] =
+{
+  { "debug",    'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging"), NULL },
+  { "keep-old", 'k', 0, G_OPTION_ARG_NONE, &keep_old, N_("Only update if no default already set"), NULL },
+  { "remove",   'r', 0, G_OPTION_ARG_NONE, &remove, N_("Remove default value if it's the current one"), NULL },
+  { "session",  's', 0, G_OPTION_ARG_STRING, &session, N_("Set default session"), NULL },
+  { "greeter",  'g', 0, G_OPTION_ARG_STRING, &greeter, N_("Set default greeter"), NULL },
+  { NULL }
+};
+
+void
+show_nothing(const gchar   *log_domain,
+             GLogLevelFlags log_level,
+             const gchar   *message,
+             gpointer       unused_data) {};
+
+int
+update_string(const gchar *default_value,
+              const gchar *new_value,
+              gboolean     keep_old,
+              gboolean     remove,
+              const gchar *key_group,
+              const gchar *key_name,
+              GKeyFile    *keyfile)
+{
+    gboolean success = TRUE;
+        
+    if (!(default_value) || (strlen(default_value) < 1)) {
+        g_debug ("No existing valid value for %s. Set to %s", key_name, new_value);
+        g_key_file_set_string (keyfile, key_group, key_name, new_value);
+    }
+    else {
+        if (remove) {
+            if (g_strcmp0 (default_value, new_value) == 0) {
+                g_debug ("Remove %s as default value for %s", default_value, key_name);
+                g_key_file_set_string (keyfile, key_group, key_name, "");
+                if (!success)
+                    return(2);
+                return(0);
+            }
+            g_debug ("Can't remove: %s is not the default value for %s", default_value, key_name);
+            return(4);
+        }
+        else {
+            g_debug ("Found existing default value(%s) for %s", default_value, key_name);
+            if (keep_old)
+                g_debug ("keep-old mode: keep previous default value");
+            else {
+                g_debug ("Update to %s for %s", default_value, key_name);
+                g_key_file_set_string (keyfile, key_group, key_name, new_value);
+            }
+        }
+    }
+    if (!success)
+        return(2);
+    return(0);
+}
+
+int 
+main (int argc, char *argv[])
+{
+    GOptionContext *context = NULL;
+    GError         *error = NULL;
+
+    GKeyFile       *keyfile;
+    GKeyFileFlags   flags;
+    gchar          *s_data;
+    gsize           size;
+    const gchar    *gdm_conf_file = CONFIG_DIR "/lightdm.conf";
+
+    gchar          *default_session = NULL;
+    gchar          *default_greeter = NULL;
+    gint            return_code = 0;
+
+    bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+    textdomain (GETTEXT_PACKAGE);
+
+    g_type_init ();
+
+    context = g_option_context_new (N_("- set lightdm default values"));
+    g_option_context_add_main_entries (context, entries, NULL);
+    if (!g_option_context_parse (context, &argc, &argv, &error)) {
+        g_printerr (N_("option parsing failed: %s\n"), error->message);
+        g_option_context_free (context);
+        g_error_free (error);
+        return 1;
+    }
+    if (IS_STRING_EMPTY (session) && IS_STRING_EMPTY (greeter)) {
+        g_printerr (N_("Wrong usage of the command\n%s"), g_option_context_get_help (context, FALSE, NULL));
+        g_option_context_free (context);
+        return 1;
+    }
+    if (context)
+        g_option_context_free (context); 
+    if (!debug)
+        g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, show_nothing, NULL);
+
+    keyfile = g_key_file_new ();
+    flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS;
+    if (!(g_key_file_load_from_file (keyfile, gdm_conf_file, flags, &error))) {
+            g_debug ("File doesn't seem to exist or can't be read: create one (%s)", error->message);
+            g_error_free (error);
+            error = NULL;
+    }
+
+    // try to get the right keys
+    default_session = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, NULL);
+    default_greeter = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, NULL);
+
+    if (!(IS_STRING_EMPTY (session)))
+        return_code = update_string (default_session, session, keep_old, remove, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, keyfile);
+    if (!(IS_STRING_EMPTY (greeter)) && (return_code == 0))
+        return_code = update_string (default_greeter, greeter, keep_old, remove, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, keyfile);
+
+    if(return_code == 0) {
+        s_data = g_key_file_to_data (keyfile, &size, &error);
+        if (!s_data) {
+            g_debug ("Can't convert data to string: %s", error->message);
+            g_error_free (error);
+            return_code = 1;
+        }
+        else {
+            if(!g_file_set_contents (gdm_conf_file, s_data, size, &error)) {
+                g_printerr ("Can't update: %s\n", error->message);
+                g_error_free (error);
+                return_code = 1;
+            }
+            g_free (s_data);
+         }
+    }
+
+    g_key_file_free (keyfile);
+
+    if (default_session)
+        g_free (default_session);
+    if (default_greeter)
+        g_free (default_greeter);
+
+    return return_code;
+
+}