[gdm] daemon: use gnome-session session files instead of autostart
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: use gnome-session session files instead of autostart
- Date: Mon, 20 Jun 2011 18:59:28 +0000 (UTC)
commit 48705abd751e6e2f1d20b51098e1b97d74855338
Author: Ray Strode <rstrode redhat com>
Date: Mon Jun 20 13:21:35 2011 -0400
daemon: use gnome-session session files instead of autostart
Before we were doing some sort of weird hybrid thing with
a session file and an autostart directory that wasn't that
much different than just having an autostart directory by
itself.
Now we fully define the session component list from the session
file, and merely provide a pool of new candidate desktop files to
select that sessoin from.
This modernizes how we use gnome-session and as a side-effect
enables us the ability to have fallback sessions (which will
be important when defaulting to a shell based greeter later).
configure.ac | 3 +-
daemon/gdm-greeter-session.c | 2 +-
daemon/gdm-welcome-session.c | 13 ++++-
data/Makefile.am | 9 +---
data/applications/Makefile.am | 38 +++++++++++++++
.../gdm-simple-greeter.desktop.in.in | 1 +
.../gnome-mag.desktop.in | 1 -
.../gok.desktop.in | 1 -
data/{ => applications}/mime-dummy-handler.desktop | 0
data/{ => applications}/mimeapps.list | 0
data/gdm.session | 2 +-
data/greeter-autostart/Makefile.am | 51 --------------------
.../at-spi-registryd-wrapper.desktop.in.in | 8 ---
.../gnome-power-manager.desktop.in.in | 14 -----
.../gnome-session-check-accelerated.desktop.in.in | 6 --
.../gnome-settings-daemon.desktop.in.in | 9 ----
data/greeter-autostart/metacity.desktop.in | 19 -------
.../orca-screen-reader.desktop.in | 16 ------
...lkit-gnome-authentication-agent-1.desktop.in.in | 5 --
19 files changed, 54 insertions(+), 144 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7888780..394d175 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1439,8 +1439,7 @@ gui/simple-chooser/Makefile
utils/Makefile
data/gdm.conf
data/Makefile
-data/greeter-autostart/Makefile
-data/greeter-autostart/at-spi-registryd-wrapper.desktop.in
+data/applications/Makefile
data/pixmaps/Makefile
data/pixmaps/16x16/Makefile
data/pixmaps/32x32/Makefile
diff --git a/daemon/gdm-greeter-session.c b/daemon/gdm-greeter-session.c
index 39f1528..d0b1b94 100644
--- a/daemon/gdm-greeter-session.c
+++ b/daemon/gdm-greeter-session.c
@@ -78,7 +78,7 @@ gdm_greeter_session_new (const char *display_name,
GObject *object;
object = g_object_new (GDM_TYPE_GREETER_SESSION,
- "command", BINDIR "/gnome-session --session gdm --autostart="DATADIR"/gdm/autostart/LoginWindow/",
+ "command", BINDIR "/gnome-session --session gdm",
"server-dbus-path", GDM_GREETER_SERVER_DBUS_PATH,
"server-dbus-interface", GDM_GREETER_SERVER_DBUS_INTERFACE,
"server-env-var-name", "GDM_GREETER_DBUS_ADDRESS",
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
index d1990c9..04b3d07 100644
--- a/daemon/gdm-welcome-session.c
+++ b/daemon/gdm-welcome-session.c
@@ -357,6 +357,7 @@ get_welcome_environment (GdmWelcomeSession *welcome_session,
"LC_IDENTIFICATION", "LC_ALL", "WINDOWPATH",
NULL
};
+ char *system_data_dirs;
int i;
load_lang_config_file (LANG_CONFIG_FILE,
@@ -376,6 +377,15 @@ get_welcome_environment (GdmWelcomeSession *welcome_session,
g_strdup (g_getenv (optional_environment[i])));
}
+ system_data_dirs = g_strjoinv (":", (char **) g_get_system_data_dirs ());
+
+ g_hash_table_insert (hash,
+ g_strdup ("XDG_DATA_DIRS"),
+ g_strdup_printf ("%s:%s",
+ DATADIR "/gdm/greeter",
+ system_data_dirs));
+ g_free (system_data_dirs);
+
if (welcome_session->priv->dbus_bus_address != NULL) {
g_hash_table_insert (hash,
g_strdup ("DBUS_SESSION_BUS_ADDRESS"),
@@ -383,8 +393,7 @@ get_welcome_environment (GdmWelcomeSession *welcome_session,
}
if (welcome_session->priv->server_address != NULL) {
g_assert (welcome_session->priv->server_env_var_name != NULL);
- g_hash_table_insert (hash,
- g_strdup (welcome_session->priv->server_env_var_name),
+ g_hash_table_insert (hash, g_strdup (welcome_session->priv->server_env_var_name),
g_strdup (welcome_session->priv->server_address));
}
diff --git a/data/Makefile.am b/data/Makefile.am
index d563288..67c97b4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,7 +1,7 @@
NULL =
SUBDIRS = \
- greeter-autostart \
+ applications \
pixmaps \
$(NULL)
@@ -98,8 +98,6 @@ EXTRA_DIST = \
session-setup.entries \
make-dconf-override-db.sh \
dconf-profile \
- mime-dummy-handler.desktop \
- mimeapps.list \
$(NULL)
CLEANFILES = \
@@ -139,8 +137,6 @@ uninstall-hook:
$(DESTDIR)$(PAM_PREFIX)/pam.d/gdm \
$(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-autologin \
$(DESTDIR)$(workingdir)/.gconf.path \
- $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop \
- $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list \
$(DESTDIR)$(sysconfdir)/dconf/db/gdm \
$(DESTDIR)$(sysconfdir)/dconf/profile/gdm \
-rf \
@@ -284,6 +280,3 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
$(INSTALL_DATA) $(srcdir)/dconf-override-db $(DESTDIR)$(sysconfdir)/dconf/db/gdm
$(INSTALL_DATA) $(srcdir)/dconf-profile $(DESTDIR)$(sysconfdir)/dconf/profile/gdm
-
- $(INSTALL_DATA) $(srcdir)/mime-dummy-handler.desktop $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop
- $(INSTALL_DATA) $(srcdir)/mimeapps.list $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list
diff --git a/data/applications/Makefile.am b/data/applications/Makefile.am
new file mode 100644
index 0000000..cdaf80a
--- /dev/null
+++ b/data/applications/Makefile.am
@@ -0,0 +1,38 @@
+NULL =
+
+edit = sed \
+ -e 's|@SBINDIR[ ]|$(sbindir)|g' \
+ -e 's|@SYSCONFDIR[ ]|$(sysconfdir)|g' \
+ -e 's|@LIBDIR[ ]|$(libdir)|g' \
+ -e 's|@LIBEXECDIR[ ]|$(libexecdir)|g' \
+ -e 's|@LOCALSTATEDIR[ ]|$(localstatedir)|g'
+
+%.desktop.in: %.desktop.in.in Makefile
+ $(edit) $< >$@
+
+ INTLTOOL_DESKTOP_RULE@
+desktopdir = $(pkgdatadir)/greeter/applications
+desktop_in_files = \
+ gdm-simple-greeter.desktop.in \
+ gnome-mag.desktop.in \
+ gok.desktop.in \
+ orca-screen-reader.desktop.in \
+ $(NULL)
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) \
+ mime-dummy-handler.desktop \
+ mimeapps.list \
+ $(NULL)
+
+EXTRA_DIST = \
+ gdm-simple-greeter.desktop.in.in \
+ $(desktop_in_files) \
+ $(NULL)
+
+DISTCLEANFILES = \
+ $(desktop_DATA) \
+ gdm-simple-greeter.desktop.in \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in
diff --git a/data/greeter-autostart/gdm-simple-greeter.desktop.in.in b/data/applications/gdm-simple-greeter.desktop.in.in
similarity index 92%
rename from data/greeter-autostart/gdm-simple-greeter.desktop.in.in
rename to data/applications/gdm-simple-greeter.desktop.in.in
index e33a5ba..e6b1dbf 100644
--- a/data/greeter-autostart/gdm-simple-greeter.desktop.in.in
+++ b/data/applications/gdm-simple-greeter.desktop.in.in
@@ -6,3 +6,4 @@ OnlyShowIn=GNOME;
X-GNOME-Autostart-Phase=Application
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true
+NoDisplay=true
diff --git a/data/greeter-autostart/gnome-mag.desktop.in b/data/applications/gnome-mag.desktop.in
similarity index 99%
rename from data/greeter-autostart/gnome-mag.desktop.in
rename to data/applications/gnome-mag.desktop.in
index bbf7adc..6bb5c0f 100644
--- a/data/greeter-autostart/gnome-mag.desktop.in
+++ b/data/applications/gnome-mag.desktop.in
@@ -12,4 +12,3 @@ X-GNOME-Provides=screen-magnifier
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-mag
X-GNOME-Bugzilla-Component=general
-
diff --git a/data/greeter-autostart/gok.desktop.in b/data/applications/gok.desktop.in
similarity index 99%
rename from data/greeter-autostart/gok.desktop.in
rename to data/applications/gok.desktop.in
index 04888e2..61063f7 100644
--- a/data/greeter-autostart/gok.desktop.in
+++ b/data/applications/gok.desktop.in
@@ -12,4 +12,3 @@ X-GNOME-Provides=screen-keyboard
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gok
X-GNOME-Bugzilla-Component=general
-
diff --git a/data/mime-dummy-handler.desktop b/data/applications/mime-dummy-handler.desktop
similarity index 100%
rename from data/mime-dummy-handler.desktop
rename to data/applications/mime-dummy-handler.desktop
diff --git a/data/mimeapps.list b/data/applications/mimeapps.list
similarity index 100%
rename from data/mimeapps.list
rename to data/applications/mimeapps.list
diff --git a/data/gdm.session b/data/gdm.session
index 2a74640..1f0da4d 100644
--- a/data/gdm.session
+++ b/data/gdm.session
@@ -1,5 +1,5 @@
[GNOME Session]
Name=Display Manager
-RequiredComponents=gdm-simple-greeter;gnome-settings-daemon;polkit-gnome-authentication-agent-1;
+RequiredComponents=gdm-simple-greeter;gnome-settings-daemon;
RequiredProviders=windowmanager;
DefaultProvider-windowmanager=metacity
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]