summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-06-21 12:38:27 +1200
committerRobert Ancell <robert.ancell@canonical.com>2018-08-30 20:41:10 +1200
commit95e48f409295bc3ff9dbf3d1affd0fcd7a6d1698 (patch)
tree0748a61d9ae96efd978c71af5a09b31e3e217d98
parent772e7922c7f790fe9860ec53cea9719846695a48 (diff)
downloadlightdm-git-95e48f409295bc3ff9dbf3d1affd0fcd7a6d1698.tar.gz
Remove Unity System Compositor support - it is a dead project
-rw-r--r--common/configuration.c6
-rw-r--r--data/lightdm.conf8
-rw-r--r--po/lightdm.pot2
-rw-r--r--src/Makefile.am6
-rw-r--r--src/display-manager.c2
-rw-r--r--src/lightdm.c2
-rw-r--r--src/seat-local.c170
-rw-r--r--src/seat-unity.c422
-rw-r--r--src/seat-unity.h37
-rw-r--r--src/unity-system-compositor.c536
-rw-r--r--src/unity-system-compositor.h54
-rw-r--r--src/x-server-xmir.c171
-rw-r--r--src/x-server-xmir.h49
-rw-r--r--tests/Makefile.am56
-rw-r--r--tests/scripts/mir-autologin.conf29
-rw-r--r--tests/scripts/mir-greeter.conf21
-rw-r--r--tests/scripts/mir-script-hooks.conf71
-rw-r--r--tests/scripts/mir-session-compositor-crash.conf49
-rw-r--r--tests/scripts/mir-session-crash.conf50
-rw-r--r--tests/scripts/mir-session.conf27
-rw-r--r--tests/scripts/unity-autologin.conf39
-rw-r--r--tests/scripts/unity-compositor-command.conf41
-rw-r--r--tests/scripts/unity-compositor-crash.conf40
-rw-r--r--tests/scripts/unity-compositor-fail-ready.conf19
-rw-r--r--tests/scripts/unity-compositor-fail-start.conf19
-rw-r--r--tests/scripts/unity-compositor-fallback.conf42
-rw-r--r--tests/scripts/unity-compositor-mir-next-session.conf45
-rw-r--r--tests/scripts/unity-compositor-next-session.conf59
-rw-r--r--tests/scripts/unity-compositor-not-found.conf16
-rw-r--r--tests/scripts/unity-login.conf54
-rw-r--r--tests/scripts/unity-mir-autologin.conf28
-rw-r--r--tests/scripts/unity-mir-greeter-mir-session.conf44
-rw-r--r--tests/scripts/unity-mir-greeter-x-session.conf55
-rw-r--r--tests/scripts/unity-mir-lock-seat.conf46
-rw-r--r--tests/scripts/unity-mir-script-hooks.conf59
-rw-r--r--tests/scripts/unity-mir-session-x-greeter.conf55
-rw-r--r--tests/scripts/unity-mir-switch-to-user-resettable.conf58
-rw-r--r--tests/scripts/unity-mir-switch.conf57
-rw-r--r--tests/scripts/unity-plymouth.conf49
-rw-r--r--tests/scripts/unity-script-hooks.conf87
-rw-r--r--tests/scripts/unity-switch.conf100
-rw-r--r--tests/scripts/unity.conf15
-rw-r--r--tests/scripts/xmir-autologin.conf39
-rw-r--r--tests/scripts/xmir-login.conf57
-rw-r--r--tests/scripts/xmir-switch.conf106
-rw-r--r--tests/src/Makefile.am26
-rw-r--r--tests/src/Xmir.c278
-rw-r--r--tests/src/unity-system-compositor.c215
-rwxr-xr-xtests/test-mir-script-hooks2
-rwxr-xr-xtests/test-mir-session-compositor-crash2
-rwxr-xr-xtests/test-mir-session-crash2
-rwxr-xr-xtests/test-unity2
-rwxr-xr-xtests/test-unity-autologin2
-rwxr-xr-xtests/test-unity-compositor-command2
-rwxr-xr-xtests/test-unity-compositor-crash2
-rwxr-xr-xtests/test-unity-compositor-fail-ready2
-rwxr-xr-xtests/test-unity-compositor-fail-start2
-rwxr-xr-xtests/test-unity-compositor-fallback2
-rwxr-xr-xtests/test-unity-compositor-mir-next-session2
-rwxr-xr-xtests/test-unity-compositor-next-session2
-rwxr-xr-xtests/test-unity-compositor-not-found2
-rwxr-xr-xtests/test-unity-login2
-rwxr-xr-xtests/test-unity-mir-autologin2
-rwxr-xr-xtests/test-unity-mir-greeter-mir-session2
-rwxr-xr-xtests/test-unity-mir-greeter-x-session2
-rwxr-xr-xtests/test-unity-mir-lock-seat2
-rwxr-xr-xtests/test-unity-mir-script-hooks2
-rwxr-xr-xtests/test-unity-mir-session-x-greeter2
-rwxr-xr-xtests/test-unity-mir-switch2
-rwxr-xr-xtests/test-unity-mir-switch-to-user-resettable2
-rwxr-xr-xtests/test-unity-plymouth2
-rwxr-xr-xtests/test-unity-script-hooks2
-rwxr-xr-xtests/test-unity-switch2
-rwxr-xr-xtests/test-xmir-autologin2
-rwxr-xr-xtests/test-xmir-login2
-rwxr-xr-xtests/test-xmir-switch2
76 files changed, 70 insertions, 3502 deletions
diff --git a/common/configuration.c b/common/configuration.c
index db699c44..058e69e2 100644
--- a/common/configuration.c
+++ b/common/configuration.c
@@ -352,7 +352,7 @@ config_init (Configuration *config)
g_hash_table_insert (config->priv->seat_keys, "pam-service", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "pam-autologin-service", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "pam-greeter-service", GINT_TO_POINTER (KEY_SUPPORTED));
- g_hash_table_insert (config->priv->seat_keys, "xserver-backend", GINT_TO_POINTER (KEY_SUPPORTED));
+ g_hash_table_insert (config->priv->seat_keys, "xserver-backend", GINT_TO_POINTER (KEY_DEPRECATED));
g_hash_table_insert (config->priv->seat_keys, "xserver-command", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "xmir-command", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "xserver-config", GINT_TO_POINTER (KEY_SUPPORTED));
@@ -364,8 +364,8 @@ config_init (Configuration *config)
g_hash_table_insert (config->priv->seat_keys, "xdmcp-manager", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "xdmcp-port", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "xdmcp-key", GINT_TO_POINTER (KEY_SUPPORTED));
- g_hash_table_insert (config->priv->seat_keys, "unity-compositor-command", GINT_TO_POINTER (KEY_SUPPORTED));
- g_hash_table_insert (config->priv->seat_keys, "unity-compositor-timeout", GINT_TO_POINTER (KEY_SUPPORTED));
+ g_hash_table_insert (config->priv->seat_keys, "unity-compositor-command", GINT_TO_POINTER (KEY_DEPRECATED));
+ g_hash_table_insert (config->priv->seat_keys, "unity-compositor-timeout", GINT_TO_POINTER (KEY_DEPRECATED));
g_hash_table_insert (config->priv->seat_keys, "greeter-session", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "greeter-hide-users", GINT_TO_POINTER (KEY_SUPPORTED));
g_hash_table_insert (config->priv->seat_keys, "greeter-allow-guest", GINT_TO_POINTER (KEY_SUPPORTED));
diff --git a/data/lightdm.conf b/data/lightdm.conf
index 2082c1ac..16b80f7e 100644
--- a/data/lightdm.conf
+++ b/data/lightdm.conf
@@ -44,11 +44,10 @@
# [Seat:seat0] matches the seat named "seat0".
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
#
-# type = Seat type (local, xremote, unity)
+# type = Seat type (local, xremote)
# pam-service = PAM service to use for login
# pam-autologin-service = PAM service to use for autologin
# pam-greeter-service = PAM service to use for greeters
-# xserver-backend = X backend to use (mir)
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
# xserver-config = Config file to pass to X server
@@ -60,8 +59,6 @@
# 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
@@ -91,7 +88,6 @@
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
-#xserver-backend=
#xserver-command=X
#xmir-command=Xmir
#xserver-config=
@@ -103,8 +99,6 @@
#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/po/lightdm.pot b/po/lightdm.pot
index 2534cc2c..8e229703 100644
--- a/po/lightdm.pot
+++ b/po/lightdm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-01-17 16:42+1300\n"
+"POT-Creation-Date: 2018-06-21 12:34+1200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/src/Makefile.am b/src/Makefile.am
index 98468e70..d87b0183 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,8 +35,6 @@ lightdm_SOURCES = \
seat.h \
seat-local.c \
seat-local.h \
- seat-unity.c \
- seat-unity.h \
seat-xdmcp-session.c \
seat-xdmcp-session.h \
seat-xremote.c \
@@ -51,8 +49,6 @@ lightdm_SOURCES = \
session-config.h \
shared-data-manager.c \
shared-data-manager.h \
- unity-system-compositor.c \
- unity-system-compositor.h \
vnc-server.c \
vnc-server.h \
vt.c \
@@ -65,8 +61,6 @@ lightdm_SOURCES = \
x-server-local.h \
x-server-remote.c \
x-server-remote.h \
- x-server-xmir.c \
- x-server-xmir.h \
x-server-xvnc.c \
x-server-xvnc.h \
x-server.c \
diff --git a/src/display-manager.c b/src/display-manager.c
index f5cc0afa..0dd1783a 100644
--- a/src/display-manager.c
+++ b/src/display-manager.c
@@ -19,7 +19,6 @@
#include "configuration.h"
#include "seat-local.h"
#include "seat-xremote.h"
-#include "seat-unity.h"
#include "plymouth.h"
enum {
@@ -167,7 +166,6 @@ display_manager_init (DisplayManager *manager)
/* Load the seat modules */
seat_register_module ("local", SEAT_LOCAL_TYPE);
seat_register_module ("xremote", SEAT_XREMOTE_TYPE);
- seat_register_module ("unity", SEAT_UNITY_TYPE);
}
static void
diff --git a/src/lightdm.c b/src/lightdm.c
index c54f1bab..81b91172 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -772,8 +772,6 @@ main (int argc, char **argv)
config_set_string (config_get_instance (), "Seat:*", "xmir-command", "Xmir");
if (!config_has_key (config_get_instance (), "Seat:*", "xserver-share"))
config_set_boolean (config_get_instance (), "Seat:*", "xserver-share", TRUE);
- if (!config_has_key (config_get_instance (), "Seat:*", "unity-compositor-command"))
- config_set_string (config_get_instance (), "Seat:*", "unity-compositor-command", "unity-system-compositor");
if (!config_has_key (config_get_instance (), "Seat:*", "start-session"))
config_set_boolean (config_get_instance (), "Seat:*", "start-session", TRUE);
if (!config_has_key (config_get_instance (), "Seat:*", "allow-user-switching"))
diff --git a/src/seat-local.c b/src/seat-local.c
index 69a71f8f..aa6a0b0f 100644
--- a/src/seat-local.c
+++ b/src/seat-local.c
@@ -14,23 +14,12 @@
#include "seat-local.h"
#include "configuration.h"
#include "x-server-local.h"
-#include "x-server-xmir.h"
-#include "unity-system-compositor.h"
#include "wayland-session.h"
#include "plymouth.h"
#include "vt.h"
typedef struct
{
- /* System compositor being used for Mir sessions */
- UnitySystemCompositor *compositor;
-
- /* Session currently active on compositor */
- Session *active_compositor_session;
-
- /* Counter for Mir IDs to use */
- int next_xmir_id;
-
/* X server being used for XDMCP */
XServerLocal *xdmcp_x_server;
} SeatLocalPrivate;
@@ -51,7 +40,8 @@ static void
check_stopped (SeatLocal *seat)
{
SeatLocalPrivate *priv = seat_local_get_instance_private (seat);
- if (!priv->compositor && !priv->xdmcp_x_server)
+
+ if (!priv->xdmcp_x_server)
SEAT_CLASS (seat_local_parent_class)->stop (SEAT (seat));
}
@@ -71,19 +61,6 @@ xdmcp_x_server_stopped_cb (DisplayServer *display_server, SeatLocal *seat)
seat_stop (SEAT (seat));
}
-static void
-compositor_stopped_cb (UnitySystemCompositor *compositor, SeatLocal *seat)
-{
- SeatLocalPrivate *priv = seat_local_get_instance_private (seat);
-
- l_debug (seat, "Compositor stopped");
-
- g_clear_object (&priv->compositor);
-
- if (seat_get_is_stopping (SEAT (seat)))
- check_stopped (seat);
-}
-
static gboolean
seat_local_start (Seat *seat)
{
@@ -175,78 +152,28 @@ get_vt (SeatLocal *seat, DisplayServer *display_server)
return vt;
}
-static UnitySystemCompositor *
-get_unity_system_compositor (SeatLocal *seat)
-{
- SeatLocalPrivate *priv = seat_local_get_instance_private (seat);
-
- if (priv->compositor)
- return priv->compositor;
-
- priv->compositor = unity_system_compositor_new ();
-
- const gchar *command = seat_get_string_property (SEAT (seat), "unity-compositor-command");
- if (command)
- unity_system_compositor_set_command (priv->compositor, command);
-
- gint timeout = seat_get_integer_property (SEAT (seat), "unity-compositor-timeout");
- if (timeout <= 0)
- timeout = 60;
- unity_system_compositor_set_timeout (priv->compositor, timeout);
-
- gint vt = get_vt (seat, DISPLAY_SERVER (priv->compositor));
- if (vt >= 0)
- unity_system_compositor_set_vt (priv->compositor, vt);
-
- priv->next_xmir_id = 0;
- g_signal_connect (priv->compositor, DISPLAY_SERVER_SIGNAL_STOPPED, G_CALLBACK (compositor_stopped_cb), seat);
-
- return priv->compositor;
-}
-
static XServerLocal *
create_x_server (SeatLocal *seat)
{
- SeatLocalPrivate *priv = seat_local_get_instance_private (seat);
- g_autoptr(XServerLocal) x_server = NULL;
-
- const gchar *x_server_backend = seat_get_string_property (SEAT (seat), "xserver-backend");
- if (g_strcmp0 (x_server_backend, "mir") == 0)
- {
- UnitySystemCompositor *compositor = get_unity_system_compositor (SEAT_LOCAL (seat));
- x_server = X_SERVER_LOCAL (x_server_xmir_new (compositor));
+ g_autoptr(XServerLocal) x_server = x_server_local_new ();
- const gchar *command = seat_get_string_property (SEAT (seat), "xmir-command");
- if (command)
- x_server_local_set_command (x_server, command);
+ gint vt = get_vt (seat, DISPLAY_SERVER (x_server));
+ if (vt >= 0)
+ x_server_local_set_vt (x_server, vt);
- g_autofree gchar *id = g_strdup_printf ("x-%d", priv->next_xmir_id);
- priv->next_xmir_id++;
- x_server_xmir_set_mir_id (X_SERVER_XMIR (x_server), id);
- x_server_xmir_set_mir_socket (X_SERVER_XMIR (x_server), unity_system_compositor_get_socket (compositor));
- }
+ if (vt > 0)
+ l_debug (seat, "Starting local X display on VT %d", vt);
else
- {
- x_server = x_server_local_new ();
-
- gint vt = get_vt (seat, DISPLAY_SERVER (x_server));
- if (vt >= 0)
- x_server_local_set_vt (x_server, vt);
-
- if (vt > 0)
- l_debug (seat, "Starting local X display on VT %d", vt);
- else
- l_debug (seat, "Starting local X display");
-
- /* If running inside an X server use Xephyr instead */
- const gchar *command = NULL;
- if (g_getenv ("DISPLAY"))
- command = "Xephyr";
- if (!command)
- command = seat_get_string_property (SEAT (seat), "xserver-command");
- if (command)
- x_server_local_set_command (x_server, command);
- }
+ l_debug (seat, "Starting local X display");
+
+ /* If running inside an X server use Xephyr instead */
+ const gchar *command = NULL;
+ if (g_getenv ("DISPLAY"))
+ command = "Xephyr";
+ if (!command)
+ command = seat_get_string_property (SEAT (seat), "xserver-command");
+ if (command)
+ x_server_local_set_command (x_server, command);
g_autofree gchar *number = g_strdup_printf ("%d", x_server_get_display_number (X_SERVER (x_server)));
g_autoptr(XAuthority) cookie = x_authority_new_local_cookie (number);
@@ -288,8 +215,6 @@ seat_local_create_display_server (Seat *s, Session *session)
const gchar *session_type = session_get_session_type (session);
if (strcmp (session_type, "x") == 0)
return DISPLAY_SERVER (create_x_server (seat));
- else if (strcmp (session_type, "mir") == 0)
- return g_object_ref (DISPLAY_SERVER (get_unity_system_compositor (seat)));
else if (strcmp (session_type, "wayland") == 0)
return create_wayland_session (seat);
else
@@ -302,11 +227,6 @@ seat_local_create_display_server (Seat *s, Session *session)
static gboolean
seat_local_display_server_is_used (Seat *seat, DisplayServer *display_server)
{
- SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
-
- if (display_server == DISPLAY_SERVER (priv->compositor))
- return TRUE;
-
return SEAT_CLASS (seat_local_parent_class)->display_server_is_used (seat, display_server);
}
@@ -331,43 +251,23 @@ seat_local_create_session (Seat *seat)
static void
seat_local_set_active_session (Seat *seat, Session *session)
{
- SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
-
DisplayServer *display_server = session_get_display_server (session);
gint vt = display_server_get_vt (display_server);
if (vt >= 0)
vt_set_active (vt);
- g_clear_object (&priv->active_compositor_session);
- if (IS_UNITY_SYSTEM_COMPOSITOR (display_server))
- {
- unity_system_compositor_set_active_session (UNITY_SYSTEM_COMPOSITOR (display_server), session_get_env (session, "MIR_SERVER_NAME"));
- priv->active_compositor_session = g_object_ref (session);
- }
- if (IS_X_SERVER_XMIR (display_server))
- {
- unity_system_compositor_set_active_session (priv->compositor, x_server_xmir_get_mir_id (X_SERVER_XMIR (display_server)));
- priv->active_compositor_session = g_object_ref (session);
- }
-
SEAT_CLASS (seat_local_parent_class)->set_active_session (seat, session);
}
static Session *
seat_local_get_active_session (Seat *seat)
{
- SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
-
gint vt = vt_get_active ();
if (vt < 0)
return NULL;
- /* If the compositor is active return the session it is displaying */
- if (priv->compositor && display_server_get_vt (DISPLAY_SERVER (priv->compositor)) == vt)
- return priv->active_compositor_session;
-
- /* Otherwise find out which session is on this VT */
+ /* Find out which session is on this VT */
for (GList *link = seat_get_sessions (seat); link; link = link->next)
{
Session *session = link->data;
@@ -382,31 +282,6 @@ seat_local_get_active_session (Seat *seat)
}
static void
-seat_local_set_next_session (Seat *seat, Session *session)
-{
- SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
-
- if (!session)
- return;
-
- DisplayServer *display_server = session_get_display_server (session);
-
- const gchar *id = NULL;
- if (IS_X_SERVER_XMIR (display_server))
- id = x_server_xmir_get_mir_id (X_SERVER_XMIR (display_server));
- else
- id = session_get_env (session, "MIR_SERVER_NAME");
-
- if (id)
- {
- l_debug (seat, "Marking Mir session %s as the next session", id);
- unity_system_compositor_set_next_session (priv->compositor, id);
- }
-
- SEAT_CLASS (seat_local_parent_class)->set_next_session (seat, session);
-}
-
-static void
seat_local_run_script (Seat *seat, DisplayServer *display_server, Process *script)
{
if (IS_X_SERVER_LOCAL (display_server))
@@ -424,10 +299,6 @@ seat_local_stop (Seat *seat)
{
SeatLocalPrivate *priv = seat_local_get_instance_private (SEAT_LOCAL (seat));
- /* Stop the compositor */
- if (priv->compositor)
- display_server_stop (DISPLAY_SERVER (priv->compositor));
-
/* Stop the XDMCP X server */
if (priv->xdmcp_x_server)
display_server_stop (DISPLAY_SERVER (priv->xdmcp_x_server));
@@ -446,8 +317,6 @@ seat_local_finalize (GObject *object)
SeatLocal *seat = SEAT_LOCAL (object);
SeatLocalPrivate *priv = seat_local_get_instance_private (seat);
- g_clear_object (&priv->compositor);
- g_clear_object (&priv->active_compositor_session);
if (priv->xdmcp_x_server)
g_signal_handlers_disconnect_matched (priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
g_clear_object (&priv->xdmcp_x_server);
@@ -471,7 +340,6 @@ seat_local_class_init (SeatLocalClass *klass)
seat_class->create_session = seat_local_create_session;
seat_class->set_active_session = seat_local_set_active_session;
seat_class->get_active_session = seat_local_get_active_session;
- seat_class->set_next_session = seat_local_set_next_session;
seat_class->run_script = seat_local_run_script;
seat_class->stop = seat_local_stop;
}
diff --git a/src/seat-unity.c b/src/seat-unity.c
deleted file mode 100644
index 649c94d1..00000000
--- a/src/seat-unity.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * Copyright (C) 2012-2013 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 <fcntl.h>
-#include <errno.h>
-#include <glib/gstdio.h>
-
-#include "seat-unity.h"
-#include "configuration.h"
-#include "unity-system-compositor.h"
-#include "x-server-xmir.h"
-#include "vt.h"
-#include "plymouth.h"
-
-typedef struct
-{
- /* System compositor */
- UnitySystemCompositor *compositor;
-
- /* X server being used for XDMCP */
- XServerXmir *xdmcp_x_server;
-
- /* Next Mir ID to use for a Xmir servers */
- gint next_x_server_id;
-
- /* The currently visible session */
- Session *active_session;
- DisplayServer *active_display_server;
-} SeatUnityPrivate;
-
-G_DEFINE_TYPE_WITH_PRIVATE (SeatUnity, seat_unity, SEAT_TYPE)
-
-static XServerXmir *create_x_server (Seat *seat);
-
-static void
-seat_unity_setup (Seat *seat)
-{
- seat_set_supports_multi_session (seat, TRUE);
- SEAT_CLASS (seat_unity_parent_class)->setup (seat);
-}
-
-static void
-check_stopped (SeatUnity *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (seat);
- if (!priv->compositor && !priv->xdmcp_x_server)
- SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat));
-}
-
-static void
-xdmcp_x_server_stopped_cb (DisplayServer *display_server, Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- l_debug (seat, "XDMCP X server stopped");
-
- g_signal_handlers_disconnect_matched (priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
- priv->xdmcp_x_server = NULL;
-
- g_object_unref (display_server);
-
- if (seat_get_is_stopping (seat))
- check_stopped (SEAT_UNITY (seat));
- else
- seat_stop (seat);
-}
-
-static void
-compositor_ready_cb (UnitySystemCompositor *compositor, SeatUnity *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (seat);
-
- l_debug (seat, "Compositor ready");
-
- /* If running as an XDMCP client then just start an X server */
- const gchar *xdmcp_manager = seat_get_string_property (SEAT (seat), "xdmcp-manager");
- if (xdmcp_manager)
- {
- priv->xdmcp_x_server = create_x_server (SEAT (seat));
- x_server_local_set_xdmcp_server (X_SERVER_LOCAL (priv->xdmcp_x_server), xdmcp_manager);
- gint port = seat_get_integer_property (SEAT (seat), "xdmcp-port");
- if (port > 0)
- x_server_local_set_xdmcp_port (X_SERVER_LOCAL (priv->xdmcp_x_server), port);
- const gchar *key_name = seat_get_string_property (SEAT (seat), "xdmcp-key");
- if (key_name)
- {
- g_autofree gchar *path = g_build_filename (config_get_directory (config_get_instance ()), "keys.conf", NULL);
-
- g_autoptr(GKeyFile) keys = g_key_file_new ();
- g_autoptr(GError) error = NULL;
- gboolean result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error);
- if (error)
- l_debug (seat, "Error getting key %s", error->message);
-
- if (result)
- {
- if (g_key_file_has_key (keys, "keyring", key_name, NULL))
- {
- g_autofree gchar *key = g_key_file_get_string (keys, "keyring", key_name, NULL);
- if (key)
- x_server_local_set_xdmcp_key (X_SERVER_LOCAL (priv->xdmcp_x_server), key);
- }
- else
- l_debug (seat, "Key %s not defined", key_name);
- }
- }
-
- g_signal_connect (priv->xdmcp_x_server, DISPLAY_SERVER_SIGNAL_STOPPED, G_CALLBACK (xdmcp_x_server_stopped_cb), seat);
- if (!display_server_start (DISPLAY_SERVER (priv->xdmcp_x_server)))
- seat_stop (SEAT (seat));
- }
-
- SEAT_CLASS (seat_unity_parent_class)->start (SEAT (seat));
-}
-
-static void
-compositor_stopped_cb (UnitySystemCompositor *compositor, SeatUnity *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (seat);
-
- l_debug (seat, "Compositor stopped");
-
- g_clear_object (&priv->compositor);
-
- if (seat_get_is_stopping (SEAT (seat)))
- check_stopped (seat);
- else
- seat_stop (SEAT (seat));
-}
-
-static gboolean
-seat_unity_start (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- /* Replace Plymouth if it is running */
- gint vt = -1;
- if (plymouth_get_is_active () && plymouth_has_active_vt ())
- {
- gint active_vt = vt_get_active ();
- if (active_vt >= vt_get_min ())
- {
- vt = active_vt;
- plymouth_quit (TRUE);
- }
- else
- l_debug (seat, "Plymouth is running on VT %d, but this is less than the configured minimum of %d so not replacing it", active_vt, vt_get_min ());
- }
- if (plymouth_get_is_active ())
- plymouth_quit (FALSE);
- if (vt < 0)
- vt = vt_can_multi_seat () ? vt_get_unused () : 0;
- if (vt < 0)
- {
- l_debug (seat, "Failed to get a VT to run on");
- return FALSE;
- }
-
- int timeout = seat_get_integer_property (SEAT (seat), "unity-compositor-timeout");
- if (timeout <= 0)
- timeout = 60;
-
- priv->compositor = unity_system_compositor_new ();
- g_signal_connect (priv->compositor, DISPLAY_SERVER_SIGNAL_READY, G_CALLBACK (compositor_ready_cb), seat);
- g_signal_connect (priv->compositor, DISPLAY_SERVER_SIGNAL_STOPPED, G_CALLBACK (compositor_stopped_cb), seat);
- unity_system_compositor_set_command (priv->compositor, seat_get_string_property (SEAT (seat), "unity-compositor-command"));
- unity_system_compositor_set_vt (priv->compositor, vt);
- unity_system_compositor_set_timeout (priv->compositor, timeout);
-
- return display_server_start (DISPLAY_SERVER (priv->compositor));
-}
-
-static XServerXmir *
-create_x_server (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- l_debug (seat, "Starting X server on Unity compositor");
-
- g_autoptr(XServerXmir) x_server = x_server_xmir_new (priv->compositor);
-
- const gchar *command = seat_get_string_property (seat, "xmir-command");
- x_server_local_set_command (X_SERVER_LOCAL (x_server), command);
-
- g_autofree gchar *id = g_strdup_printf ("x-%d", priv->next_x_server_id);
- priv->next_x_server_id++;
- x_server_xmir_set_mir_id (x_server, id);
- x_server_xmir_set_mir_socket (x_server, unity_system_compositor_get_socket (priv->compositor));
-
- g_autofree gchar *number = g_strdup_printf ("%d", x_server_get_display_number (X_SERVER (x_server)));
- g_autoptr(XAuthority) cookie = x_authority_new_local_cookie (number);
- x_server_set_authority (X_SERVER (x_server), cookie);
-
- const gchar *layout = seat_get_string_property (seat, "xserver-layout");
- if (layout)
- x_server_local_set_layout (X_SERVER_LOCAL (x_server), layout);
-
- x_server_local_set_xdg_seat (X_SERVER_LOCAL (x_server), seat_get_name (seat));
-
- const gchar *config_file = seat_get_string_property (seat, "xserver-config");
- if (config_file)
- x_server_local_set_config (X_SERVER_LOCAL (x_server), config_file);
-
- gboolean allow_tcp = seat_get_boolean_property (seat, "xserver-allow-tcp");
- x_server_local_set_allow_tcp (X_SERVER_LOCAL (x_server), allow_tcp);
-
- return g_steal_pointer (&x_server);
-}
-
-static DisplayServer *
-seat_unity_create_display_server (Seat *seat, Session *session)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- const gchar *session_type = session_get_session_type (session);
- if (strcmp (session_type, "x") == 0)
- return DISPLAY_SERVER (create_x_server (seat));
- else if (strcmp (session_type, "mir") == 0)
- return g_object_ref (DISPLAY_SERVER (priv->compositor));
- else
- {
- l_warning (seat, "Can't create unsupported display server '%s'", session_type);
- return NULL;
- }
-}
-
-static gboolean
-seat_unity_display_server_is_used (Seat *seat, DisplayServer *display_server)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- if (display_server == DISPLAY_SERVER (priv->compositor))
- return TRUE;
-
- return SEAT_CLASS (seat_unity_parent_class)->display_server_is_used (seat, display_server);
-}
-
-static GreeterSession *
-seat_unity_create_greeter_session (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- GreeterSession *greeter_session = SEAT_CLASS (seat_unity_parent_class)->create_greeter_session (seat);
- session_set_env (SESSION (greeter_session), "XDG_SEAT", seat_get_name (seat));
-
- gint vt = display_server_get_vt (DISPLAY_SERVER (priv->compositor));
- if (vt >= 0)
- {
- g_autofree gchar *value = g_strdup_printf ("%d", vt);
- session_set_env (SESSION (greeter_session), "XDG_VTNR", value);
- }
-
- return greeter_session;
-}
-
-static Session *
-seat_unity_create_session (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- Session *session = SEAT_CLASS (seat_unity_parent_class)->create_session (seat);
- session_set_env (session, "XDG_SEAT", seat_get_name (seat));
-
- gint vt = display_server_get_vt (DISPLAY_SERVER (priv->compositor));
- if (vt >= 0)
- {
- g_autofree gchar *value = g_strdup_printf ("%d", vt);
- session_set_env (SESSION (session), "XDG_VTNR", value);
- }
-
- return session;
-}
-
-static const gchar *
-get_mir_id (Session *session)
-{
- if (!session)
- return NULL;
-
- DisplayServer *display_server = session_get_display_server (session);
- if (IS_UNITY_SYSTEM_COMPOSITOR (display_server))
- return session_get_env (session, "MIR_SERVER_NAME");
- if (IS_X_SERVER_XMIR (display_server))
- return x_server_xmir_get_mir_id (X_SERVER_XMIR (display_server));
-
- return NULL;
-}
-
-static void
-seat_unity_set_active_session (Seat *seat, Session *session)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- const gchar *old_id = get_mir_id (priv->active_session);
- const gchar *new_id = get_mir_id (session);
-
- g_clear_object (&priv->active_session);
- priv->active_session = g_object_ref (session);
-
- if (g_strcmp0 (old_id, new_id) != 0)
- unity_system_compositor_set_active_session (priv->compositor, new_id);
-
- SEAT_CLASS (seat_unity_parent_class)->set_active_session (seat, session);
-}
-
-static Session *
-seat_unity_get_active_session (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
- return priv->active_session;
-}
-
-static void
-seat_unity_set_next_session (Seat *seat, Session *session)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- if (!session)
- return;
-
- DisplayServer *display_server = session_get_display_server (session);
-
- const gchar *id = NULL;
- if (IS_X_SERVER_LOCAL (display_server))
- id = x_server_xmir_get_mir_id (X_SERVER_XMIR (display_server));
- else
- id = session_get_env (session, "MIR_SERVER_NAME");
-
- if (id)
- {
- l_debug (seat, "Marking Mir session %s as the next session", id);
- unity_system_compositor_set_next_session (priv->compositor, id);
- }
- else
- {
- l_debug (seat, "Failed to work out session ID to mark");
- }
-
- SEAT_CLASS (seat_unity_parent_class)->set_next_session (seat, session);
-}
-
-static void
-seat_unity_run_script (Seat *seat, DisplayServer *display_server, Process *script)
-{
- if (IS_X_SERVER_XMIR (display_server))
- {
- XServerXmir *x_server = X_SERVER_XMIR (display_server);
- const gchar *path = x_server_local_get_authority_file_path (X_SERVER_LOCAL (x_server));
- process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
- process_set_env (script, "XAUTHORITY", path);
- }
-
- SEAT_CLASS (seat_unity_parent_class)->run_script (seat, display_server, script);
-}
-
-static void
-seat_unity_stop (Seat *seat)
-{
- SeatUnityPrivate *priv = seat_unity_get_instance_private (SEAT_UNITY (seat));
-
- /* Stop the compositor first */
- if (priv->compositor)
- display_server_stop (DISPLAY_SERVER (priv->compositor));
-
- /* Stop the XDMCP X server first */
- if (priv->xdmcp_x_server)
- display_server_stop (DISPLAY_SERVER (priv->xdmcp_x_server));
-
- check_stopped (SEAT_UNITY (seat));
-}
-
-static void
-seat_unity_init (SeatUnity *seat)
-{
-}
-
-static void
-seat_unity_finalize (GObject *object)
-{
- SeatUnity *seat = SEAT_UNITY (object);
- SeatUnityPrivate *priv = seat_unity_get_instance_private (seat);
-
- g_clear_object (&priv->compositor);
- if (priv->xdmcp_x_server)
- {
- g_signal_handlers_disconnect_matched (priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
- g_object_unref (priv->xdmcp_x_server);
- }
- g_clear_object (&priv->active_session);
- g_clear_object (&priv->active_display_server);
-
- G_OBJECT_CLASS (seat_unity_parent_class)->finalize (object);
-}
-
-static void
-seat_unity_class_init (SeatUnityClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- SeatClass *seat_class = SEAT_CLASS (klass);
-
- object_class->finalize = seat_unity_finalize;
- seat_class->setup = seat_unity_setup;
- seat_class->start = seat_unity_start;
- seat_class->create_display_server = seat_unity_create_display_server;
- seat_class->display_server_is_used = seat_unity_display_server_is_used;
- seat_class->create_greeter_session = seat_unity_create_greeter_session;
- seat_class->create_session = seat_unity_create_session;
- seat_class->set_active_session = seat_unity_set_active_session;
- seat_class->get_active_session = seat_unity_get_active_session;
- seat_class->set_next_session = seat_unity_set_next_session;
- seat_class->run_script = seat_unity_run_script;
- seat_class->stop = seat_unity_stop;
-}
diff --git a/src/seat-unity.h b/src/seat-unity.h
deleted file mode 100644
index e97ba3a9..00000000
--- a/src/seat-unity.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2012-2013 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_UNITY_H_
-#define _SEAT_UNITY_H_
-
-#include <glib-object.h>
-#include "seat.h"
-
-G_BEGIN_DECLS
-
-#define SEAT_UNITY_TYPE (seat_unity_get_type())
-#define SEAT_UNITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAT_UNITY_TYPE, SeatUnity))
-
-typedef struct
-{
- Seat parent_instance;
-} SeatUnity;
-
-typedef struct
-{
- SeatClass parent_class;
-} SeatUnityClass;
-
-GType seat_unity_get_type (void);
-
-G_END_DECLS
-
-#endif /* _SEAT_UNITY_H_ */
diff --git a/src/unity-system-compositor.c b/src/unity-system-compositor.c
deleted file mode 100644
index 8558a80f..00000000
--- a/src/unity-system-compositor.c
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
- * Copyright (C) 2013 Canonical Ltd.
- * 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 <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <glib/gstdio.h>
-#include <stdlib.h>
-
-#include "unity-system-compositor.h"
-#include "configuration.h"
-#include "process.h"
-#include "greeter-session.h"
-#include "vt.h"
-
-typedef struct
-{
- /* Compositor process */
- Process *process;
-
- /* Command to run the compositor */
- gchar *command;
-
- /* Socket to communicate on */
- gchar *socket;
-
- /* VT to run on */
- gint vt;
- gboolean have_vt_ref;
-
- /* Pipes to communicate with compositor */
- int to_compositor_pipe[2];
- int from_compositor_pipe[2];
-
- /* IO channel listening on for messages from the compositor */
- GIOChannel *from_compositor_channel;
- guint from_compositor_watch;
-
- /* Buffer reading from channel */
- guint8 *read_buffer;
- gsize read_buffer_length;
- gsize read_buffer_n_used;
-
- /* Timeout when waiting for compositor to start */
- gint timeout;
- guint timeout_source;
-
- /* TRUE when received ready signal */
- gboolean is_ready;
-
- /* Counters for Mir IDs to use */
- int next_session_id;
- int next_greeter_id;
-} UnitySystemCompositorPrivate;
-
-static void unity_system_compositor_logger_iface_init (LoggerInterface *iface);
-
-G_DEFINE_TYPE_WITH_CODE (UnitySystemCompositor, unity_system_compositor, DISPLAY_SERVER_TYPE,
- G_ADD_PRIVATE (UnitySystemCompositor)
- G_IMPLEMENT_INTERFACE (LOGGER_TYPE, unity_system_compositor_logger_iface_init))
-
-typedef enum
-{
- USC_MESSAGE_PING = 0,
- USC_MESSAGE_PONG = 1,
- USC_MESSAGE_READY = 2,
- USC_MESSAGE_SESSION_CONNECTED = 3,
- USC_MESSAGE_SET_ACTIVE_SESSION = 4,
- USC_MESSAGE_SET_NEXT_SESSION = 5,
-} USCMessageID;
-
-UnitySystemCompositor *
-unity_system_compositor_new (void)
-{
- return g_object_new (UNITY_SYSTEM_COMPOSITOR_TYPE, NULL);
-}
-
-void
-unity_system_compositor_set_command (UnitySystemCompositor *compositor, const gchar *command)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- g_return_if_fail (compositor != NULL);
- g_return_if_fail (command != NULL);
-
- g_free (priv->command);
- priv->command = g_strdup (command);
-}
-
-void
-unity_system_compositor_set_socket (UnitySystemCompositor *compositor, const gchar *socket)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
- g_return_if_fail (compositor != NULL);
- g_free (priv->socket);
- priv->socket = g_strdup (socket);
-}
-
-const gchar *
-unity_system_compositor_get_socket (UnitySystemCompositor *compositor)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
- g_return_val_if_fail (compositor != NULL, NULL);
- return priv->socket;
-}
-
-void
-unity_system_compositor_set_vt (UnitySystemCompositor *compositor, gint vt)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- g_return_if_fail (compositor != NULL);
-
- if (priv->have_vt_ref)
- vt_unref (priv->vt);
- priv->have_vt_ref = FALSE;
- priv->vt = vt;
- if (vt > 0)
- {
- vt_ref (vt);
- priv->have_vt_ref = TRUE;
- }
-}
-
-void
-unity_system_compositor_set_timeout (UnitySystemCompositor *compositor, gint timeout)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
- g_return_if_fail (compositor != NULL);
- priv->timeout = timeout;
-}
-
-static void
-write_message (UnitySystemCompositor *compositor, guint16 id, const guint8 *payload, guint16 payload_length)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- gsize data_length = 4 + payload_length;
- g_autofree guint8 *data = g_malloc (data_length);
- data[0] = id >> 8;
- data[1] = id & 0xFF;
- data[2] = payload_length >> 8;
- data[3] = payload_length & 0xFF;
- if (payload)
- memcpy (data + 4, payload, payload_length);
-
- errno = 0;
- if (write (priv->to_compositor_pipe[1], data, data_length) != data_length)
- l_warning (compositor, "Failed to write to compositor: %s", strerror (errno));
-}
-
-void
-unity_system_compositor_set_active_session (UnitySystemCompositor *compositor, const gchar *id)
-{
- g_return_if_fail (compositor != NULL);
- write_message (compositor, USC_MESSAGE_SET_ACTIVE_SESSION, (const guint8 *) id, strlen (id));
-}
-
-void
-unity_system_compositor_set_next_session (UnitySystemCompositor *compositor, const gchar *id)
-{
- g_return_if_fail (compositor != NULL);
- write_message (compositor, USC_MESSAGE_SET_NEXT_SESSION, (const guint8 *) id, strlen (id));
-}
-
-static gint
-unity_system_compositor_get_vt (DisplayServer *server)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (UNITY_SYSTEM_COMPOSITOR (server));
- g_return_val_if_fail (server != NULL, 0);
- return priv->vt;
-}
-
-static void
-unity_system_compositor_connect_session (DisplayServer *display_server, Session *session)
-{
- UnitySystemCompositor *compositor = UNITY_SYSTEM_COMPOSITOR (display_server);
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- session_set_env (session, "XDG_SESSION_TYPE", "mir");
-
- if (priv->socket)
- session_set_env (session, "MIR_SERVER_HOST_SOCKET", priv->socket);
-
- if (!session_get_env (session, "MIR_SERVER_NAME"))
- {
- g_autofree gchar *name = NULL;
- if (IS_GREETER_SESSION (session))
- {
- name = g_strdup_printf ("greeter-%d", priv->next_greeter_id);
- priv->next_greeter_id++;
- }
- else
- {
- name = g_strdup_printf ("session-%d", priv->next_session_id);
- priv->next_session_id++;
- }
- session_set_env (session, "MIR_SERVER_NAME", name);
- }
-
- if (priv->vt >= 0)
- {
- g_autofree gchar *value = g_strdup_printf ("%d", priv->vt);
- session_set_env (session, "XDG_VTNR", value);
- }
-}
-
-static void
-unity_system_compositor_disconnect_session (DisplayServer *display_server, Session *session)
-{
- session_unset_env (session, "XDG_SESSION_TYPE");
- session_unset_env (session, "MIR_SERVER_HOST_SOCKET");
- session_unset_env (session, "MIR_SERVER_NAME");
- session_unset_env (session, "XDG_VTNR");
-}
-
-static gchar *
-get_absolute_command (const gchar *command)
-{
- g_auto(GStrv) tokens = g_strsplit (command, " ", 2);
-
- g_autofree gchar *absolute_binary = g_find_program_in_path (tokens[0]);
- gchar *absolute_command = NULL;
- if (absolute_binary)
- {
- if (tokens[1])
- absolute_command = g_strjoin (" ", absolute_binary, tokens[1], NULL);
- else
- absolute_command = g_strdup (absolute_binary);
- }
-
- return absolute_command;
-}
-
-static gboolean
-read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
-{
- UnitySystemCompositor *compositor = data;
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- if (condition == G_IO_HUP)
- {
- l_debug (compositor, "Compositor closed communication channel");
- priv->from_compositor_watch = 0;
- return FALSE;
- }
-
- /* Work out how much required for a message */
- gsize n_to_read = 0;
- if (priv->read_buffer_n_used < 4)
- n_to_read = 4 - priv->read_buffer_n_used;
- else
- {
- guint16 payload_length = priv->read_buffer[2] << 8 | priv->read_buffer[3];
- n_to_read = 4 + payload_length - priv->read_buffer_n_used;
- }
-
- /* Read from compositor */
- if (n_to_read > 0)
- {
- gsize n_total = priv->read_buffer_n_used + n_to_read;
- if (priv->read_buffer_length < n_total)
- priv->read_buffer = g_realloc (priv->read_buffer, n_total);
-
- g_autoptr(GError) error = NULL;
- gsize n_read = 0;
- GIOStatus status = g_io_channel_read_chars (source,
- (gchar *)priv->read_buffer + priv->read_buffer_n_used,
- n_to_read,
- &n_read,
- &error);
- if (error)
- l_warning (compositor, "Failed to read from compositor: %s", error->message);
- if (status != G_IO_STATUS_NORMAL)
- return TRUE;
- priv->read_buffer_n_used += n_read;
- }
-
- /* Read header */
- if (priv->read_buffer_n_used < 4)
- return TRUE;
- guint16 id = priv->read_buffer[0] << 8 | priv->read_buffer[1];
- guint16 payload_length = priv->read_buffer[2] << 8 | priv->read_buffer[3];
-
- /* Read payload */
- if (priv->read_buffer_n_used < 4 + payload_length)
- return TRUE;
- /*guint8 *payload = priv->read_buffer + 4;*/
-
- switch (id)
- {
- case USC_MESSAGE_PING:
- l_debug (compositor, "PING!");
- write_message (compositor, USC_MESSAGE_PONG, NULL, 0);
- break;
- case USC_MESSAGE_PONG:
- l_debug (compositor, "PONG!");
- break;
- case USC_MESSAGE_READY:
- l_debug (compositor, "READY");
- if (!priv->is_ready)
- {
- priv->is_ready = TRUE;
- l_debug (compositor, "Compositor ready");
- g_source_remove (priv->timeout_source);
- priv->timeout_source = 0;
- DISPLAY_SERVER_CLASS (unity_system_compositor_parent_class)->start (DISPLAY_SERVER (compositor));
- }
- break;
- case USC_MESSAGE_SESSION_CONNECTED:
- l_debug (compositor, "SESSION CONNECTED");
- break;
- default:
- l_warning (compositor, "Ignoring unknown message %d with %d octets from system compositor", id, payload_length);
- break;
- }
-
- /* Clear buffer */
- priv->read_buffer_n_used = 0;
-
- return TRUE;
-}
-
-static void
-run_cb (Process *process, gpointer user_data)
-{
- /* Make input non-blocking */
- int fd = open ("/dev/null", O_RDONLY);
- dup2 (fd, STDIN_FILENO);
- close (fd);
-}
-
-static gboolean
-timeout_cb (gpointer data)
-{
- UnitySystemCompositor *compositor = data;
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- /* Stop the compositor - it is not working */
- display_server_stop (DISPLAY_SERVER (compositor));
-
- priv->timeout_source = 0;
-
- return TRUE;
-}
-
-static void
-stopped_cb (Process *process, UnitySystemCompositor *compositor)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- l_debug (compositor, "Unity system compositor stopped");
-
- if (priv->timeout_source != 0)
- g_source_remove (priv->timeout_source);
- priv->timeout_source = 0;
-
- /* Release VT and display number for re-use */
- if (priv->have_vt_ref)
- {
- vt_unref (priv->vt);
- priv->have_vt_ref = FALSE;
- }
-
- DISPLAY_SERVER_CLASS (unity_system_compositor_parent_class)->stop (DISPLAY_SERVER (compositor));
-}
-
-static gboolean
-unity_system_compositor_start (DisplayServer *server)
-{
- UnitySystemCompositor *compositor = UNITY_SYSTEM_COMPOSITOR (server);
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
-
- g_return_val_if_fail (priv->process == NULL, FALSE);
-
- priv->is_ready = FALSE;
-
- g_return_val_if_fail (priv->command != NULL, FALSE);
-
- /* Create pipes to talk to compositor */
- if (pipe (priv->to_compositor_pipe) < 0 || pipe (priv->from_compositor_pipe) < 0)
- {
- l_debug (compositor, "Failed to create compositor pipes: %s", g_strerror (errno));
- return FALSE;
- }
-
- /* Don't allow the daemon end of the pipes to be accessed in the compositor */
- fcntl (priv->to_compositor_pipe[1], F_SETFD, FD_CLOEXEC);
- fcntl (priv->from_compositor_pipe[0], F_SETFD, FD_CLOEXEC);
-
- /* Listen for messages from the compositor */
- priv->from_compositor_channel = g_io_channel_unix_new (priv->from_compositor_pipe[0]);
- priv->from_compositor_watch = g_io_add_watch (priv->from_compositor_channel, G_IO_IN | G_IO_HUP, read_cb, compositor);
-
- /* Setup logging */
- g_autofree gchar *dir = config_get_string (config_get_instance (), "LightDM", "log-directory");
- g_autofree gchar *log_file = g_build_filename (dir, "unity-system-compositor.log", NULL);
- l_debug (compositor, "Logging to %s", log_file);
-
- /* Setup environment */
- priv->process = process_new (run_cb, compositor);
- gboolean backup_logs = config_get_boolean (config_get_instance (), "LightDM", "backup-logs");
- process_set_log_file (priv->process, log_file, TRUE, backup_logs ? LOG_MODE_BACKUP_AND_TRUNCATE : LOG_MODE_APPEND);
- process_set_clear_environment (priv->process, TRUE);
- process_set_env (priv->process, "XDG_SEAT", "seat0");
- g_autofree gchar *value = g_strdup_printf ("%d", priv->vt);
- process_set_env (priv->process, "XDG_VTNR", value);
- /* Variable required for regression tests */
- if (g_getenv ("LIGHTDM_TEST_ROOT"))
- {
- process_set_env (priv->process, "LIGHTDM_TEST_ROOT", g_getenv ("LIGHTDM_TEST_ROOT"));
- process_set_env (priv->process, "LD_PRELOAD", g_getenv ("LD_PRELOAD"));
- process_set_env (priv->process, "LD_LIBRARY_PATH", g_getenv ("LD_LIBRARY_PATH"));
- }
-
- /* Generate command line to run */
- g_autofree gchar *absolute_command = get_absolute_command (priv->command);
- if (!absolute_command)
- {
- l_debug (compositor, "Can't launch compositor %s, not found in path", priv->command);
- return FALSE;
- }
- g_autoptr(GString) command = g_string_new (absolute_command);
- g_string_append_printf (command, " --file '%s'", priv->socket);
- g_string_append_printf (command, " --from-dm-fd %d --to-dm-fd %d", priv->to_compositor_pipe[0], priv->from_compositor_pipe[1]);
- if (priv->vt > 0)
- g_string_append_printf (command, " --vt %d", priv->vt);
- process_set_command (priv->process, command->str);
-
- /* Start the compositor */
- g_signal_connect (priv->process, PROCESS_SIGNAL_STOPPED, G_CALLBACK (stopped_cb), compositor);
- gboolean result = process_start (priv->process, FALSE);
-
- /* Close compositor ends of the pipes */
- close (priv->to_compositor_pipe[0]);
- priv->to_compositor_pipe[0] = -1;
- close (priv->from_compositor_pipe[1]);
- priv->from_compositor_pipe[1] = -1;
-
- if (!result)
- return FALSE;
-
- /* Connect to the compositor */
- if (priv->timeout > 0)
- {
- l_debug (compositor, "Waiting for system compositor for %ds", priv->timeout);
- priv->timeout_source = g_timeout_add (priv->timeout * 1000, timeout_cb, compositor);
- }
-
- return TRUE;
-}
-
-static void
-unity_system_compositor_stop (DisplayServer *server)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (UNITY_SYSTEM_COMPOSITOR (server));
- process_stop (priv->process);
-}
-
-static void
-unity_system_compositor_init (UnitySystemCompositor *compositor)
-{
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (compositor);
- priv->vt = -1;
- priv->command = g_strdup ("unity-system-compositor");
- priv->socket = g_strdup ("/run/mir_socket");
- priv->timeout = -1;
- priv->to_compositor_pipe[0] = -1;
- priv->to_compositor_pipe[1] = -1;
- priv->from_compositor_pipe[0] = -1;
- priv->from_compositor_pipe[1] = -1;
-}
-
-static void
-unity_system_compositor_finalize (GObject *object)
-{
- UnitySystemCompositor *self = UNITY_SYSTEM_COMPOSITOR (object);
- UnitySystemCompositorPrivate *priv = unity_system_compositor_get_instance_private (self);
-
- if (priv->process)
- g_signal_handlers_disconnect_matched (priv->process, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
- g_clear_object (&priv->process);
- g_clear_pointer (&priv->command, g_free);
- g_clear_pointer (&priv->socket, g_free);
- if (priv->have_vt_ref)
- vt_unref (priv->vt);
- close (priv->to_compositor_pipe[0]);
- close (priv->to_compositor_pipe[1]);
- close (priv->from_compositor_pipe[0]);
- close (priv->from_compositor_pipe[1]);
- g_clear_pointer (&priv->from_compositor_channel, g_io_channel_unref);
- if (priv->from_compositor_watch)
- g_source_remove (priv->from_compositor_watch);
- g_clear_pointer (&priv->read_buffer, g_free);
- if (priv->timeout_source)
- g_source_remove (priv->timeout_source);
-
- G_OBJECT_CLASS (unity_system_compositor_parent_class)->finalize (object);
-}
-
-static void
-unity_system_compositor_class_init (UnitySystemCompositorClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DisplayServerClass *display_server_class = DISPLAY_SERVER_CLASS (klass);
-
- display_server_class->get_vt = unity_system_compositor_get_vt;
- display_server_class->connect_session = unity_system_compositor_connect_session;
- display_server_class->disconnect_session = unity_system_compositor_disconnect_session;
- display_server_class->start = unity_system_compositor_start;
- display_server_class->stop = unity_system_compositor_stop;
- object_class->finalize = unity_system_compositor_finalize;
-}
-
-static gint
-unity_system_compositor_real_logprefix (Logger *self, gchar *buf, gulong buflen)
-{
- return g_snprintf (buf, buflen, "Unity System Compositor: ");
-}
-
-static void
-unity_system_compositor_logger_iface_init (LoggerInterface *iface)
-{
- iface->logprefix = &unity_system_compositor_real_logprefix;
-}
diff --git a/src/unity-system-compositor.h b/src/unity-system-compositor.h
deleted file mode 100644
index 546a8cc6..00000000
--- a/src/unity-system-compositor.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2013 Canonical Ltd.
- * 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 UNITY_SYSTEM_COMPOSITOR_H_
-#define UNITY_SYSTEM_COMPOSITOR_H_
-
-#include <glib-object.h>
-#include "display-server.h"
-
-G_BEGIN_DECLS
-
-#define UNITY_SYSTEM_COMPOSITOR_TYPE (unity_system_compositor_get_type())
-#define UNITY_SYSTEM_COMPOSITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_SYSTEM_COMPOSITOR_TYPE, UnitySystemCompositor))
-#define IS_UNITY_SYSTEM_COMPOSITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_SYSTEM_COMPOSITOR_TYPE))
-
-typedef struct
-{
- DisplayServer parent_instance;
-} UnitySystemCompositor;
-
-typedef struct
-{
- DisplayServerClass parent_class;
-} UnitySystemCompositorClass;
-
-GType unity_system_compositor_get_type (void);
-
-UnitySystemCompositor *unity_system_compositor_new (void);
-
-void unity_system_compositor_set_command (UnitySystemCompositor *compositor, const gchar *command);
-
-void unity_system_compositor_set_socket (UnitySystemCompositor *compositor, const gchar *socket);
-
-const gchar *unity_system_compositor_get_socket (UnitySystemCompositor *compositor);
-
-void unity_system_compositor_set_vt (UnitySystemCompositor *compositor, gint vt);
-
-void unity_system_compositor_set_timeout (UnitySystemCompositor *compositor, gint timeout);
-
-void unity_system_compositor_set_active_session (UnitySystemCompositor *compositor, const gchar *id);
-
-void unity_system_compositor_set_next_session (UnitySystemCompositor *compositor, const gchar *id);
-
-G_END_DECLS
-
-#endif /* UNITY_SYSTEM_COMPOSITOR_H_ */
diff --git a/src/x-server-xmir.c b/src/x-server-xmir.c
deleted file mode 100644
index 38cb8656..00000000
--- a/src/x-server-xmir.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2010-2016 Canonical Ltd.
- *
- * 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 "x-server-xmir.h"
-
-typedef struct
-{
- /* Compositor we are running under */
- UnitySystemCompositor *compositor;
-
- /* TRUE if we are waiting for the compositor to start */
- gboolean waiting_for_compositor;
-
- /* ID to report to Mir */
- gchar *mir_id;
-
- /* Filename of socket Mir is listening on */
- gchar *mir_socket;
-} XServerXmirPrivate;
-
-G_DEFINE_TYPE_WITH_PRIVATE (XServerXmir, x_server_xmir, X_SERVER_LOCAL_TYPE)
-
-static void
-compositor_ready_cb (UnitySystemCompositor *compositor, XServerXmir *server)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
-
- if (!priv->waiting_for_compositor)
- return;
- priv->waiting_for_compositor = FALSE;
-
- gboolean result = X_SERVER_LOCAL_CLASS (x_server_xmir_parent_class)->start (DISPLAY_SERVER (server));
- if (!result)
- display_server_stop (DISPLAY_SERVER (server));
-}
-
-static void
-compositor_stopped_cb (UnitySystemCompositor *compositor, XServerXmir *server)
-{
- display_server_stop (DISPLAY_SERVER (server));
-}
-
-XServerXmir *
-x_server_xmir_new (UnitySystemCompositor *compositor)
-{
- XServerXmir *server = g_object_new (X_SERVER_XMIR_TYPE, NULL);
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
-
- x_server_local_set_command (X_SERVER_LOCAL (server), "Xmir");
- priv->compositor = g_object_ref (compositor);
- g_signal_connect (compositor, DISPLAY_SERVER_SIGNAL_READY, G_CALLBACK (compositor_ready_cb), server);
- g_signal_connect (compositor, DISPLAY_SERVER_SIGNAL_STOPPED, G_CALLBACK (compositor_stopped_cb), server);
-
- return server;
-}
-
-void
-x_server_xmir_set_mir_id (XServerXmir *server, const gchar *id)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
- g_return_if_fail (server != NULL);
- g_free (priv->mir_id);
- priv->mir_id = g_strdup (id);
-}
-
-const gchar *
-x_server_xmir_get_mir_id (XServerXmir *server)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
- g_return_val_if_fail (server != NULL, NULL);
- return priv->mir_id;
-}
-
-void
-x_server_xmir_set_mir_socket (XServerXmir *server, const gchar *socket)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
- g_return_if_fail (server != NULL);
- g_free (priv->mir_socket);
- priv->mir_socket = g_strdup (socket);
-}
-
-static void
-x_server_xmir_add_args (XServerLocal *x_server, GString *command)
-{
- XServerXmir *server = X_SERVER_XMIR (x_server);
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
-
- if (priv->mir_id)
- g_string_append_printf (command, " -mir %s", priv->mir_id);
-
- if (priv->mir_socket)
- g_string_append_printf (command, " -mirSocket %s", priv->mir_socket);
-}
-
-static DisplayServer *
-x_server_xmir_get_parent (DisplayServer *server)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (X_SERVER_XMIR (server));
- return DISPLAY_SERVER (priv->compositor);
-}
-
-static gint
-x_server_xmir_get_vt (DisplayServer *server)
-{
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (X_SERVER_XMIR (server));
- return display_server_get_vt (DISPLAY_SERVER (priv->compositor));
-}
-
-static gboolean
-x_server_xmir_start (DisplayServer *display_server)
-{
- XServerXmir *server = X_SERVER_XMIR (display_server);
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (server);
-
- if (display_server_get_is_ready (DISPLAY_SERVER (priv->compositor)))
- return X_SERVER_LOCAL_CLASS (x_server_xmir_parent_class)->start (display_server);
- else
- {
- if (!priv->waiting_for_compositor)
- {
- priv->waiting_for_compositor = TRUE;
- if (!display_server_start (DISPLAY_SERVER (priv->compositor)))
- return FALSE;
- }
- return TRUE;
- }
-}
-
-static void
-x_server_xmir_init (XServerXmir *server)
-{
-}
-
-static void
-x_server_xmir_finalize (GObject *object)
-{
- XServerXmir *self = X_SERVER_XMIR (object);
- XServerXmirPrivate *priv = x_server_xmir_get_instance_private (self);
-
- if (priv->compositor)
- g_signal_handlers_disconnect_matched (priv->compositor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
- g_clear_object (&priv->compositor);
- g_clear_pointer (&priv->mir_id, g_free);
- g_clear_pointer (&priv->mir_socket, g_free);
-
- G_OBJECT_CLASS (x_server_xmir_parent_class)->finalize (object);
-}
-
-static void
-x_server_xmir_class_init (XServerXmirClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DisplayServerClass *display_server_class = DISPLAY_SERVER_CLASS (klass);
- XServerLocalClass *x_server_local_class = X_SERVER_LOCAL_CLASS (klass);
-
- x_server_local_class->add_args = x_server_xmir_add_args;
- display_server_class->get_parent = x_server_xmir_get_parent;
- display_server_class->get_vt = x_server_xmir_get_vt;
- display_server_class->start = x_server_xmir_start;
- object_class->finalize = x_server_xmir_finalize;
-}
diff --git a/src/x-server-xmir.h b/src/x-server-xmir.h
deleted file mode 100644
index 24b631c4..00000000
--- a/src/x-server-xmir.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010-2016 Canonical Ltd.
- *
- * 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 X_SERVER_XMIR_H_
-#define X_SERVER_XMIR_H_
-
-#include "x-server-local.h"
-#include "unity-system-compositor.h"
-
-G_BEGIN_DECLS
-
-#define X_SERVER_XMIR_TYPE (x_server_xmir_get_type())
-#define X_SERVER_XMIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), X_SERVER_XMIR_TYPE, XServerXmir))
-#define IS_X_SERVER_XMIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), X_SERVER_XMIR_TYPE))
-
-typedef struct
-{
- XServerLocal parent_instance;
-} XServerXmir;
-
-typedef struct
-{
- XServerLocalClass parent_class;
-} XServerXmirClass;
-
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (XServerXmir, g_object_unref)
-
-GType x_server_xmir_get_type (void);
-
-XServerXmir *x_server_xmir_new (UnitySystemCompositor *compositor);
-
-void x_server_xmir_set_mir_id (XServerXmir *server, const gchar *id);
-
-const gchar *x_server_xmir_get_mir_id (XServerXmir *server);
-
-void x_server_xmir_set_mir_socket (XServerXmir *server, const gchar *socket);
-
-const gchar *x_server_xmir_get_authority_file_path (XServerXmir *server);
-
-G_END_DECLS
-
-#endif /* X_SERVER_XMIR_H_ */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a79c056c..6ca26678 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -250,39 +250,13 @@ TESTS = \
test-mir-autologin \
test-mir-greeter \
test-mir-session \
- test-mir-session-crash \
- test-mir-session-compositor-crash \
- test-xmir-autologin \
- test-xmir-login \
- test-xmir-switch \
- test-unity-compositor-command \
- test-unity-compositor-not-found \
- test-unity-compositor-fail-start \
- test-unity-compositor-fail-ready \
- test-unity-compositor-crash \
- test-unity-compositor-fallback \
- test-unity-compositor-next-session \
- test-unity-compositor-mir-next-session \
- test-unity-autologin \
- test-unity-login \
- test-unity-switch \
- test-unity-plymouth \
- test-unity-script-hooks \
- test-unity-mir-autologin \
- test-unity-mir-greeter-x-session \
- test-unity-mir-greeter-mir-session \
- test-unity-mir-lock-seat \
- test-unity-mir-session-x-greeter \
- test-unity-mir-switch \
- test-unity-mir-switch-to-user-resettable \
- test-unity-mir-script-hooks \
+ test-unity \
test-wayland-autologin \
test-wayland-greeter \
test-wayland-session \
test-invalid-seat \
test-seatdefaults-still-supported
-# test-mir-script-hooks \
# test-session-exit-error
# test-greeter-no-exit
# test-change-password-gobject
@@ -530,10 +504,7 @@ EXTRA_DIST = \
scripts/login-xserver-crash.conf \
scripts/mir-autologin.conf \
scripts/mir-greeter.conf \
- scripts/mir-script-hooks.conf \
scripts/mir-session.conf \
- scripts/mir-session-compositor-crash.conf \
- scripts/mir-session-crash.conf \
scripts/multiple-authenticate.conf \
scripts/multi-seat.conf \
scripts/multi-seat-autologin-seat0.conf \
@@ -615,27 +586,7 @@ EXTRA_DIST = \
scripts/switch-to-user-no-password.conf \
scripts/switch-to-user-resettable.conf \
scripts/system-xauthority.conf \
- scripts/unity-autologin.conf \
- scripts/unity-compositor-command.conf \
- scripts/unity-compositor-crash.conf \
- scripts/unity-compositor-fail-ready.conf \
- scripts/unity-compositor-fail-start.conf \
- scripts/unity-compositor-fallback.conf \
- scripts/unity-compositor-mir-next-session.conf \
- scripts/unity-compositor-next-session.conf \
- scripts/unity-compositor-not-found.conf \
- scripts/unity-login.conf \
- scripts/unity-mir-autologin.conf \
- scripts/unity-mir-greeter-mir-session.conf \
- scripts/unity-mir-lock-seat.conf \
- scripts/unity-mir-greeter-x-session.conf \
- scripts/unity-mir-script-hooks.conf \
- scripts/unity-mir-session-x-greeter.conf \
- scripts/unity-mir-switch.conf \
- scripts/unity-mir-switch-to-user-resettable.conf \
- scripts/unity-plymouth.conf \
- scripts/unity-script-hooks.conf \
- scripts/unity-switch.conf \
+ scripts/unity.conf \
scripts/unknown-config.conf \
scripts/upstart-autologin.conf \
scripts/upstart-login.conf \
@@ -688,9 +639,6 @@ EXTRA_DIST = \
scripts/xdmcp-server-xdm-authentication-required.conf \
scripts/xdmcp-server-xdm-authentication-short-data.conf \
scripts/xlocal-legacy.conf \
- scripts/xmir-autologin.conf \
- scripts/xmir-login.conf \
- scripts/xmir-switch.conf \
scripts/xremote-autologin.conf \
scripts/xremote-login.conf \
scripts/xremote-login-logout.conf \
diff --git a/tests/scripts/mir-autologin.conf b/tests/scripts/mir-autologin.conf
index 9d941a1a..15d5a5c0 100644
--- a/tests/scripts/mir-autologin.conf
+++ b/tests/scripts/mir-autologin.conf
@@ -1,5 +1,5 @@
#
-# Check can automatically log into a Mir session from a VT based seat
+# Check deprecated Mir session no longer works (autologin)
#
[Seat:*]
@@ -9,19 +9,26 @@ user-session=mir
#?*START-DAEMON
#?RUNNER DAEMON-START
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
+# Session fails to start...
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+# X server starts
+#?XSERVER-0 START VT=7 SEAT=seat0
+
+# Daemon connects when X server is ready
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
-# Session shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
+# Greeter starts
+#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
# Cleanup
#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/mir-greeter.conf b/tests/scripts/mir-greeter.conf
index 7135be6c..ef05e7eb 100644
--- a/tests/scripts/mir-greeter.conf
+++ b/tests/scripts/mir-greeter.conf
@@ -1,25 +1,10 @@
#
-# Check can run a Mir greeter from a VT based seat
+# Check deprecated Mir greeter no longer works
#
#?*START-DAEMON
#?RUNNER DAEMON-START
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
+# Fails to start greeter...
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# Greeter shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
+#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/mir-script-hooks.conf b/tests/scripts/mir-script-hooks.conf
deleted file mode 100644
index 204cb2da..00000000
--- a/tests/scripts/mir-script-hooks.conf
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Check LightDM runs the script hooks correctly for autologin and the greeter
-#
-
-[Seat:*]
-display-setup-script=test-script-hook DISPLAY-SETUP
-display-stopped-script=test-script-hook DISPLAY-STOPPED
-greeter-setup-script=test-script-hook GREETER-SETUP
-session-setup-script=test-script-hook SESSION-SETUP
-session-cleanup-script=test-script-hook SESSION-CLEANUP
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK SESSION-SETUP XDG_SEAT=seat0 USER=have-password1
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# Session shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Logout session
-#?*SESSION-MIR-session-0 LOGOUT
-
-# Script hooks runs
-#?SCRIPT-HOOK SESSION-CLEANUP XDG_SEAT=seat0 USER=have-password1
-
-# System compositor stops
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-STOPPED XDG_SEAT=seat0
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK GREETER-SETUP XDG_SEAT=seat0 USER=.*
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-# FIXME: Not occurring?
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-STOPPED XDG_SEAT=seat0
-
-# Finish cleanup
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/mir-session-compositor-crash.conf b/tests/scripts/mir-session-compositor-crash.conf
deleted file mode 100644
index 7d2d24b2..00000000
--- a/tests/scripts/mir-session-compositor-crash.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Check LightDM returns to the greeter if the unity compositor crashes inside a session
-#
-
-[Seat:*]
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# Session shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Crash system compositor
-#?*UNITY-SYSTEM-COMPOSITOR CRASH
-
-# Session is stopped
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-
-# X server starts
-#?XSERVER-0 START VT=7 SEAT=seat0
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XSERVER-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/mir-session-crash.conf b/tests/scripts/mir-session-crash.conf
deleted file mode 100644
index e99d50ee..00000000
--- a/tests/scripts/mir-session-crash.conf
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Check LightDM returns to the greeter if the Mir session crashes
-#
-
-[Seat:*]
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# Session shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Crash session
-#?*SESSION-MIR-session-0 CRASH
-
-# X server starts
-#?XSERVER-0 START VT=8 SEAT=seat0
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Switch to X
-#?VT ACTIVATE VT=8
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XSERVER-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
-# Cleanup
-#?*STOP-DAEMON
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/mir-session.conf b/tests/scripts/mir-session.conf
index 1e730af8..a39d27a0 100644
--- a/tests/scripts/mir-session.conf
+++ b/tests/scripts/mir-session.conf
@@ -1,5 +1,5 @@
#
-# Check can login into a Mir session on a VT based seat
+# Check deprecated Mir session no longer works
#
[Seat:*]
@@ -27,28 +27,13 @@ user-session=mir
# Attempt to log into account
#?*GREETER-X-0 AUTHENTICATE USERNAME=no-password1
#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-0 START-SESSION
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=8 XDG_VTNR=8
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Switch to system compositor
-#?VT ACTIVATE VT=8
-
-# Greeter terminates
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-# Session shown
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
+# Attempt to start the session, it will fail
+#?*GREETER-X-0 START-SESSION
+#?GREETER-X-0 SESSION-FAILED ERROR=.*
# Cleanup
#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-autologin.conf b/tests/scripts/unity-autologin.conf
deleted file mode 100644
index 841300ba..00000000
--- a/tests/scripts/unity-autologin.conf
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Check can automatically login with Unity seat type
-#
-
-[Seat:*]
-type=unity
-autologin-user=have-password1
-user-session=default
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-compositor-command.conf b/tests/scripts/unity-compositor-command.conf
deleted file mode 100644
index 204ea24d..00000000
--- a/tests/scripts/unity-compositor-command.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Check can set the unity compositor command
-#
-
-[Seat:*]
-type=unity
-user-session=default
-unity-compositor-command=unity-system-compositor --test
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7 TEST=TRUE
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-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=x-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-compositor-crash.conf b/tests/scripts/unity-compositor-crash.conf
deleted file mode 100644
index cd88e1db..00000000
--- a/tests/scripts/unity-compositor-crash.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Check LightDM ? if the compositor crashes
-#
-
-[Seat:*]
-type=unity
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-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=x-0
-
-# Crash system compositor
-#?*UNITY-SYSTEM-COMPOSITOR CRASH
-
-# Daemon exits with error code
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/unity-compositor-fail-ready.conf b/tests/scripts/unity-compositor-fail-ready.conf
deleted file mode 100644
index d272efe5..00000000
--- a/tests/scripts/unity-compositor-fail-ready.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Check clean stop when the compositor fails to indicate it is ready
-#
-
-[Seat:*]
-type=unity
-unity-compositor-timeout=1
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts but doesn't indicate it is ready
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-
-# Timeout and compositor is stopped
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-
-# Daemon exits with error code
-#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/unity-compositor-fail-start.conf b/tests/scripts/unity-compositor-fail-start.conf
deleted file mode 100644
index 254bddf8..00000000
--- a/tests/scripts/unity-compositor-fail-start.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Check clean stop when the compositor fails to start
-#
-
-[unity-system-compositor-config]
-return-value=1
-
-[Seat:*]
-type=unity
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor fails to start
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
-
-# Daemon exits with error code
-#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/unity-compositor-fallback.conf b/tests/scripts/unity-compositor-fallback.conf
deleted file mode 100644
index 8908d174..00000000
--- a/tests/scripts/unity-compositor-fallback.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Check seat type falls back when the compositor fails to start
-#
-
-[unity-system-compositor-config]
-return-value=1
-
-[Seat:*]
-type=unity;INVALID;unity;local;
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor fails to start
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
-
-# System compositor fails to start a second time
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
-
-# X server starts in VT mode
-#?XSERVER-0 START VT=7 SEAT=seat0
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XSERVER-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-compositor-mir-next-session.conf b/tests/scripts/unity-compositor-mir-next-session.conf
deleted file mode 100644
index 48cc2301..00000000
--- a/tests/scripts/unity-compositor-mir-next-session.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Check that we correctly set next session when switching selected greeter user in Mir
-#
-
-[Seat:*]
-type=unity
-user-session=mir
-autologin-user=have-password2
-autologin-in-background=true
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Greeter session
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# Background session
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password2 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password2
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Switch to user without a session
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=have-password1
-#?GREETER-MIR-greeter-0 SHOW-PROMPT TEXT="Password:"
-
-# Switch to user with a session
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=have-password2
-#?GREETER-MIR-greeter-0 SHOW-PROMPT TEXT="Password:"
-#?UNITY-SYSTEM-COMPOSITOR SET-NEXT-SESSION ID=session-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-compositor-next-session.conf b/tests/scripts/unity-compositor-next-session.conf
deleted file mode 100644
index 73191d53..00000000
--- a/tests/scripts/unity-compositor-next-session.conf
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Check that we correctly set next session when switching selected greeter user
-#
-
-[Seat:*]
-type=unity
-user-session=default
-autologin-user=have-password2
-autologin-in-background=true
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Greeter session
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
-# Background session
-#?XMIR-1 START SEAT=seat0 MIR-ID=x-1
-#?*XMIR-1 INDICATE-READY
-#?XMIR-1 INDICATE-READY
-#?XMIR-1 ACCEPT-CONNECT
-#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password2
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-1 ACCEPT-CONNECT
-#?SESSION-X-1 CONNECT-XSERVER
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Switch to user without a session
-#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password1
-#?GREETER-X-0 SHOW-PROMPT TEXT="Password:"
-
-# Switch to user with a session
-#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password2
-#?GREETER-X-0 SHOW-PROMPT TEXT="Password:"
-#?UNITY-SYSTEM-COMPOSITOR SET-NEXT-SESSION ID=x-1
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?XMIR-1 TERMINATE SIGNAL=15
-#?SESSION-X-1 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-compositor-not-found.conf b/tests/scripts/unity-compositor-not-found.conf
deleted file mode 100644
index 04078d55..00000000
--- a/tests/scripts/unity-compositor-not-found.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Check can set the unity compositor command
-#
-
-[Seat:*]
-type=unity
-user-session=default
-unity-compositor-command=unity-system-compositor-INVALID
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# Command is not found
-
-# Daemon exits with error code
-#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/unity-login.conf b/tests/scripts/unity-login.conf
deleted file mode 100644
index 025c0a65..00000000
--- a/tests/scripts/unity-login.conf
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Check can login with Unity seat type
-#
-
-[Seat:*]
-type=unity
-user-session=default
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-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=x-0
-
-# Log into account with a password
-#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password1
-#?GREETER-X-0 SHOW-PROMPT TEXT="Password:"
-#?*GREETER-X-0 RESPOND TEXT="password"
-#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-0 START-SESSION
-#?GREETER-X-0 TERMINATE SIGNAL=15
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-autologin.conf b/tests/scripts/unity-mir-autologin.conf
deleted file mode 100644
index d56c25ea..00000000
--- a/tests/scripts/unity-mir-autologin.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Check can automatically log into a Mir session
-#
-
-[Seat:*]
-type=unity
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-greeter-mir-session.conf b/tests/scripts/unity-mir-greeter-mir-session.conf
deleted file mode 100644
index cdfa832d..00000000
--- a/tests/scripts/unity-mir-greeter-mir-session.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Check can log into a Mir session from a Mir greeter
-#
-
-[Seat:*]
-type=unity
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Log into account with a password
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=no-password1
-#?GREETER-MIR-greeter-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-MIR-greeter-0 START-SESSION
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Greeter stops
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-greeter-x-session.conf b/tests/scripts/unity-mir-greeter-x-session.conf
deleted file mode 100644
index 11261429..00000000
--- a/tests/scripts/unity-mir-greeter-x-session.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Check can log into an X session from a Mir greeter
-#
-
-[Seat:*]
-type=unity
-user-session=default
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Log into account with a password
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=no-password1
-#?GREETER-MIR-greeter-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-MIR-greeter-0 START-SESSION
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Greeter stops
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-lock-seat.conf b/tests/scripts/unity-mir-lock-seat.conf
deleted file mode 100644
index 7f89ec00..00000000
--- a/tests/scripts/unity-mir-lock-seat.conf
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Check can lock a seat from D-Bus with Mir
-#
-
-[Seat:*]
-autologin-user=have-password1
-type=unity
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Lock the seat
-#?*SESSION-MIR-session-0 LOCK-SEAT
-#?SESSION-MIR-session-0 LOCK-SEAT
-
-# Session is locked
-#?LOGIN1 LOCK-SESSION SESSION=c0
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-#?GREETER-MIR-greeter-0 LOCK-HINT
-
-# Switch to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-script-hooks.conf b/tests/scripts/unity-mir-script-hooks.conf
deleted file mode 100644
index 2e18eb5b..00000000
--- a/tests/scripts/unity-mir-script-hooks.conf
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Check LightDM runs the script hooks correctly for autologin and the greeter
-#
-
-[Seat:*]
-type=unity
-display-setup-script=test-script-hook DISPLAY-SETUP
-display-stopped-script=test-script-hook DISPLAY-STOPPED
-greeter-setup-script=test-script-hook GREETER-SETUP
-session-setup-script=test-script-hook SESSION-SETUP
-session-cleanup-script=test-script-hook SESSION-CLEANUP
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK SESSION-SETUP XDG_SEAT=seat0 USER=have-password1
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Logout session
-#?*SESSION-MIR-session-0 LOGOUT
-
-# Script hooks runs
-#?SCRIPT-HOOK SESSION-CLEANUP XDG_SEAT=seat0 USER=have-password1
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK GREETER-SETUP XDG_SEAT=seat0 USER=.*
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-STOPPED XDG_SEAT=seat0
-
-# Finish cleanup
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-session-x-greeter.conf b/tests/scripts/unity-mir-session-x-greeter.conf
deleted file mode 100644
index 229f0a65..00000000
--- a/tests/scripts/unity-mir-session-x-greeter.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Check can log into a Mir session from an X greeter
-#
-
-[Seat:*]
-type=unity
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-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=x-0
-
-# Log into account
-#?*GREETER-X-0 AUTHENTICATE USERNAME=no-password1
-#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-0 START-SESSION
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Greeter quits once session ready
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-switch-to-user-resettable.conf b/tests/scripts/unity-mir-switch-to-user-resettable.conf
deleted file mode 100644
index 1da8b244..00000000
--- a/tests/scripts/unity-mir-switch-to-user-resettable.conf
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Check can run a Mir greeter from a VT based seat
-# Uses a resettable greeter
-#
-
-[Seat:*]
-type=unity
-user-session=mir
-
-[test-greeter-config]
-resettable=true
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Greeter starts
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Log into account with a password
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=no-password1
-#?GREETER-MIR-greeter-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-MIR-greeter-0 START-SESSION
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?GREETER-MIR-greeter-0 IDLE
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Switch to an account with a password
-#?*SWITCH-TO-USER USERNAME=have-password2
-#?RUNNER SWITCH-TO-USER USERNAME=have-password2
-
-# Switch to greeter
-#?LOGIN1 LOCK-SESSION SESSION=c1
-#?GREETER-MIR-greeter-0 RESET
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Requested user is automatically selected
-#?GREETER-MIR-greeter-0 SELECT-USER-HINT USERNAME=have-password2
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=have-password2
-#?GREETER-MIR-greeter-0 SHOW-PROMPT TEXT="Password:"
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-mir-switch.conf b/tests/scripts/unity-mir-switch.conf
deleted file mode 100644
index 82f04e08..00000000
--- a/tests/scripts/unity-mir-switch.conf
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# Check system compositor correctly switches Mir sessions
-#
-
-[Seat:*]
-type=unity
-autologin-user=have-password1
-user-session=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-#?*WAIT
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# Session starts
-#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
-
-# Show the greeter
-#?*SWITCH-TO-GREETER
-#?RUNNER SWITCH-TO-GREETER
-
-# Greeter starts
-#?LOGIN1 LOCK-SESSION SESSION=c0
-#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
-#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
-
-# Login
-#?*GREETER-MIR-greeter-0 AUTHENTICATE USERNAME=no-password1
-#?GREETER-MIR-greeter-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-MIR-greeter-0 START-SESSION
-#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
-
-# New session starts
-#?SESSION-MIR-session-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=mir XDG_SESSION_DESKTOP=mir USER=no-password1
-
-# Switch to session
-#?LOGIN1 ACTIVATE-SESSION SESSION=c2
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-1
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
-#?SESSION-MIR-session-1 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-plymouth.conf b/tests/scripts/unity-plymouth.conf
deleted file mode 100644
index c927839a..00000000
--- a/tests/scripts/unity-plymouth.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Check Plymouth quits when Unity System compositor server is started. Plymouth is on an active VT so it handshakes with u-s-c.
-#
-
-[Seat:*]
-type=unity
-autologin-user=have-password1
-user-session=default
-
-[test-plymouth-config]
-enabled=true
-has-active-vt=true
-active=true
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# Check if Plymouth is running
-#?PLYMOUTH PING ACTIVE=TRUE
-#?PLYMOUTH HAS-ACTIVE-VT=TRUE
-#?PLYMOUTH QUIT RETAIN-SPLASH=TRUE
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-script-hooks.conf b/tests/scripts/unity-script-hooks.conf
deleted file mode 100644
index aa7db1e5..00000000
--- a/tests/scripts/unity-script-hooks.conf
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# Check LightDM runs the script hooks correctly for autologin and the greeter
-#
-
-[Seat:*]
-type=unity
-display-setup-script=test-script-hook DISPLAY-SETUP
-display-stopped-script=test-script-hook DISPLAY-STOPPED
-greeter-setup-script=test-script-hook GREETER-SETUP
-session-setup-script=test-script-hook SESSION-SETUP
-session-cleanup-script=test-script-hook SESSION-CLEANUP
-autologin-user=have-password1
-user-session=default
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK SESSION-SETUP XDG_SEAT=seat0 USER=have-password1
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Logout session
-#?*SESSION-X-0 LOGOUT
-
-# Script hook runs
-#?SCRIPT-HOOK SESSION-CLEANUP XDG_SEAT=seat0 USER=have-password1
-
-# X server stops
-#?XMIR-0 TERMINATE SIGNAL=15
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-STOPPED XDG_SEAT=seat0
-
-# X server starts
-#?XMIR-1 START SEAT=seat0 MIR-ID=x-1
-
-# Daemon connects when X server is ready
-#?*XMIR-1 INDICATE-READY
-#?XMIR-1 INDICATE-READY
-#?XMIR-1 ACCEPT-CONNECT
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-SETUP XDG_SEAT=seat0
-#?SCRIPT-HOOK GREETER-SETUP XDG_SEAT=seat0 USER=.*
-
-# Greeter starts
-#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-1 ACCEPT-CONNECT
-#?GREETER-X-1 CONNECT-XSERVER
-#?GREETER-X-1 CONNECT-TO-DAEMON
-#?GREETER-X-1 CONNECTED-TO-DAEMON
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-1
-
-# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-1 TERMINATE SIGNAL=15
-#?XMIR-1 TERMINATE SIGNAL=15
-
-# Script hooks run
-#?SCRIPT-HOOK DISPLAY-STOPPED XDG_SEAT=seat0
-
-# Finish cleanup
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity-switch.conf b/tests/scripts/unity-switch.conf
deleted file mode 100644
index 51cf79d1..00000000
--- a/tests/scripts/unity-switch.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# Check system compositor correctly switches X sessions
-#
-
-[Seat:*]
-type=unity
-autologin-user=have-password1
-user-session=default
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Show the greeter
-#?*SWITCH-TO-GREETER
-#?RUNNER SWITCH-TO-GREETER
-
-# New X server starts
-#?XMIR-1 START SEAT=seat0 MIR-ID=x-1
-
-# Daemon connects when X server is ready
-#?*XMIR-1 INDICATE-READY
-#?XMIR-1 INDICATE-READY
-#?XMIR-1 ACCEPT-CONNECT
-
-# Lock session
-#?LOGIN1 LOCK-SESSION SESSION=c0
-
-# Greeter starts
-#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-1 ACCEPT-CONNECT
-#?GREETER-X-1 CONNECT-XSERVER
-#?GREETER-X-1 CONNECT-TO-DAEMON
-#?GREETER-X-1 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-1
-
-# Login
-#?*GREETER-X-1 AUTHENTICATE USERNAME=no-password1
-#?GREETER-X-1 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-1 START-SESSION
-#?GREETER-X-1 TERMINATE SIGNAL=15
-
-# New session starts
-#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c2
-#?XMIR-1 ACCEPT-CONNECT
-#?SESSION-X-1 CONNECT-XSERVER
-
-# Logout of new session
-#?*SESSION-X-1 LOGOUT
-#?XMIR-1 TERMINATE SIGNAL=15
-
-# X server starts
-#?XMIR-2 START SEAT=seat0 MIR-ID=x-2
-#?*XMIR-2 INDICATE-READY
-#?XMIR-2 INDICATE-READY
-#?XMIR-2 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-2 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c3
-#?XMIR-2 ACCEPT-CONNECT
-#?GREETER-X-2 CONNECT-XSERVER
-#?GREETER-X-2 CONNECT-TO-DAEMON
-#?GREETER-X-2 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-2
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?GREETER-X-2 TERMINATE SIGNAL=15
-#?XMIR-2 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/unity.conf b/tests/scripts/unity.conf
new file mode 100644
index 00000000..9795a37d
--- /dev/null
+++ b/tests/scripts/unity.conf
@@ -0,0 +1,15 @@
+#
+# Check deprecated unity seat doesn't work
+#
+
+[Seat:*]
+type=unity
+autologin-user=have-password1
+user-session=default
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# Fails to start unity seat...
+
+#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/scripts/xmir-autologin.conf b/tests/scripts/xmir-autologin.conf
deleted file mode 100644
index 72d7406f..00000000
--- a/tests/scripts/xmir-autologin.conf
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Check uses XMir backend when requested to autologin
-#
-
-[Seat:*]
-autologin-user=have-password1
-user-session=default
-xserver-backend=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/xmir-login.conf b/tests/scripts/xmir-login.conf
deleted file mode 100644
index 9cdbee80..00000000
--- a/tests/scripts/xmir-login.conf
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# Check uses XMir backend when requested
-#
-
-[Seat:*]
-user-session=default
-xserver-backend=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-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=x-0
-
-# Log into account with a password
-#?*GREETER-X-0 AUTHENTICATE USERNAME=have-password1
-#?GREETER-X-0 SHOW-PROMPT TEXT="Password:"
-#?*GREETER-X-0 RESPOND TEXT="password"
-#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-0 START-SESSION
-#?GREETER-X-0 TERMINATE SIGNAL=15
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/xmir-switch.conf b/tests/scripts/xmir-switch.conf
deleted file mode 100644
index 0afe2ec8..00000000
--- a/tests/scripts/xmir-switch.conf
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-# Check system compositor correctly switches Xmir sessions
-#
-
-[Seat:*]
-autologin-user=have-password1
-user-session=default
-xserver-backend=mir
-
-#?*START-DAEMON
-#?RUNNER DAEMON-START
-
-# System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
-#?*UNITY-SYSTEM-COMPOSITOR READY
-
-# X server starts
-#?XMIR-0 START SEAT=seat0 MIR-ID=x-0
-
-# Daemon connects when X server is ready
-#?*XMIR-0 INDICATE-READY
-#?XMIR-0 INDICATE-READY
-#?XMIR-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c0
-#?XMIR-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# System compositor switches to session
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-0
-
-# Show the greeter
-#?*SWITCH-TO-GREETER
-#?RUNNER SWITCH-TO-GREETER
-
-# New X server starts
-#?XMIR-1 START SEAT=seat0 MIR-ID=x-1
-
-# Daemon connects when X server is ready
-#?*XMIR-1 INDICATE-READY
-#?XMIR-1 INDICATE-READY
-#?XMIR-1 ACCEPT-CONNECT
-
-# Lock session
-#?LOGIN1 LOCK-SESSION SESSION=c0
-
-# Greeter starts
-#?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c1
-#?XMIR-1 ACCEPT-CONNECT
-#?GREETER-X-1 CONNECT-XSERVER
-#?GREETER-X-1 CONNECT-TO-DAEMON
-#?GREETER-X-1 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-1
-
-# Login
-#?*GREETER-X-1 AUTHENTICATE USERNAME=no-password1
-#?GREETER-X-1 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE
-#?*GREETER-X-1 START-SESSION
-#?GREETER-X-1 TERMINATE SIGNAL=15
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-1
-
-# New session starts
-#?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1
-#?LOGIN1 ACTIVATE-SESSION SESSION=c2
-#?XMIR-1 ACCEPT-CONNECT
-#?SESSION-X-1 CONNECT-XSERVER
-
-# Logout of new session
-#?*SESSION-X-1 LOGOUT
-#?XMIR-1 TERMINATE SIGNAL=15
-
-# X server starts
-#?XMIR-2 START SEAT=seat0 MIR-ID=x-2
-#?*XMIR-2 INDICATE-READY
-#?XMIR-2 INDICATE-READY
-#?XMIR-2 ACCEPT-CONNECT
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-2
-
-# Greeter starts
-#?GREETER-X-2 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?LOGIN1 ACTIVATE-SESSION SESSION=c3
-#?XMIR-2 ACCEPT-CONNECT
-#?GREETER-X-2 CONNECT-XSERVER
-#?GREETER-X-2 CONNECT-TO-DAEMON
-#?GREETER-X-2 CONNECTED-TO-DAEMON
-
-# System compositor switches to greeter
-#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=x-2
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XMIR-0 TERMINATE SIGNAL=15
-#?GREETER-X-2 TERMINATE SIGNAL=15
-#?XMIR-2 TERMINATE SIGNAL=15
-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am
index 25eeda0d..596e841a 100644
--- a/tests/src/Makefile.am
+++ b/tests/src/Makefile.am
@@ -8,10 +8,8 @@ noinst_PROGRAMS = dbus-env \
test-script-hook \
test-session \
guest-account \
- unity-system-compositor \
vnc-client \
X \
- Xmir \
Xvnc
dist_noinst_SCRIPTS = lightdm-session \
test-python-greeter
@@ -76,19 +74,6 @@ X_LDADD = \
$(GIO_LIBS) \
$(GIO_UNIX_LIBS)
-Xmir_SOURCES = Xmir.c x-authority.c x-authority.h x-common.c x-common.h x-server.c x-server.h status.c status.h
-Xmir_CFLAGS = \
- $(WARN_CFLAGS) \
- $(GOBJECT_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GIO_CFLAGS) \
- $(GIO_UNIX_CFLAGS)
-Xmir_LDADD = \
- $(GOBJECT_LIBS) \
- $(GLIB_LIBS) \
- $(GIO_LIBS) \
- $(GIO_UNIX_LIBS)
-
Xvnc_SOURCES = Xvnc.c x-authority.c x-authority.h x-common.c x-common.h x-server.c x-server.h status.c status.h
Xvnc_CFLAGS = \
$(WARN_CFLAGS) \
@@ -227,17 +212,6 @@ plymouth_LDADD = \
$(GLIB_LIBS) \
$(GIO_UNIX_LIBS)
-unity_system_compositor_SOURCES = unity-system-compositor.c status.c status.h
-unity_system_compositor_CFLAGS = \
- $(WARN_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GIO_CFLAGS) \
- $(GIO_UNIX_CFLAGS)
-unity_system_compositor_LDADD = \
- $(GLIB_LIBS) \
- $(GIO_LIBS) \
- $(GIO_UNIX_LIBS)
-
vnc_client_SOURCES = vnc-client.c status.c status.h
vnc_client_CFLAGS = \
$(WARN_CFLAGS) \
diff --git a/tests/src/Xmir.c b/tests/src/Xmir.c
deleted file mode 100644
index 5b207b48..00000000
--- a/tests/src/Xmir.c
+++ /dev/null
@@ -1,278 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <glib-unix.h>
-
-#include "status.h"
-#include "x-server.h"
-#include "x-authority.h"
-#include "xdmcp-client.h"
-
-static GMainLoop *loop;
-static int exit_status = EXIT_SUCCESS;
-
-static GKeyFile *config;
-
-/* Path to lock file */
-static gchar *lock_path = NULL;
-
-/* Path to authority database to use */
-static gchar *auth_path = NULL;
-
-/* ID to use for test reporting */
-static gchar *id;
-
-/* Display number being served */
-static int display_number = 0;
-
-/* VT being run on */
-static int vt_number = -1;
-
-/* X server */
-static XServer *xserver = NULL;
-
-static void
-cleanup (void)
-{
- if (lock_path)
- unlink (lock_path);
- g_clear_object (&xserver);
-}
-
-static void
-quit (int status)
-{
- exit_status = status;
- g_main_loop_quit (loop);
-}
-
-static gboolean
-sighup_cb (gpointer user_data)
-{
- status_notify ("%s DISCONNECT-CLIENTS", id);
- return TRUE;
-}
-
-static gboolean
-sigint_cb (gpointer user_data)
-{
- status_notify ("%s TERMINATE SIGNAL=%d", id, SIGINT);
- quit (EXIT_SUCCESS);
- return TRUE;
-}
-
-static gboolean
-sigterm_cb (gpointer user_data)
-{
- status_notify ("%s TERMINATE SIGNAL=%d", id, SIGTERM);
- quit (EXIT_SUCCESS);
- return TRUE;
-}
-
-static void
-client_connected_cb (XServer *server, XClient *client)
-{
- status_notify ("%s ACCEPT-CONNECT", id);
- x_client_send_success (client);
-}
-
-static void
-client_disconnected_cb (XServer *server, XClient *client)
-{
- g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL);
-}
-
-static void
-request_cb (const gchar *name, GHashTable *params)
-{
- if (!name)
- {
- g_main_loop_quit (loop);
- return;
- }
-
- if (strcmp (name, "INDICATE-READY") == 0)
- {
- void *handler;
-
- handler = signal (SIGUSR1, SIG_IGN);
- if (handler == SIG_IGN)
- {
- status_notify ("%s INDICATE-READY", id);
- kill (getppid (), SIGUSR1);
- }
- signal (SIGUSR1, handler);
- }
-}
-
-int
-main (int argc, char **argv)
-{
-#if !defined(GLIB_VERSION_2_36)
- g_type_init ();
-#endif
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_unix_signal_add (SIGINT, sigint_cb, NULL);
- g_unix_signal_add (SIGTERM, sigterm_cb, NULL);
- g_unix_signal_add (SIGHUP, sighup_cb, NULL);
-
- gchar *seat = NULL;
- gchar *mir_id = NULL;
- for (int i = 1; i < argc; i++)
- {
- char *arg = argv[i];
-
- if (arg[0] == ':')
- {
- display_number = atoi (arg + 1);
- }
- else if (strcmp (arg, "-auth") == 0)
- {
- auth_path = argv[i+1];
- i++;
- }
- else if (strcmp (arg, "-nolisten") == 0)
- {
- char *protocol = argv[i+1];
- i++;
- if (strcmp (protocol, "tcp") == 0)
- ;//listen_tcp = FALSE;
- else if (strcmp (protocol, "unix") == 0)
- ;//listen_unix = FALSE;
- }
- else if (strcmp (arg, "-nr") == 0)
- {
- }
- else if (strcmp (arg, "-background") == 0)
- {
- /* Ignore arg */
- i++;
- }
- else if (g_str_has_prefix (arg, "vt"))
- {
- vt_number = atoi (arg + 2);
- }
- else if (strcmp (arg, "-novtswitch") == 0)
- {
- /* Ignore VT args */
- }
- else if (strcmp (arg, "-seat") == 0)
- {
- seat = argv[i+1];
- i++;
- }
- else if (strcmp (arg, "-mir") == 0)
- {
- mir_id = argv[i+1];
- i++;
- }
- else if (strcmp (arg, "-mirSocket") == 0)
- {
- /* FIXME */
- i++;
- }
- else
- {
- g_printerr ("Unrecognized option: %s\n"
- "Use: %s [:<display>] [option]\n"
- "-auth file Select authorization file\n"
- "-nolisten protocol Don't listen on protocol\n"
- "-background [none] Create root window with no background\n"
- "-nr (Ubuntu-specific) Synonym for -background none\n"
- "-seat string seat to run on\n"
- "-mir id Mir ID to use\n"
- "-mirSocket name Mir socket to use\n"
- "vtxx Use virtual terminal xx instead of the next available\n",
- arg, argv[0]);
- return EXIT_FAILURE;
- }
- }
-
- id = g_strdup_printf ("XMIR-%d", display_number);
-
- status_connect (request_cb, id);
-
- xserver = x_server_new (display_number);
- g_signal_connect (xserver, X_SERVER_SIGNAL_CLIENT_CONNECTED, G_CALLBACK (client_connected_cb), NULL);
- g_signal_connect (xserver, X_SERVER_SIGNAL_CLIENT_DISCONNECTED, G_CALLBACK (client_disconnected_cb), NULL);
-
- g_autoptr(GString) status_text = g_string_new ("");
- g_string_printf (status_text, "%s START", id);
- if (vt_number >= 0)
- g_string_append_printf (status_text, " VT=%d", vt_number);
- if (seat != NULL)
- g_string_append_printf (status_text, " SEAT=%s", seat);
- if (mir_id != NULL)
- g_string_append_printf (status_text, " MIR-ID=%s", mir_id);
- status_notify ("%s", status_text->str);
-
- 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);
-
- if (g_key_file_has_key (config, "test-xserver-config", "return-value", NULL))
- {
- int return_value = g_key_file_get_integer (config, "test-xserver-config", "return-value", NULL);
- status_notify ("%s EXIT CODE=%d", id, return_value);
- return return_value;
- }
-
- g_autofree gchar *lock_filename = g_strdup_printf (".X%d-lock", display_number);
- lock_path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", lock_filename, NULL);
- int lock_file = open (lock_path, O_CREAT | O_EXCL | O_WRONLY, 0444);
- if (lock_file < 0)
- {
- g_autofree gchar *lock_contents = NULL;
- if (g_file_get_contents (lock_path, &lock_contents, NULL, NULL))
- {
- pid_t pid = atol (lock_contents);
-
- g_autofree gchar *proc_filename = g_strdup_printf ("/proc/%d", pid);
- if (!g_file_test (proc_filename, G_FILE_TEST_EXISTS))
- {
- g_autofree gchar *socket_dir = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", ".X11-unix", NULL);
- g_mkdir_with_parents (socket_dir, 0755);
-
- g_autofree gchar *socket_filename = g_strdup_printf ("X%d", display_number);
- g_autofree gchar *socket_path = g_build_filename (socket_dir, socket_filename, NULL);
-
- g_printerr ("Breaking lock on non-existant process %d\n", pid);
- unlink (lock_path);
- unlink (socket_path);
- }
-
- lock_file = open (lock_path, O_CREAT | O_EXCL | O_WRONLY, 0444);
- }
- }
- if (lock_file < 0)
- {
- fprintf (stderr,
- "Fatal server error:\n"
- "Server is already active for display %d\n"
- " If this server is no longer running, remove %s\n"
- " and start again.\n", display_number, lock_path);
- g_clear_pointer (&lock_path, g_free);
- return EXIT_FAILURE;
- }
- g_autofree gchar *pid_string = g_strdup_printf ("%10ld", (long) getpid ());
- if (write (lock_file, pid_string, strlen (pid_string)) < 0)
- {
- g_warning ("Error writing PID file: %s", strerror (errno));
- return EXIT_FAILURE;
- }
-
- if (!x_server_start (xserver))
- return EXIT_FAILURE;
-
- g_main_loop_run (loop);
-
- cleanup ();
-
- return exit_status;
-}
diff --git a/tests/src/unity-system-compositor.c b/tests/src/unity-system-compositor.c
deleted file mode 100644
index 2d7bb3e6..00000000
--- a/tests/src/unity-system-compositor.c
+++ /dev/null
@@ -1,215 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <glib-unix.h>
-
-#include "status.h"
-
-static GMainLoop *loop;
-static int exit_status = EXIT_SUCCESS;
-static int from_dm_fd = -1, to_dm_fd = -1;
-
-static GKeyFile *config;
-
-static void
-quit (int status)
-{
- exit_status = status;
- g_main_loop_quit (loop);
-}
-
-static gboolean
-sigint_cb (gpointer user_data)
-{
- status_notify ("UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=%d", SIGINT);
- quit (EXIT_SUCCESS);
- return TRUE;
-}
-
-static gboolean
-sigterm_cb (gpointer user_data)
-{
- status_notify ("UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=%d", SIGTERM);
- quit (EXIT_SUCCESS);
- return TRUE;
-}
-
-typedef enum
-{
- USC_MESSAGE_PING = 0,
- USC_MESSAGE_PONG = 1,
- USC_MESSAGE_READY = 2,
- USC_MESSAGE_SESSION_CONNECTED = 3,
- USC_MESSAGE_SET_ACTIVE_SESSION = 4,
- USC_MESSAGE_SET_NEXT_SESSION = 5,
-} USCMessageID;
-
-static void
-write_message (guint16 id, const guint8 *payload, guint16 payload_length)
-{
- gsize data_length = 4 + payload_length;
- guint8 *data = g_malloc (data_length);
- data[0] = id >> 8;
- data[1] = id & 0xFF;
- data[2] = payload_length >> 8;
- data[3] = payload_length & 0xFF;
- if (payload)
- memcpy (data + 4, payload, payload_length);
-
- if (write (to_dm_fd, data, data_length) < 0)
- fprintf (stderr, "Failed to write to daemon: %s\n", strerror (errno));
-}
-
-static gboolean
-read_message_cb (GIOChannel *channel, GIOCondition condition, gpointer data)
-{
- gchar header[4];
- gsize n_read;
- g_autoptr(GError) error = NULL;
- if (g_io_channel_read_chars (channel, header, 4, &n_read, &error) != G_IO_STATUS_NORMAL)
- {
- g_printerr ("Failed to read header: %s\n", error->message);
- return FALSE;
- }
- if (n_read != 4)
- {
- g_printerr ("Short read for header, %zi instead of expected 4\n", n_read);
- return FALSE;
- }
- guint16 id = header[0] << 8 | header[1];
- guint16 payload_length = header[2] << 8 | header[3];
- gchar *payload = g_malloc0 (payload_length + 1);
- if (g_io_channel_read_chars (channel, payload, payload_length, &n_read, &error) != G_IO_STATUS_NORMAL)
- {
- g_printerr ("Failed to read payload: %s\n", error->message);
- return FALSE;
- }
- if (n_read != payload_length)
- {
- g_printerr ("Short read for payload, %zi instead of expected %d\n", n_read, payload_length);
- return FALSE;
- }
-
- switch (id)
- {
- case USC_MESSAGE_PING:
- status_notify ("UNITY-SYSTEM-COMPOSITOR PING");
- break;
- case USC_MESSAGE_SET_ACTIVE_SESSION:
- status_notify ("UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=%s", (gchar *)payload);
- break;
- case USC_MESSAGE_SET_NEXT_SESSION:
- status_notify ("UNITY-SYSTEM-COMPOSITOR SET-NEXT-SESSION ID=%s", (gchar *)payload);
- break;
- default:
- g_printerr ("Ignoring message %d with %d octets\n", id, payload_length);
- break;
- }
-
- free (payload);
-
- return TRUE;
-}
-
-static void
-request_cb (const gchar *name, GHashTable *params)
-{
- if (!name)
- {
- g_main_loop_quit (loop);
- return;
- }
-
- if (strcmp (name, "PING") == 0)
- write_message (USC_MESSAGE_PING, NULL, 0);
-
- else if (strcmp (name, "PONG") == 0)
- write_message (USC_MESSAGE_PONG, NULL, 0);
-
- else if (strcmp (name, "READY") == 0)
- write_message (USC_MESSAGE_READY, NULL, 0);
-
- else if (strcmp (name, "CRASH") == 0)
- kill (getpid (), SIGSEGV);
-}
-
-int
-main (int argc, char **argv)
-{
-#if !defined(GLIB_VERSION_2_36)
- g_type_init ();
-#endif
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_unix_signal_add (SIGINT, sigint_cb, NULL);
- g_unix_signal_add (SIGTERM, sigterm_cb, NULL);
-
- status_connect (request_cb, "UNITY-SYSTEM-COMPOSITOR");
-
- gboolean test = FALSE, container = FALSE;
- int vt_number = -1;
- const gchar *file = NULL;
- for (int i = 1; i < argc; i++)
- {
- char *arg = argv[i];
-
- if (strcmp (arg, "--from-dm-fd") == 0)
- {
- from_dm_fd = atoi (argv[i+1]);
- i++;
- }
- else if (strcmp (arg, "--to-dm-fd") == 0)
- {
- to_dm_fd = atoi (argv[i+1]);
- i++;
- }
- else if (strcmp (arg, "--vt") == 0)
- {
- vt_number = atoi (argv[i+1]);
- i++;
- }
- else if (strcmp (arg, "--file") == 0)
- {
- file = argv[i+1];
- i++;
- }
- else if (strcmp (arg, "--test") == 0)
- test = TRUE;
- else if (strcmp (arg, "--container") == 0)
- container = TRUE;
- else
- return EXIT_FAILURE;
- }
-
- g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);
-
- g_autoptr(GString) status_text = g_string_new ("UNITY-SYSTEM-COMPOSITOR START");
- if (file)
- g_string_append_printf (status_text, " FILE=%s", file);
- if (vt_number >= 0)
- g_string_append_printf (status_text, " VT=%d", vt_number);
- if (g_getenv ("XDG_VTNR"))
- g_string_append_printf (status_text, " XDG_VTNR=%s", g_getenv ("XDG_VTNR"));
- if (test)
- g_string_append (status_text, " TEST=TRUE");
- if (container)
- g_string_append (status_text, " CONTAINER=TRUE");
- status_notify ("%s", status_text->str);
-
- 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);
-
- if (g_key_file_has_key (config, "unity-system-compositor-config", "return-value", NULL))
- {
- int return_value = g_key_file_get_integer (config, "unity-system-compositor-config", "return-value", NULL);
- status_notify ("UNITY-SYSTEM-COMPOSITOR EXIT CODE=%d", return_value);
- return return_value;
- }
-
- g_main_loop_run (loop);
-
- return exit_status;
-}
diff --git a/tests/test-mir-script-hooks b/tests/test-mir-script-hooks
deleted file mode 100755
index 1cc1944e..00000000
--- a/tests/test-mir-script-hooks
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner mir-script-hooks test-mir-greeter
diff --git a/tests/test-mir-session-compositor-crash b/tests/test-mir-session-compositor-crash
deleted file mode 100755
index 90775ff1..00000000
--- a/tests/test-mir-session-compositor-crash
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner mir-session-compositor-crash test-gobject-greeter
diff --git a/tests/test-mir-session-crash b/tests/test-mir-session-crash
deleted file mode 100755
index 7458ba90..00000000
--- a/tests/test-mir-session-crash
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner mir-session-crash test-gobject-greeter
diff --git a/tests/test-unity b/tests/test-unity
new file mode 100755
index 00000000..c5d0a23c
--- /dev/null
+++ b/tests/test-unity
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity test-gobject-greeter
diff --git a/tests/test-unity-autologin b/tests/test-unity-autologin
deleted file mode 100755
index 1e15178e..00000000
--- a/tests/test-unity-autologin
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-autologin test-gobject-greeter
diff --git a/tests/test-unity-compositor-command b/tests/test-unity-compositor-command
deleted file mode 100755
index f953527d..00000000
--- a/tests/test-unity-compositor-command
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-command test-gobject-greeter
diff --git a/tests/test-unity-compositor-crash b/tests/test-unity-compositor-crash
deleted file mode 100755
index d6e9e5df..00000000
--- a/tests/test-unity-compositor-crash
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-crash test-gobject-greeter
diff --git a/tests/test-unity-compositor-fail-ready b/tests/test-unity-compositor-fail-ready
deleted file mode 100755
index 25b84951..00000000
--- a/tests/test-unity-compositor-fail-ready
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-fail-ready test-gobject-greeter
diff --git a/tests/test-unity-compositor-fail-start b/tests/test-unity-compositor-fail-start
deleted file mode 100755
index 7e49cd24..00000000
--- a/tests/test-unity-compositor-fail-start
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-fail-start test-gobject-greeter
diff --git a/tests/test-unity-compositor-fallback b/tests/test-unity-compositor-fallback
deleted file mode 100755
index c60cc1f0..00000000
--- a/tests/test-unity-compositor-fallback
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-fallback test-gobject-greeter
diff --git a/tests/test-unity-compositor-mir-next-session b/tests/test-unity-compositor-mir-next-session
deleted file mode 100755
index cda2ca5a..00000000
--- a/tests/test-unity-compositor-mir-next-session
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-mir-next-session test-mir-greeter
diff --git a/tests/test-unity-compositor-next-session b/tests/test-unity-compositor-next-session
deleted file mode 100755
index 730c9ae4..00000000
--- a/tests/test-unity-compositor-next-session
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-next-session test-gobject-greeter
diff --git a/tests/test-unity-compositor-not-found b/tests/test-unity-compositor-not-found
deleted file mode 100755
index 42b0dba0..00000000
--- a/tests/test-unity-compositor-not-found
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-compositor-not-found test-gobject-greeter
diff --git a/tests/test-unity-login b/tests/test-unity-login
deleted file mode 100755
index dea45ca6..00000000
--- a/tests/test-unity-login
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-login test-gobject-greeter
diff --git a/tests/test-unity-mir-autologin b/tests/test-unity-mir-autologin
deleted file mode 100755
index e87c68e6..00000000
--- a/tests/test-unity-mir-autologin
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-autologin test-mir-greeter
diff --git a/tests/test-unity-mir-greeter-mir-session b/tests/test-unity-mir-greeter-mir-session
deleted file mode 100755
index 746d89cd..00000000
--- a/tests/test-unity-mir-greeter-mir-session
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-greeter-mir-session test-mir-greeter
diff --git a/tests/test-unity-mir-greeter-x-session b/tests/test-unity-mir-greeter-x-session
deleted file mode 100755
index 56160d00..00000000
--- a/tests/test-unity-mir-greeter-x-session
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-greeter-x-session test-mir-greeter
diff --git a/tests/test-unity-mir-lock-seat b/tests/test-unity-mir-lock-seat
deleted file mode 100755
index b4b4a190..00000000
--- a/tests/test-unity-mir-lock-seat
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-lock-seat test-mir-greeter
diff --git a/tests/test-unity-mir-script-hooks b/tests/test-unity-mir-script-hooks
deleted file mode 100755
index be7f1827..00000000
--- a/tests/test-unity-mir-script-hooks
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-script-hooks test-mir-greeter
diff --git a/tests/test-unity-mir-session-x-greeter b/tests/test-unity-mir-session-x-greeter
deleted file mode 100755
index 8ff0b78e..00000000
--- a/tests/test-unity-mir-session-x-greeter
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-session-x-greeter test-gobject-greeter
diff --git a/tests/test-unity-mir-switch b/tests/test-unity-mir-switch
deleted file mode 100755
index d92bbd63..00000000
--- a/tests/test-unity-mir-switch
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-switch test-mir-greeter
diff --git a/tests/test-unity-mir-switch-to-user-resettable b/tests/test-unity-mir-switch-to-user-resettable
deleted file mode 100755
index e4582006..00000000
--- a/tests/test-unity-mir-switch-to-user-resettable
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-mir-switch-to-user-resettable test-mir-greeter
diff --git a/tests/test-unity-plymouth b/tests/test-unity-plymouth
deleted file mode 100755
index a6fd8edb..00000000
--- a/tests/test-unity-plymouth
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-plymouth test-gobject-greeter
diff --git a/tests/test-unity-script-hooks b/tests/test-unity-script-hooks
deleted file mode 100755
index 5c59de24..00000000
--- a/tests/test-unity-script-hooks
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-script-hooks test-gobject-greeter
diff --git a/tests/test-unity-switch b/tests/test-unity-switch
deleted file mode 100755
index 6f5fb3f4..00000000
--- a/tests/test-unity-switch
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner unity-switch test-gobject-greeter
diff --git a/tests/test-xmir-autologin b/tests/test-xmir-autologin
deleted file mode 100755
index be0fbdf2..00000000
--- a/tests/test-xmir-autologin
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner xmir-autologin test-gobject-greeter
diff --git a/tests/test-xmir-login b/tests/test-xmir-login
deleted file mode 100755
index 3c0317e5..00000000
--- a/tests/test-xmir-login
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner xmir-login test-gobject-greeter
diff --git a/tests/test-xmir-switch b/tests/test-xmir-switch
deleted file mode 100755
index d1217f79..00000000
--- a/tests/test-xmir-switch
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-./src/dbus-env ./src/test-runner xmir-switch test-gobject-greeter