Commit 48705abd authored by Ray Strode's avatar Ray Strode

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).
parent 9dc32886
......@@ -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
......
......@@ -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",
......
......@@ -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));
}
......
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
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
......@@ -6,3 +6,4 @@ OnlyShowIn=GNOME;
X-GNOME-Autostart-Phase=Application
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true
NoDisplay=true
......@@ -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
......@@ -12,4 +12,3 @@ X-GNOME-Provides=screen-keyboard
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gok
X-GNOME-Bugzilla-Component=general
[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
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)/autostart/LoginWindow
desktop_in_files = \
at-spi-registryd-wrapper.desktop.in \
gdm-simple-greeter.desktop.in \
gnome-mag.desktop.in \
gnome-power-manager.desktop.in \
gnome-settings-daemon.desktop.in \
gok.desktop.in \
metacity.desktop.in \
orca-screen-reader.desktop.in \
polkit-gnome-authentication-agent-1.desktop.in \
gnome-session-check-accelerated.desktop.in \
$(NULL)
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
EXTRA_DIST = \
at-spi-registryd-wrapper.desktop.in.in \
gdm-simple-greeter.desktop.in.in \
gnome-power-manager.desktop.in.in \
gnome-settings-daemon.desktop.in.in \
polkit-gnome-authentication-agent-1.desktop.in.in \
gnome-session-check-accelerated.desktop.in.in \
$(desktop_in_files) \
$(NULL)
DISTCLEANFILES = \
*.desktop \
at-spi-registryd-wrapper.desktop.in \
gdm-simple-greeter.desktop.in \
gnome-power-manager.desktop.in \
gnome-settings-daemon.desktop.in \
polkit-gnome-authentication-agent-1.desktop.in \
gnome-session-check-accelerated.desktop.in \
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
[Desktop Entry]
Type=Application
_Name=AT-SPI Registry Wrapper
Exec=@AT_SPI_REGISTRYD_DIR@/at-spi-registryd
OnlyShowIn=GNOME;
AutostartCondition=GNOME /desktop/gnome/interface/accessibility
X-GNOME-Autostart-Phase=Initialization
X-GNOME-AutoRestart=true
[Desktop Entry]
_Name=Power Manager
_Comment=Power management daemon
Icon=gnome-power-manager
Exec=gnome-power-manager
Terminal=false
Type=Application
Categories=
OnlyShowIn=GNOME;XFCE;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-power-manager
X-GNOME-Bugzilla-Component=gnome-power-manager
X-GNOME-Bugzilla-Version=@VERSION@
X-GNOME-Bugzilla-ExtraInfoScript=gnome-power-bugreport.sh
[Desktop Entry]
Type=Application
_Name=GNOME Session Acceleration Checker
TryExec=@LIBEXECDIR@/gnome-session-check-accelerated
Exec=@LIBEXECDIR@/gnome-session-check-accelerated
X-GNOME-Autostart-Phase=Application
[Desktop Entry]
Type=Application
_Name=GNOME Settings Daemon
TryExec=@LIBEXECDIR@/gnome-settings-daemon
Exec=@LIBEXECDIR@/gnome-settings-daemon
OnlyShowIn=GNOME;
X-GNOME-Autostart-Phase=Initialization
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true
[Desktop Entry]
Type=Application
_Name=Metacity
Exec=metacity
# name of loadable control center module
X-GNOME-WMSettingsModule=metacity
# name we put on the WM spec check window
X-GNOME-WMName=Metacity
# back compat only
X-GnomeWMSettingsLibrary=metacity
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=metacity
X-GNOME-Bugzilla-Component=general
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=true
[Window Manager]
SessionManaged=true
[Desktop Entry]
_Name=Orca Screen Reader
_Comment=Present on-screen information as speech or braille
TryExec=orca
Exec=orca --no-setup --disable main-window --disable splash-window --disable magnifier --enable speech --enable braille
Icon=orca
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Accessibility;
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_reader_enabled
X-GNOME-Provides=screen-reader
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=orca
X-GNOME-Bugzilla-Component=general
[Desktop Entry]
Type=Application
_Name=PolicyKit Authentication Agent
Exec=@LIBEXECDIR@/polkit-gnome-authentication-agent-1
OnlyShowIn=GNOME;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment