summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-04-27 01:06:07 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-04-27 01:06:07 +0000
commit425ce74b5ddfe183ec538642f3f07630bd4dd121 (patch)
tree944fb6064640c0faf2295fb1a86daab65b8c741b /gui
parent9f7de058ddaf05ee03e6c85d9fa70f4434d66503 (diff)
downloadgdm-425ce74b5ddfe183ec538642f3f07630bd4dd121.tar.gz
Adding per-display configuration support to GDM. Now if user has a file
2006-04-26 Brian Cameron <brian.cameron@sun.com> Adding per-display configuration support to GDM. Now if user has a file named /etc/gdm/custom.conf:<displaynum>, the settings in this file will override the /usr/share/gdm/defaults.conf and /etc/X11/gdm/custom.conf settings. Only keys that affect the GUI behavior are supported. These include those in the "gui" and "greeter" sections and the security/PamStack key. * daemon/gdm.c: Update GET_CONFIG command so it accepts a display argument. It is backwards compatible and will return the per-display setting if this is passed in, or the non-display value if not passed in. Fix bug that caused PreFetch key to not just return the once as it is supposed to. * daemon/gdmconfig.[ch], jui/gdmconfig.c: Updated to support per-display configuration. * daemon/gdm.h: Updated documentation for new command. Corrected some errors. * daemon/verify-pam.c, daemon/gdmconfig.c config/gdm.conf.in: Add security/PamStack configuration variable as a per-display setting. This allows the sysadmin to specify a different PAM stack, if desired and also allows customization per display. Also added key info for some BackgroundProgram keys that were missing. * config/PreSession.in: now requests configuration data per-display. Will use normal configuration if no per-display config files. * gui/.cvsignore: Add gdmsetup.desktop.in * gui/gdmdynamic.: Improve usage warning. * gui/gdmlogin.c: Add some debug * docs/C/gdm.xml: Updated docs to reflect new per-display config.
Diffstat (limited to 'gui')
-rw-r--r--gui/.cvsignore1
-rw-r--r--gui/gdmconfig.c12
-rw-r--r--gui/gdmdynamic.c13
-rw-r--r--gui/gdmlogin.c3
4 files changed, 26 insertions, 3 deletions
diff --git a/gui/.cvsignore b/gui/.cvsignore
index 88a16774..91980f1e 100644
--- a/gui/.cvsignore
+++ b/gui/.cvsignore
@@ -13,6 +13,7 @@ gdmconfig
gdmconfig.desktop
gdmsetup
gdmsetup.desktop
+gdmsetup.desktop.in
gdmphotosetup.desktop
gdmflexiserver.desktop
gdmflexiserver-xnest.desktop
diff --git a/gui/gdmconfig.c b/gui/gdmconfig.c
index 3071e801..4966501f 100644
--- a/gui/gdmconfig.c
+++ b/gui/gdmconfig.c
@@ -126,15 +126,21 @@ gdm_config_get_result (gchar *key)
gchar *newkey = g_strdup (key);
gchar *command = NULL;
gchar *result = NULL;
+ static char *display = NULL;
g_strstrip (newkey);
p = strchr (newkey, '=');
if (p != NULL)
*p = '\0';
- command = g_strdup_printf ("GET_CONFIG %s", newkey);
- result = gdmcomm_call_gdm (command, NULL /* auth cookie */,
- "2.13.0.1", comm_tries);
+ display = g_strdup (g_getenv ("DISPLAY"));
+ if (display == NULL)
+ command = g_strdup_printf ("GET_CONFIG %s", newkey);
+ else
+ command = g_strdup_printf ("GET_CONFIG %s %s", newkey, display);
+
+ result = gdmcomm_call_gdm (command, NULL /* auth cookie */,
+ "2.13.0.1", comm_tries);
g_free (command);
g_free (newkey);
diff --git a/gui/gdmdynamic.c b/gui/gdmdynamic.c
index 9b09f722..7d71b83c 100644
--- a/gui/gdmdynamic.c
+++ b/gui/gdmdynamic.c
@@ -85,11 +85,20 @@ main (int argc, char *argv[])
argv[0] = myname;
version = "2.8.0.0";
+ g_type_init ();
+
+ /*
+ * It's an error to use more than one of -a, -r, or -d, so turn
+ * error to FALSE if command is not set, and TRUE if command is
+ * not NULL.
+ */
while ((optc = getopt (argc, argv, "a:d:r:t:s:blv")) != EOF) {
switch (optc) {
case 'a':
if (command == NULL)
error = FALSE;
+ else
+ error = TRUE;
command = GDM_SUP_ADD_DYNAMIC_DISPLAY;
params = optarg;
break;
@@ -101,6 +110,8 @@ main (int argc, char *argv[])
case 'd':
if (command == NULL)
error = FALSE;
+ else
+ error = TRUE;
command = GDM_SUP_REMOVE_DYNAMIC_DISPLAY;
params = optarg;
break;
@@ -108,6 +119,8 @@ main (int argc, char *argv[])
case 'l':
if (command == NULL)
error = FALSE;
+ else
+ error = TRUE;
command = GDM_SUP_ATTACHED_SERVERS;
break;
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index 39395131..5b1ad96d 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -330,6 +330,8 @@ back_prog_run (void)
command = back_prog_get_path ();
if (! command)
return;
+
+ gdm_common_debug ("Running background program <%s>", command);
/* Focus new windows. We want to give focus to the background program. */
gdm_wm_focus_new_windows (TRUE);
@@ -349,6 +351,7 @@ back_prog_run (void)
GtkWidget *dialog;
gchar *msg;
+ gdm_common_debug ("Cannot run background program %s : %s", command, error->message);
msg = g_strdup_printf (_("Cannot run command '%s': %s."),
command,
error->message);