Unable to change the default session for GDM

Bug #403291 reported by Mario Limonciello
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Fix Released
Undecided
Unassigned
gdm
Expired
Wishlist
gdm (Ubuntu)
Fix Released
Medium
Martin Pitt
Karmic
Fix Released
High
Martin Pitt
mythbuntu-default-settings (Ubuntu)
Fix Released
Undecided
Mario Limonciello
Karmic
Fix Released
Undecided
Mario Limonciello
xubuntu-default-settings (Ubuntu)
Fix Released
High
Lionel Le Folgoc
Karmic
Fix Released
High
Lionel Le Folgoc

Bug Description

ISO: Mythbuntu 2009-07-22.2

The session boots up into a gnome session. This is caused by bug 403289. Once all the gnome is cleaned up from the environment, the ISO still boots into the Xfce4 session instead.

The setting for "Mythbuntu" to be the default in gdm-cdd.conf has no effect.

Tags: iso-testing
Revision history for this message
Martin Pitt (pitti) wrote :

I checked gdm's session behaviour. If the user does not have a ~/.dmrc, the default is determined by ./daemon/gdm-session-direct.c, get_fallback_session_name().

This checks if a "gnome" session is available, and uses it if so. If not, it takes the first available session in /usr/share/xsessions/. "First" isn't really defined in terms of asciibetical or so.

So if it is reasonable to just have one session by default in mythbuntu (after bug 403289 is fixed), this might be enough. Otherwise we have to reintroduce the concept of a system default session in /etc/gdm/custom.conf.

Changed in gdm (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Upstream said that they ship the gnome.desktop file in its own binary so xfce for example would just not install this one

Revision history for this message
Mario Limonciello (superm1) wrote :

So from testing the 2009-07-24 image, it's undefined which session gets booted into. I've sometimes gotten mythbuntu.desktop picked, other times xterm.desktop and other times xfce.desktop.

So the only workaround that I can see with the current package is to ship gnome.desktop in mythbuntu-default-settings and divert gnome.desktop if it's already on the system.

--
I think the best solution is to have gdm look for something like "default.desktop" that's provided by the alternatives system and defaults to gnome.desktop but that xfce, mythbuntu and others can register with. This prevents having to put the information in custom.conf, but still lets derivatives pick their session defaults.

summary: - 9.10 A3 candidate ISO, default session is not mythbuntu
+ Unable to change the default session for GDM
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythbuntu-default-settings - 0.80-0ubuntu1

---------------
mythbuntu-default-settings (0.80-0ubuntu1) karmic; urgency=low

  * Add in a set of workaround that will be used until a better solution
    to (LP: #403291) is developed.
  * preinst, postrm:
    - Add a diversion for /usr/share/xsessions/gnome.desktop so that we
      can make gnome.desktop be a symlink to mythbuntu.desktop since gdm
      now looks for gnome.desktop to pick it's default session.
  * links:
    - Provide gnome.desktop to force the default session.

 -- Mario Limonciello <email address hidden> Fri, 24 Jul 2009 14:19:02 -0500

Changed in mythbuntu-default-settings (Ubuntu):
status: New → Fix Released
Changed in mythbuntu:
status: New → Triaged
Changed in xubuntu-default-settings (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 0.60

---------------
xubuntu-default-settings (0.60) karmic; urgency=low

  * Pull in new translations: Arabic and Hebrew.
  * debian/xubuntu-default-settings.{postinst,preinst}: unregister gdm config
    with alternatives.
  * debian/xubuntu-default-settings.prerm, etc/xdg/xubuntu/gdm/gdm.conf:
    drop, unnecessary now.

  * Add in a set of workaround that will be used until a better solution
    to (LP: #403291) is developed (same as Mythbuntu).
  * debian/xubuntu-default-settings.{preinst,postrm}: add a diversion for
    /usr/share/xsessions/gnome.desktop so that we can make gnome.desktop be a
    symlink to xfce.desktop since gdm now looks for gnome.desktop to pick it's
    default session.
  * Provide gnome.desktop to force the default session.

  * etc/xdg/xubuntu/ [...] /xfce4-keyboard-shortcuts.xml: readd a shortcut for
    xfce4-popup-menu (LP: #424282).

  * usr/share/gdm/autostart/LoginWindow:
    - xfce4-power-manager.desktop: provide xfce4-power-manager to replace
      gnome-power-manager for gdm
    - xfsettingsd.desktop: use xfsettings to provide a xsettings daemon
    - xfwm4.desktop: start a window manager.
  * debian/xubuntu-default-settings.gconf-defaults: set xubuntu-logo as
    the default logo on the greeter.

 -- Lionel Le Folgoc <email address hidden> Mon, 07 Sep 2009 22:03:32 +0200

Changed in xubuntu-default-settings (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Mario Limonciello (superm1) wrote :

We need a better solution for this as this causes some complications in that you can't log into gnome from mythbuntu or xubuntu anymore.

pitti recommended adding support to choose default.desktop to gdm by default. That means that each *-default-settings should Provides:/Conflicts: ubuntu-derivative-default-settings or so as you can only have one *-default-settings at a time.

Changed in gdm (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Triaged
milestone: none → karmic-alpha-6
Martin Pitt (pitti)
Changed in gdm (Ubuntu):
importance: Low → High
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

This is not truly solved yet, the current approach causes a major regression (see bug 426800).

Changed in mythbuntu-default-settings (Ubuntu):
status: Fix Released → Triaged
Changed in xubuntu-default-settings (Ubuntu):
importance: Undecided → High
status: Fix Released → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in packaging bzr, forwarded to upstream.

Changed in gdm (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Lionel, Mario, I'll toss the *-default-settings tasks to you. I'm going to upload this gdm ASAP.

You just need to install /usr/share/xsessions/default.session now, and gdm will prefer it.

Please take care that both of you add

  Provides: ubuntu-derivative-default-settings
  Conflicts: ubuntu-derivative-default-settings

to avoid settings fighting each other and file-conflicting over default.session.

Thanks!

Changed in xubuntu-default-settings (Ubuntu Karmic):
assignee: nobody → Lionel Le Folgoc (mrpouit)
Changed in mythbuntu-default-settings (Ubuntu Karmic):
assignee: nobody → Mario Limonciello (superm1)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.27.90-0ubuntu3

---------------
gdm (2.27.90-0ubuntu3) karmic; urgency=low

  * Add 15_default_session.patch: Prefer "default.session", so that other
    desktop environments like XFCE can use gdm, too, without being forced to
    start GNOME. (LP: #403291)
  * debian/gdm.postrm: Fix purge breakage if one of the to-be-cleaned-up
    directories does not exist.

 -- Martin Pitt <email address hidden> Thu, 10 Sep 2009 13:02:27 +0200

Changed in gdm (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythbuntu-default-settings - 0.82-0ubuntu1

---------------
mythbuntu-default-settings (0.82-0ubuntu1) karmic; urgency=low

  * preinst:
    - Drop diversion for gnome.desktop (LP: #403291, #426800)
  * postrm:
    - Drop.
  * postinst:
    - Clean up diversion conditionally as necessary.
  * links:
    - Drop as our default filename will be default.desktop.
  * Rename mythbuntu.desktop to default.desktop.
  * control:
    - Provides/Conflicts for ubuntu-derivative-default-settings

 -- Mario Limonciello <email address hidden> Thu, 10 Sep 2009 09:51:28 -0500

Changed in mythbuntu-default-settings (Ubuntu Karmic):
status: Triaged → Fix Released
Changed in xubuntu-default-settings (Ubuntu Karmic):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 0.61

---------------
xubuntu-default-settings (0.61) karmic; urgency=low

  * debian/control: provides/conflicts with ubuntu-derivative-default-settings.
  * debian/xubuntu-default-settings.preinst: drop our diversion for
    gnome.desktop.
  * debian/xubuntu-default-settings.postinst: clean up our diversion.
  * debian/xubuntu-default-settings.postrm: dropped.
  * Provide default.desktop instead of gnome.desktop (LP: #403291, #426800).

 -- Lionel Le Folgoc <email address hidden> Thu, 10 Sep 2009 20:44:24 +0200

Changed in xubuntu-default-settings (Ubuntu Karmic):
status: In Progress → Fix Released
Changed in gdm:
status: Unknown → New
Revision history for this message
aschuring (aelschuring) wrote :

>Please take care that both of you add
> Provides: ubuntu-derivative-default-settings
> Conflicts: ubuntu-derivative-default-settings
>to avoid settings fighting each other and file-conflicting over default.session.

I'm sorry, I don't think that is an acceptable workaround. Take a look at what happens on a system with both mythbuntu-desktop and xubuntu-desktop installed:

satyr@satyr:~$ sudo aptitude -f install
[...]
The following packages are BROKEN:
  xubuntu-desktop
[...]
The following packages will be REMOVED:
  xubuntu-default-settings{p}
[...]
  xubuntu-desktop: Depends: xubuntu-default-settings but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
xubuntu-desktop
[...]
satyr@satyr:~$ sudo aptitude -f install xubuntu-default-settings+M
[...]
The following packages are BROKEN:
  mythbuntu-desktop
The following packages will be REMOVED:
  mythbuntu-default-settings{a}
The following packages will be upgraded:
  xubuntu-default-settings
[...]
  mythbuntu-desktop: Depends: mythbuntu-default-settings but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
mythbuntu-desktop

satyr@satyr:~$ aptitude why xubuntu-default-settings
iB xubuntu-desktop Depends xubuntu-default-settings
satyr@satyr:~$ aptitude why mythbuntu-default-settings
i mythbuntu-desktop Depends mythbuntu-default-settings

I think, if you're going to take this route, that the Depends of both packages need to weaken their Depend into a Recommends. That will probably bring a host of other problems with it, but it is safer than breaking installations, imho.

Revision history for this message
aschuring (aelschuring) wrote :

Oh, I saw too late that this bug hasn't been updated in over a month. If you want me to open a new bugreport instead, please let me know.

Regards,
Arno

Revision history for this message
Martin Pitt (pitti) wrote :

The upstream bug report has a better proposal: Re-add a "DefaultSession" option to /etc/gdm/custom.conf. I'll look into that for lucid.

Right now, you can't have both xubuntu-default-settings and mythbuntu-default-settings installed at the same time.

Revision history for this message
aschuring (aelschuring) wrote : Re: [Bug 403291] Re: Unable to change the default session for GDM

Martin Pitt wrote:
[...]
> Right now, you can't have both xubuntu-default-settings and mythbuntu-
> default-settings installed at the same time.

I'm afraid I'm just pointing out the elephant in the room here, but my
point wasn't about the *-default-settings packages: as it stands now for
karmic, it's not possible to install mythbuntu-desktop and
xubuntu-desktop alongside each other.

I'm fine with whatever your solution will be. Am I to understand that
this will not be fixed in karmic? In that case I'll just put the
-default-settings packages on hold for the next few months, to prevent
aptitude from trying to "fix" this by removing a -desktop package.

Revision history for this message
Martin Pitt (pitti) wrote :

aschuring [2009-10-31 15:53 -0000]:
> I'm fine with whatever your solution will be. Am I to understand that
> this will not be fixed in karmic?

No, since it would involve quite intrusive structural changes, which
aren't appropriate for a stable release. I know that it's far from
optimal right now, but I'm afraid we have to live with that for the
next 6 months.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Martin Pitt (pitti) wrote :

Reopening for lucid. According to upstream, we shouldn't use this "default.session" hack, but rather reintroduce a setting in custom.conf:

[daemon]
DefaultSession=gnome.desktop

*-default-settings can then change this in their postinst scripts.

Changed in gdm (Ubuntu):
importance: High → Medium
milestone: karmic-alpha-6 → none
status: Fix Released → Triaged
tags: added: iso-testing
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.29.1-0ubuntu5

---------------
gdm (2.29.1-0ubuntu5) lucid; urgency=low

  * debian/patches/15_default_session.patch: (LP: #403291)
    - Choose default session in /etc/gdm/custom.conf using DBus. Removed
      default.desktop hack.
    - Add /usr/lib/gdm-set-default-session to properly define default session:
      use DBus when gdm daemon is on and filing the file when it's off. This
      script can be called in postinst file of ubuntu derivatives.
  * debian/60xdg_path-on-session:
    - Add xdg path depending on GDM selected session. This enables starting
      desired applications depending on session
  * debian/patches/99_autoreconf.patch: refreshed
 -- Didier Roche <email address hidden> Sat, 12 Dec 2009 22:55:06 +0100

Changed in gdm (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Reopened the bug on derivatives as gdm is now able to detect default session from custom.conf

/usr/lib/gdm-set-default-settings should be called now (more details in next post, once xubuntu-default-settings example created)

Changed in xubuntu-default-settings (Ubuntu):
status: Fix Released → Triaged
Changed in mythbuntu-default-settings (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

So, the idea is to call /usr/lib/gdm-set-default-session to properly define default session (it handles cases where gdm-daemon is up or down).

Here is what has been done in xubuntu-default-session:
- removal of dpkg-divert for gnome.desktop in postinst (as it was only internal to karmic development cycle)

- add to postinst in upgade|configure:
if [ -x /usr/lib/gdm/gdm-set-default-session ] ; then
   /usr/lib/gdm/gdm-set-default-session --keep-old xfce || true
fi
-> this update the default session if and only if no previous session is definied (this handle both the case of installing multiple derivates on the same system and having only one derivate which will be the default). If you want to add it and erase previous default session (which is none by default), remove --keep-old option.
Of course, you remplace xfce with your <session>.desktop without ending it with .desktop.

- add to postrm remove|purge:
if [ -x /usr/lib/gdm/gdm-set-default-session ] ; then
   /usr/lib/gdm/gdm-set-default-session --remove xfce || true
fi
-> this remove your session if and only if your session was the default one.

Changed in xubuntu-default-settings (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 0.70

---------------
xubuntu-default-settings (0.70) lucid; urgency=low

  [ Didier Roche ]
  * Change gdm default session handling: (LP: #403291)
    - remove usr/share/xsessions/default.desktop@
    - debian/postinst:
     + call gdm-set-default-session to add xfce as default session only if
       no other previous default session
     + remove divert (no more needed as was only internal to karmic cycle)
    - debian/postrm:
      unsetting xfce as default
    - debian/control:
      remove Provides/Conflicts with ubuntu-derivative-default-settings

  [ Lionel Le Folgoc ]
  * usr/share/xsessions: dropped, now empty.
 -- Didier Roche <email address hidden> Sat, 12 Dec 2009 23:09:23 +0100

Changed in xubuntu-default-settings (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythbuntu-default-settings - 0.86-0ubuntu1

---------------
mythbuntu-default-settings (0.86-0ubuntu1) lucid; urgency=low

  * Change gdm default session handling: (LP: #403291)
   - rename usr/share/xsessions/default.desktop to mythbuntu.desktop
   - debian/postinst:
    + call gdm-set-default-session to add mythbuntu as default session only if
      no other previous default session
   - debian/postrm:
     unsetting mythbuntu as default
   - debian/control:
     remove Provides/Conflicts with ubuntu-derivative-default-settings
 -- Mario Limonciello <email address hidden> Sat, 12 Dec 2009 19:21:52 -0600

Changed in mythbuntu-default-settings (Ubuntu):
status: Triaged → Fix Released
Changed in mythbuntu:
status: Triaged → Fix Released
Changed in gdm:
importance: Unknown → Wishlist
Changed in gdm:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.