summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-05-14 03:30:47 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-05-14 03:30:47 +0000
commit44370054e3f53004fa6ca244380fe46950dcb2c3 (patch)
tree6990882bc197cb441dfcdb0ebb87e5fb5bb4a621
parent642d31d17c8327abf9aa09dd9c82f0c3e6aeca57 (diff)
downloadgdm-44370054e3f53004fa6ca244380fe46950dcb2c3.tar.gz
Now install GDM desktop files to /usr/share/gdm/applications and append
2007-05-14 Brian Cameron <brian.cameron@sun.com> * daemon/slave.c, gui/Makefile.am: Now install GDM desktop files to /usr/share/gdm/applications and append this directory to XDG_DATA_DIR before starting the user session, so that these desktop files are only visible if using the GDM program as the display manager. This will ensure these menu options do not appear when using other display managers such as KDM or CDE login. Fixes bug #434813. svn path=/trunk/; revision=4923
-rw-r--r--ChangeLog10
-rw-r--r--daemon/slave.c23
-rw-r--r--gui/Makefile.am11
3 files changed, 38 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 462f45d9..ebbc26ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2007-05-14 Brian Cameron <brian.cameron@sun.com>
+ * daemon/slave.c, gui/Makefile.am: Now install GDM desktop files
+ to /usr/share/gdm/applications and append this directory to
+ XDG_DATA_DIR before starting the user session, so that these
+ desktop files are only visible if using the GDM program as the
+ display manager. This will ensure these menu options do not
+ appear when using other display managers such as KDM or CDE
+ login. Fixes bug #434813.
+
+2007-05-14 Brian Cameron <brian.cameron@sun.com>
+
* Release 2.19.1:
* NEWS: Updated.
* docs/C/gdm.xml: Updated to say release 2.19.1.
diff --git a/daemon/slave.c b/daemon/slave.c
index b1d5a9d5..7734dc39 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -3592,6 +3592,29 @@ session_child_run (struct passwd *pwent,
else
g_setenv ("PATH", gdm_daemon_config_get_value_string (GDM_KEY_PATH), TRUE);
+ /*
+ * Install GDM desktop files to a non-default desktop file
+ * location (/usr/share/gdm/applications) and GDM appends
+ * this directory to the end of the XDG_DATA_DIR environment
+ * variable. This way, GDM menu choices never appear if
+ * using a different display manager.
+ */
+ {
+ const char *old_system_data_dirs;
+ char *new_system_data_dirs;
+
+ old_system_data_dirs = g_getenv ("XDG_DATA_DIRS") ?
+ g_getenv ("XDG_DATA_DIRS") :
+ "/usr/local/share/:/usr/share/";
+
+ new_system_data_dirs = g_build_path (":",
+ old_system_data_dirs, DATADIR "/gdm/", NULL);
+
+ g_setenv ("XDG_DATA_DIRS", new_system_data_dirs, TRUE);
+
+ g_free (new_system_data_dirs);
+ }
+
/* Eeeeek, this no lookie as a correct language code,
* just use the system default */
if G_UNLIKELY ( ! ve_string_empty (language) &&
diff --git a/gui/Makefile.am b/gui/Makefile.am
index bcc1b405..0d2a1e39 100644
--- a/gui/Makefile.am
+++ b/gui/Makefile.am
@@ -212,17 +212,17 @@ gdmdynamic_LDADD = \
-lXau \
$(NULL)
-Settingsdir = $(datadir)/applications
+Settingsdir = $(datadir)/gdm/applications
Settings_files = gdmphotosetup.desktop
Settings_in_files = gdmphotosetup.desktop.in
-Settings_DATA = $(Settings_in_files:.desktop.in=.desktop)
+Settings_DATA = $(Settings_files)
-Systemdir = $(datadir)/applications
+Systemdir = $(datadir)/gdm/applications
System_files = \
gdmsetup.desktop \
gdmflexiserver.desktop \
gdmflexiserver-xnest.desktop
-System_dist_files = \
+System_in_files = \
gdmsetup.desktop.in.in \
gdmflexiserver.desktop.in \
gdmflexiserver-xnest.desktop.in.in
@@ -252,9 +252,8 @@ EXTRA_DIST = \
$(Glade_DATA) \
$(Icons_DATA) \
$(System_DATA) \
- $(System_dist_files) \
+ $(System_in_files) \
$(Settings_DATA) \
- $(Settings_files) \
$(Settings_in_files)
clean-local: