! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
modernize GNOME compatibility in xfce4-session
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Guido Berhoerster 2011-10-04 11:16:44 CEST
GNOME compatibility mode in xfce4-session should be modernized. The following is a summary of the recent discussion on the xfce4-dev list (the complete thread is available at http://thread.gmane.org/gmane.comp.desktop.xfce.devel.version4/19646):

What GNOME compatibility mode currently does is:

1. unconditionally start all XDG autostart files with OnlyShowIn=GNOME;
2. start all gnome-keyring components, parse the output and set the environment
   of the session accordingly
3. set the GNOME_SM_PROXY property (apparently used by ancient OOo to detect a
   GTK environment)
4. issues "gconftool-2 --shutdown" at the end of the session

So 1. does not work for GNOME services that rely on autostart phases and does
some rather harmful things such as starting gnome-settings-daemon or
gnome-power-manager which interfere with Xfce components. 3. seems unnecessary
for recent OOo and LibreOffice, 4. is redundant as well, gconfd is started by
many GNOME applications regardless of GNOME compat mode and handles signals
fine.

So currently GNOME compatibility mode seems to be redundant with the exception
of the gnome-keyring startup and does more harm than good.  An explicit GNOME
compatibility mode appears to be unnecessary nowadays, rather it would be
useful to provide some compatibility with GNOME by supporting its autostart
phases and parts of the org.gnome.SessionManager DBus interface which would
also allow the removal of the explicit gnome-keyring startup code.  Brian noted
that this should be initially implemented by *minimally* supporting
X-GNOME-Autostart-Phase (just "Initialization" only for now), and adding the
env var-related DBus APIs to xfce4-session.

XFSM already has the notion of priority groups (via the old GsmPriority SM
property), so it might be as simple as digging in autostart, finding
Initialization-phase apps, and sticking those in a higher prio group than
anything else.  Adding the dbus interfaces should be pretty trivial.

Furthermore autostart files with OnlyShowIn=GNOME should not be started
unconditionally. We could treat OnlyShowIn not including Xfce similarly as we
do Hidden=true, and that would just allow them to be disabled by default but
re-enable-able by the user via autostart settings.
Comment 1 Guido Berhoerster 2011-10-08 19:18:06 CEST
Created attachment 3890 
GNOME compatibility modernization

The attached patch contains a first part for a mondernization of GNOME compatibility. GNOME compatibility mode now only controls whether the gnome-keyring startup code is active or not, the obsolete GNOME SMProxy and GConf shutdown code has been removed. It further implements the behavior of autstart files as discussed above, files which have either "GNOME" or "KDE" but not Xfce in "OnlyStartIn" will be treated the same way as files which have "Hidden" set to "true", explicitly activating them in the xfce4-session-settings will add "Xfce" to "OnlyShowIn" and set "Hidden" to "false".
Comment 2 Guido Berhoerster 2011-11-13 19:14:29 CET
Created attachment 3953 
GNOME compatibility modernization (part 1)

new version which fixes a NULL pointer dereference on invalid autostart files
Comment 3 Nick Schermer editbugs 2012-03-25 13:41:31 CEST
Pushed something like this to nick/autostart, could you check it?
Comment 4 Guido Berhoerster 2012-03-25 22:24:38 CEST
(In reply to comment #3)
> Pushed something like this to nick/autostart, could you check it?

The implementation looks good, I tested it briefly and it works fine. Thanks a lot for looking into this.
Comment 5 Nick Schermer editbugs 2012-03-26 13:17:40 CEST
Ok will merge it in master this evening.

Bug #8014

Reported by:
Guido Berhoerster
Reported on: 2011-10-04
Last modified on: 2012-03-26

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
3 users

Version

Version:
Unspecified

Attachments

GNOME compatibility modernization (7.90 KB, patch)
2011-10-08 19:18 CEST , Guido Berhoerster
no flags
GNOME compatibility modernization (part 1) (7.48 KB, patch)
2011-11-13 19:14 CET , Guido Berhoerster
no flags

Additional information