commit
4a55391f1f
@ -55,8 +55,8 @@ let
|
|||||||
''
|
''
|
||||||
[LightDM]
|
[LightDM]
|
||||||
greeter-user = ${config.users.extraUsers.lightdm.name}
|
greeter-user = ${config.users.extraUsers.lightdm.name}
|
||||||
xgreeters-directory = ${cfg.greeter.package}
|
greeters-directory = ${cfg.greeter.package}
|
||||||
xsessions-directory = ${dmcfg.session.desktops}
|
sessions-directory = ${dmcfg.session.desktops}
|
||||||
|
|
||||||
[SeatDefaults]
|
[SeatDefaults]
|
||||||
xserver-command = ${xserverWrapper}
|
xserver-command = ${xserverWrapper}
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
ver_branch = "1.6";
|
ver_branch = "1.6";
|
||||||
version = "1.5.1"; # 1.5.2 and 1.6.0 result into infinite cycling of X in restarts
|
version = "1.6.1";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lightdm-gtk-greeter-${version}";
|
name = "lightdm-gtk-greeter-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz";
|
||||||
sha256 = "08fnsbnay5jhd7ps8n91i6c227zq6xizpyn34qhqzykrga8pxkpc";
|
sha256 = "1nb8ljrbrp1zga083g3b633xi3izxxm4jipw1qgial1x16mqc0hz";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./lightdm-gtk-greeter.patch ];
|
patches = [ ./lightdm-gtk-greeter.patch ];
|
||||||
patchFlags = "-p0";
|
patchFlags = "-p1";
|
||||||
|
|
||||||
buildInputs = [ pkgconfig lightdm intltool ]
|
buildInputs = [ pkgconfig lightdm intltool ]
|
||||||
++ (if useGTK2 then [ gtk2 makeWrapper ] else [ gtk3 ]);
|
++ (if useGTK2 then [ gtk2 makeWrapper ] else [ gtk3 ]);
|
||||||
@ -39,5 +39,6 @@ stdenv.mkDerivation rec {
|
|||||||
meta = {
|
meta = {
|
||||||
homepage = http://launchpad.net/lightdm-gtk-greeter;
|
homepage = http://launchpad.net/lightdm-gtk-greeter;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.ocharles ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
=== modified file 'src/lightdm-gtk-greeter.c'
|
diff --git a/src/lightdm-gtk-greeter.c b/src/lightdm-gtk-greeter.c
|
||||||
--- src/lightdm-gtk-greeter.c 2013-02-09 23:20:39 +0000
|
index cc5f9e1..d615dc1 100644
|
||||||
+++ src/lightdm-gtk-greeter.c 2013-03-29 12:21:34 +0000
|
--- a/src/lightdm-gtk-greeter.c
|
||||||
@@ -1273,7 +1273,7 @@
|
+++ b/src/lightdm-gtk-greeter.c
|
||||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (session_combo), renderer, TRUE);
|
@@ -1716,7 +1716,7 @@ main (int argc, char **argv)
|
||||||
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (session_combo), renderer, "text", 0);
|
gtk_container_add (GTK_CONTAINER (menuitem), image);
|
||||||
model = gtk_combo_box_get_model (session_combo);
|
gtk_widget_show (GTK_WIDGET (menuitem));
|
||||||
|
|
||||||
- items = lightdm_get_sessions ();
|
- items = lightdm_get_sessions ();
|
||||||
+ items = lightdm_get_sessions (greeter);
|
+ items = lightdm_get_sessions (greeter);
|
||||||
|
GSList *sessions = NULL;
|
||||||
for (item = items; item; item = item->next)
|
for (item = items; item; item = item->next)
|
||||||
{
|
{
|
||||||
LightDMSession *session = item->data;
|
|
||||||
|
|
||||||
|
@ -3,18 +3,18 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
ver_branch = "1.8";
|
ver_branch = "1.8";
|
||||||
version = "1.7.0";
|
version = "1.8.6";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lightdm-${version}";
|
name = "lightdm-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
|
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
|
||||||
sha256 = "0nwwjgc9xvwili6714ag88wsrf0lr5hv1i6z9f0xvin4ym18cbs5";
|
sha256 = "17ivc0c4dbnc0fzd581j53cn6hdav34zz2hswjzy8aczbpk605qi";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./lightdm.patch ];
|
patches = [ ./lightdm.patch ];
|
||||||
patchFlags = "-p0";
|
patchFlags = "-p1";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt
|
pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt
|
||||||
@ -27,5 +27,6 @@ stdenv.mkDerivation rec {
|
|||||||
meta = {
|
meta = {
|
||||||
homepage = http://launchpad.net/lightdm;
|
homepage = http://launchpad.net/lightdm;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.ocharles ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
=== modified file 'liblightdm-gobject/greeter.c'
|
diff --git a/liblightdm-gobject/greeter.c b/liblightdm-gobject/greeter.c
|
||||||
--- liblightdm-gobject/greeter.c 2013-01-31 20:56:09 +0000
|
index 9387118..635cea0 100644
|
||||||
+++ liblightdm-gobject/greeter.c 2013-03-29 14:15:58 +0000
|
--- a/liblightdm-gobject/greeter.c
|
||||||
@@ -567,6 +567,21 @@
|
+++ b/liblightdm-gobject/greeter.c
|
||||||
|
@@ -567,6 +567,21 @@ lightdm_greeter_get_default_session_hint (LightDMGreeter *greeter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,11 +24,11 @@
|
|||||||
* lightdm_greeter_get_hide_users_hint:
|
* lightdm_greeter_get_hide_users_hint:
|
||||||
* @greeter: A #LightDMGreeter
|
* @greeter: A #LightDMGreeter
|
||||||
*
|
*
|
||||||
|
diff --git a/liblightdm-gobject/lightdm/greeter.h b/liblightdm-gobject/lightdm/greeter.h
|
||||||
=== modified file 'liblightdm-gobject/lightdm/greeter.h'
|
index 7d8988f..2b54909 100644
|
||||||
--- liblightdm-gobject/lightdm/greeter.h 2013-01-31 20:56:09 +0000
|
--- a/liblightdm-gobject/lightdm/greeter.h
|
||||||
+++ liblightdm-gobject/lightdm/greeter.h 2013-03-29 11:56:11 +0000
|
+++ b/liblightdm-gobject/lightdm/greeter.h
|
||||||
@@ -93,6 +93,8 @@
|
@@ -93,6 +93,8 @@ gboolean lightdm_greeter_get_select_guest_hint (LightDMGreeter *greeter);
|
||||||
|
|
||||||
const gchar *lightdm_greeter_get_autologin_user_hint (LightDMGreeter *greeter);
|
const gchar *lightdm_greeter_get_autologin_user_hint (LightDMGreeter *greeter);
|
||||||
|
|
||||||
@ -36,19 +37,19 @@
|
|||||||
gboolean lightdm_greeter_get_autologin_guest_hint (LightDMGreeter *greeter);
|
gboolean lightdm_greeter_get_autologin_guest_hint (LightDMGreeter *greeter);
|
||||||
|
|
||||||
gint lightdm_greeter_get_autologin_timeout_hint (LightDMGreeter *greeter);
|
gint lightdm_greeter_get_autologin_timeout_hint (LightDMGreeter *greeter);
|
||||||
|
diff --git a/liblightdm-gobject/lightdm/session.h b/liblightdm-gobject/lightdm/session.h
|
||||||
=== modified file 'liblightdm-gobject/lightdm/session.h'
|
index 13ddcd9..cdb2fd6 100644
|
||||||
--- liblightdm-gobject/lightdm/session.h 2013-01-31 20:56:09 +0000
|
--- a/liblightdm-gobject/lightdm/session.h
|
||||||
+++ liblightdm-gobject/lightdm/session.h 2013-03-29 11:59:16 +0000
|
+++ b/liblightdm-gobject/lightdm/session.h
|
||||||
@@ -12,6 +12,7 @@
|
@@ -12,6 +12,7 @@
|
||||||
#define _LIGHTDM_SESSION_H_
|
#define LIGHTDM_SESSION_H_
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
+#include "greeter.h"
|
+#include "greeter.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -42,9 +43,9 @@
|
@@ -42,9 +43,9 @@ typedef struct
|
||||||
|
|
||||||
GType lightdm_session_get_type (void);
|
GType lightdm_session_get_type (void);
|
||||||
|
|
||||||
@ -60,10 +61,10 @@
|
|||||||
|
|
||||||
const gchar *lightdm_session_get_key (LightDMSession *session);
|
const gchar *lightdm_session_get_key (LightDMSession *session);
|
||||||
|
|
||||||
|
diff --git a/liblightdm-gobject/session.c b/liblightdm-gobject/session.c
|
||||||
=== modified file 'liblightdm-gobject/session.c'
|
index 949778f..db5e18a 100644
|
||||||
--- liblightdm-gobject/session.c 2013-01-31 20:56:09 +0000
|
--- a/liblightdm-gobject/session.c
|
||||||
+++ liblightdm-gobject/session.c 2013-03-29 14:16:48 +0000
|
+++ b/liblightdm-gobject/session.c
|
||||||
@@ -11,6 +11,7 @@
|
@@ -11,6 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gio/gdesktopappinfo.h>
|
#include <gio/gdesktopappinfo.h>
|
||||||
@ -72,7 +73,7 @@
|
|||||||
#include "lightdm/session.h"
|
#include "lightdm/session.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -167,7 +168,7 @@
|
@@ -189,7 +190,7 @@ load_sessions (const gchar *sessions_dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -81,18 +82,17 @@
|
|||||||
{
|
{
|
||||||
GKeyFile *config_key_file = NULL;
|
GKeyFile *config_key_file = NULL;
|
||||||
gchar *config_path = NULL;
|
gchar *config_path = NULL;
|
||||||
@@ -183,8 +184,8 @@
|
@@ -205,8 +206,7 @@ update_sessions (void)
|
||||||
remote_sessions_dir = g_strdup (REMOTE_SESSIONS_DIR);
|
remote_sessions_dir = g_strdup (REMOTE_SESSIONS_DIR);
|
||||||
|
|
||||||
/* Use session directory from configuration */
|
/* Use session directory from configuration */
|
||||||
- /* FIXME: This should be sent in the greeter connection */
|
- /* FIXME: This should be sent in the greeter connection */
|
||||||
- config_path = g_build_filename (CONFIG_DIR, "lightdm.conf", NULL);
|
- config_path = g_build_filename (CONFIG_DIR, "lightdm.conf", NULL);
|
||||||
+ config_path = g_strdup (lightdm_greeter_get_config_path (greeter));
|
+ config_path = g_strdup (lightdm_greeter_get_config_path (greeter));
|
||||||
+
|
|
||||||
config_key_file = g_key_file_new ();
|
config_key_file = g_key_file_new ();
|
||||||
result = g_key_file_load_from_file (config_key_file, config_path, G_KEY_FILE_NONE, &error);
|
result = g_key_file_load_from_file (config_key_file, config_path, G_KEY_FILE_NONE, &error);
|
||||||
if (error)
|
if (error && !g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
|
||||||
@@ -228,9 +229,9 @@
|
@@ -250,9 +250,9 @@ update_sessions (void)
|
||||||
* Return value: (element-type LightDMSession) (transfer none): A list of #LightDMSession
|
* Return value: (element-type LightDMSession) (transfer none): A list of #LightDMSession
|
||||||
**/
|
**/
|
||||||
GList *
|
GList *
|
||||||
@ -104,7 +104,7 @@
|
|||||||
return local_sessions;
|
return local_sessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,9 +243,9 @@
|
@@ -264,9 +264,9 @@ lightdm_get_sessions (void)
|
||||||
* Return value: (element-type LightDMSession) (transfer none): A list of #LightDMSession
|
* Return value: (element-type LightDMSession) (transfer none): A list of #LightDMSession
|
||||||
**/
|
**/
|
||||||
GList *
|
GList *
|
||||||
@ -116,78 +116,29 @@
|
|||||||
return remote_sessions;
|
return remote_sessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/lightdm.c b/src/lightdm.c
|
||||||
=== modified file 'src/display.c'
|
index 7d35034..910164c 100644
|
||||||
--- src/display.c 2013-03-26 22:22:49 +0000
|
--- a/src/lightdm.c
|
||||||
+++ src/display.c 2013-03-29 12:12:43 +0000
|
+++ b/src/lightdm.c
|
||||||
@@ -62,6 +62,9 @@
|
@@ -1142,6 +1142,9 @@ main (int argc, char **argv)
|
||||||
/* Program to run sessions through */
|
|
||||||
gchar *session_wrapper;
|
|
||||||
|
|
||||||
+ /* Path to the configuration file that lightdm is running under */
|
|
||||||
+ gchar *config_path;
|
|
||||||
+
|
|
||||||
/* TRUE if in a user session */
|
|
||||||
gboolean in_user_session;
|
|
||||||
|
|
||||||
@@ -213,6 +216,14 @@
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void
|
g_clear_error (&error);
|
||||||
+display_set_config_path (Display *display, const gchar *config_path)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (display != NULL);
|
|
||||||
+ g_free (display->priv->config_path);
|
|
||||||
+ display->priv->config_path = g_strdup (config_path);
|
|
||||||
+}
|
|
||||||
+
|
+
|
||||||
+void
|
+ config_set_string (config_get_instance (), "SeatDefaults", "config-path", config_path);
|
||||||
display_set_show_remote_login_hint (Display *display, gboolean show_remote_login)
|
|
||||||
{
|
|
||||||
g_return_if_fail (display != NULL);
|
|
||||||
@@ -436,6 +447,7 @@
|
|
||||||
greeter_set_hint (display->priv->greeter, "show-remote-login", display->priv->greeter_show_remote_login ? "true" : "false");
|
|
||||||
if (display->priv->greeter_is_lock)
|
|
||||||
greeter_set_hint (display->priv->greeter, "lock-screen", "true");
|
|
||||||
+ greeter_set_hint (display->priv->greeter, "config-path", display->priv->config_path);
|
|
||||||
|
|
||||||
/* Run greeter as unprivileged user */
|
|
||||||
if (getuid () != 0)
|
|
||||||
|
|
||||||
=== modified file 'src/display.h'
|
|
||||||
--- src/display.h 2013-03-26 22:22:49 +0000
|
|
||||||
+++ src/display.h 2013-03-29 12:12:37 +0000
|
|
||||||
@@ -80,6 +80,8 @@
|
|
||||||
|
|
||||||
void display_set_user_session (Display *display, SessionType type, const gchar *session_name);
|
|
||||||
|
|
||||||
+void display_set_config_path (Display *display, const gchar *config_path);
|
|
||||||
+
|
+
|
||||||
gboolean display_start (Display *display);
|
|
||||||
|
|
||||||
gboolean display_get_is_ready (Display *display);
|
|
||||||
|
|
||||||
=== modified file 'src/lightdm.c'
|
|
||||||
--- src/lightdm.c 2013-03-07 21:40:31 +0000
|
|
||||||
+++ src/lightdm.c 2013-03-29 11:48:45 +0000
|
|
||||||
@@ -1050,6 +1050,7 @@
|
|
||||||
g_debug ("Starting Light Display Manager %s, UID=%i PID=%i", VERSION, getuid (), getpid ());
|
|
||||||
|
|
||||||
g_debug ("Loaded configuration from %s", config_path);
|
|
||||||
+ config_set_string (config_get_instance (), "LightDM", "config-path", config_path);
|
|
||||||
g_free (config_path);
|
g_free (config_path);
|
||||||
|
|
||||||
g_debug ("Using D-Bus name %s", LIGHTDM_BUS_NAME);
|
/* Set default values */
|
||||||
|
diff --git a/src/seat.c b/src/seat.c
|
||||||
|
index e2b9c2c..a950ea2 100644
|
||||||
|
--- a/src/seat.c
|
||||||
|
+++ b/src/seat.c
|
||||||
|
@@ -1137,6 +1137,7 @@ create_greeter_session (Seat *seat)
|
||||||
|
greeter_set_hint (greeter_session, "show-manual-login", seat_get_boolean_property (seat, "greeter-show-manual-login") ? "true" : "false");
|
||||||
|
greeter_set_hint (greeter_session, "show-remote-login", seat_get_boolean_property (seat, "greeter-show-remote-login") ? "true" : "false");
|
||||||
|
greeter_set_hint (greeter_session, "has-guest-account", seat_get_allow_guest (seat) && seat_get_boolean_property (seat, "greeter-allow-guest") ? "true" : "false");
|
||||||
|
+ greeter_set_hint (greeter_session, "config-path", seat_get_string_property (seat, "config-path"));
|
||||||
|
|
||||||
=== modified file 'src/seat.c'
|
g_object_unref (session_config);
|
||||||
--- src/seat.c 2013-03-26 22:22:49 +0000
|
|
||||||
+++ src/seat.c 2013-03-29 12:13:00 +0000
|
|
||||||
@@ -536,6 +536,7 @@
|
|
||||||
if (!session_name)
|
|
||||||
session_name = seat_get_string_property (seat, "user-session");
|
|
||||||
display_set_user_session (display, SESSION_TYPE_LOCAL, session_name);
|
|
||||||
+ display_set_config_path (display, config_get_string (config_get_instance (), "LightDM", "config-path"));
|
|
||||||
|
|
||||||
seat->priv->displays = g_list_append (seat->priv->displays, display);
|
|
||||||
g_signal_emit (seat, signals[DISPLAY_ADDED], 0, display);
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user