summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-06-24 12:14:28 +1200
committerRobert Ancell <robert.ancell@canonical.com>2013-06-24 12:14:28 +1200
commitf92deedc3ccf497df007dde08eda3490b2a0db84 (patch)
treef1727fef7a194c1d663e7ab2575d29f4f51a0c30
parent2f3db97a571b0a535a80a89d9d1d62266307e5f3 (diff)
parent8ea57c619cbba55cfd6b214723aa3387f7baca70 (diff)
downloadlightdm-git-f92deedc3ccf497df007dde08eda3490b2a0db84.tar.gz
Merge with unity branch
-rw-r--r--NEWS6
-rw-r--r--configure.ac20
-rw-r--r--data/lightdm.conf4
-rw-r--r--debian/control1
-rw-r--r--src/Makefile.am13
-rw-r--r--src/display-manager.c7
-rw-r--r--src/lightdm.c2
-rw-r--r--src/seat-unity.c5
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/scripts/unity-compositor-command.conf38
-rw-r--r--tests/src/unity-system-compositor.c8
-rwxr-xr-xtests/test-unity-compositor-command2
12 files changed, 69 insertions, 39 deletions
diff --git a/NEWS b/NEWS
index 09abd1ab..d026227a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+Overview of changes in lightdm 1.7.3
+
+ * Load configuration from /etc/lightdm/lightdm.conf.d.
+ * Fix compile warnings
+ * Fix tests not running from install directory inside checkout.
+
Overview of changes in lightdm 1.7.2
* Fix incorrectly distributed guest-session apparmor data
diff --git a/configure.ac b/configure.ac
index 17b7ad64..31c55fa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(lightdm, 1.7.2)
+AC_INIT(lightdm, 1.7.3)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
@@ -49,23 +49,6 @@ PKG_CHECK_MODULES(XCB, [
xcb
])
-AC_ARG_ENABLE(unity,
- AS_HELP_STRING([--enable-unity],[Enable Unity support [[default=auto]]]),
- [enable_unity=$enableval],
- [enable_unity="auto"])
-compile_unity=no
-if test x"$enable_unity" = "xauto"; then
- PKG_CHECK_MODULES(UNITY, [
- mirclient
- ], compile_unity=yes, compile_unity=no)
-elif test x"$enable_unity" = "xyes"; then
- PKG_CHECK_MODULES(UNITY, [
- mirclient
- ])
- compile_unity=yes
-fi
-AM_CONDITIONAL(COMPILE_UNITY, test x"$compile_unity" != "xno")
-
AC_ARG_ENABLE(liblightdm-gobject,
AS_HELP_STRING([--enable-liblightdm-gobject],[Enable LightDM client gobject libraries [[default=auto]]]),
[enable_liblightdm_gobject=$enableval],
@@ -237,7 +220,6 @@ echo "
Greeter session: $GREETER_SESSION
Greeter user: $GREETER_USER
User session: $USER_SESSION
- Unity support: $compile_unity
liblightdm-gobject: $compile_liblightdm_gobject
GObject introspection: $found_introspection
liblightdm-qt: $compile_liblightdm_qt4
diff --git a/data/lightdm.conf b/data/lightdm.conf
index 6fcc86db..398caef3 100644
--- a/data/lightdm.conf
+++ b/data/lightdm.conf
@@ -43,6 +43,8 @@
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
# xdmcp-port = XDMCP UDP/IP port to communicate on
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
+# unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option)
+# unity-compositor-timeout = Number of seconds to wait for compositor to start
# greeter-session = Session to load for greeter
# greeter-hide-users = True to hide the user list
# greeter-allow-guest = True if the greeter should show a guest login option
@@ -72,6 +74,8 @@
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
+#unity-compositor-command=unity-system-compositor
+#unity-compositor-timeout=60
#greeter-session=example-gtk-gnome
#greeter-hide-users=false
#greeter-allow-guest=true
diff --git a/debian/control b/debian/control
index d32fd8f7..1ae86459 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,6 @@ Build-Depends: debhelper (>= 7.0.50~),
quilt,
libgcrypt11-dev,
libglib2.0-dev,
- libmirclient-dev,
libpam0g-dev,
libxdmcp-dev,
libxcb1-dev,
diff --git a/src/Makefile.am b/src/Makefile.am
index aefba613..1b7fe284 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -38,6 +38,8 @@ lightdm_SOURCES = \
process.h \
seat.c \
seat.h \
+ seat-unity.c \
+ seat-unity.h \
seat-xdmcp-session.c \
seat-xdmcp-session.h \
seat-xlocal.c \
@@ -96,17 +98,6 @@ lightdm_LDADD = \
-lgcrypt \
-lpam
-if COMPILE_UNITY
-lightdm_SOURCES += \
- seat-unity.c \
- seat-unity.h
-lightdm_CFLAGS += \
- -DHAVE_UNITY \
- $(UNITY_CFLAGS)
-lightdm_LDADD += \
- $(UNITY_LIBS)
-endif
-
pkglibexec_PROGRAMS = lightdm-guest-session-wrapper
lightdm_guest_session_wrapper_SOURCES = lightdm-guest-session-wrapper.c
diff --git a/src/display-manager.c b/src/display-manager.c
index 043e50fe..465023e3 100644
--- a/src/display-manager.c
+++ b/src/display-manager.c
@@ -20,11 +20,8 @@
#include "display.h"
#include "seat-xlocal.h"
#include "seat-xremote.h"
-#include "plymouth.h"
-
-#ifdef HAVE_UNITY
#include "seat-unity.h"
-#endif
+#include "plymouth.h"
enum {
SEAT_ADDED,
@@ -152,9 +149,7 @@ display_manager_init (DisplayManager *manager)
/* Load the seat modules */
seat_register_module ("xlocal", SEAT_XLOCAL_TYPE);
seat_register_module ("xremote", SEAT_XREMOTE_TYPE);
-#ifdef HAVE_UNITY
seat_register_module ("unity", SEAT_UNITY_TYPE);
-#endif
}
static void
diff --git a/src/lightdm.c b/src/lightdm.c
index 11a51e3c..9ca98746 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -1040,6 +1040,8 @@ 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", "unity-compositor-command"))
+ config_set_string (config_get_instance (), "SeatDefaults", "unity-compositor-command", "unity-system-compositor");
if (!config_has_key (config_get_instance (), "SeatDefaults", "start-session"))
config_set_boolean (config_get_instance (), "SeatDefaults", "start-session", TRUE);
if (!config_has_key (config_get_instance (), "SeatDefaults", "allow-guest"))
diff --git a/src/seat-unity.c b/src/seat-unity.c
index 29f6d107..50e15eb4 100644
--- a/src/seat-unity.c
+++ b/src/seat-unity.c
@@ -293,6 +293,7 @@ compositor_timeout_cb (gpointer data)
static gboolean
seat_unity_start (Seat *seat)
{
+ const gchar *compositor_command;
gchar *command, *absolute_command, *dir;
gboolean result;
int timeout;
@@ -341,7 +342,9 @@ seat_unity_start (Seat *seat)
g_free (dir);
SEAT_UNITY (seat)->priv->mir_socket_filename = g_strdup ("/tmp/mir_socket"); // FIXME: Use this socket by default as XMir is hardcoded to this
- command = g_strdup_printf ("unity-system-compositor --from-dm-fd %d --to-dm-fd %d --vt %d", SEAT_UNITY (seat)->priv->to_compositor_pipe[0], SEAT_UNITY (seat)->priv->from_compositor_pipe[1], SEAT_UNITY (seat)->priv->vt);
+ timeout = seat_get_integer_property (seat, "unity-compositor-timeout");
+ compositor_command = seat_get_string_property (seat, "unity-compositor-command");
+ command = g_strdup_printf ("%s --from-dm-fd %d --to-dm-fd %d --vt %d", compositor_command, SEAT_UNITY (seat)->priv->to_compositor_pipe[0], SEAT_UNITY (seat)->priv->from_compositor_pipe[1], SEAT_UNITY (seat)->priv->vt);
absolute_command = get_absolute_command (command);
g_free (command);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 34aa1058..5156df57 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -151,6 +151,7 @@ TESTS = \
test-python-power-no-services \
test-open-file-descriptors \
test-xdmcp-open-file-descriptors \
+ test-unity-compositor-command \
test-unity-compositor-fail-start \
test-unity-compositor-fail-ready \
test-unity-autologin \
@@ -353,6 +354,7 @@ EXTRA_DIST = \
scripts/switch-to-user-no-password.conf \
scripts/system-xauthority.conf \
scripts/unity-autologin.conf \
+ scripts/unity-compositor-command.conf \
scripts/unity-compositor-fail-ready.conf \
scripts/unity-compositor-fail-start.conf \
scripts/unity-login.conf \
diff --git a/tests/scripts/unity-compositor-command.conf b/tests/scripts/unity-compositor-command.conf
new file mode 100644
index 00000000..a768993b
--- /dev/null
+++ b/tests/scripts/unity-compositor-command.conf
@@ -0,0 +1,38 @@
+#
+# Check can set the unity compositor command
+#
+
+[SeatDefaults]
+type=unity
+user-session=default
+unity-compositor-command=unity-system-compositor --test
+
+#?RUNNER DAEMON-START
+
+# System compositor starts
+#?UNITY-SYSTEM-COMPOSITOR START TEST
+#?*UNITY-SYSTEM-COMPOSITOR READY
+
+# X server starts
+#?XSERVER-0 START MIR-ID=0
+#?XSERVER-0 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER-X-0 START
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
+
+# System compositor switches to greeter
+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=0
+
+# Cleanup
+#?*STOP-DAEMON
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/src/unity-system-compositor.c b/tests/src/unity-system-compositor.c
index e71e8693..2dcf8c12 100644
--- a/tests/src/unity-system-compositor.c
+++ b/tests/src/unity-system-compositor.c
@@ -123,6 +123,7 @@ int
main (int argc, char **argv)
{
int i;
+ gboolean test = FALSE;
signal (SIGINT, signal_cb);
signal (SIGTERM, signal_cb);
@@ -155,13 +156,18 @@ main (int argc, char **argv)
//vt_number = atoi (argv[i+1]);
i++;
}
+ else if (strcmp (arg, "--test") == 0)
+ test = TRUE;
else
return EXIT_FAILURE;
}
g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);
- status_notify ("UNITY-SYSTEM-COMPOSITOR START");
+ if (test)
+ status_notify ("UNITY-SYSTEM-COMPOSITOR START TEST");
+ else
+ status_notify ("UNITY-SYSTEM-COMPOSITOR START");
config = g_key_file_new ();
g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
diff --git a/tests/test-unity-compositor-command b/tests/test-unity-compositor-command
new file mode 100755
index 00000000..f953527d
--- /dev/null
+++ b/tests/test-unity-compositor-command
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity-compositor-command test-gobject-greeter