Do not ship /etc/lightdm/lightdm-gtk-greeter.conf

Bug #845549 reported by Lionel Le Folgoc
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Fix Released
High
Robert Ancell
Oneiric
Fix Released
High
Robert Ancell

Bug Description

Hi,

Currently, the lightdm-gtk-greeter binary package ships /etc/lightdm/lightdm-gtk-greeter.conf as a conffile. This is nice for users, because they'll get the usual dpkg prompt on upgrades. Unfortunately, it's not that great for derivatives where this greeter is used and a custom theming is needed.

I tested quickly, and the gtk greeter is still able to start, and work without this config file. So could you please stop shipping it (*and handle gracefully its removal in maintainer scripts* -- sorry for the highlight, but you didn't do that for /etc/lightdm/lightdm.conf for 0.4.x -> 0.9.x upgrades...).

This would allow derivatives to ship their own config file to theme the greeter (currently, I can't theme it for Xubuntu without either doing some not-so-great things with dpkg-divert, or worse, sed, or forking the greeter just to change its settings...).

Thanks.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here.

This is important to all flavours outside of Unity. Getting this bug fixed means Xubuntu will be able to use a custom wallpaper and theme.

Thanks for taking the time to make Ubuntu better!

Changed in lightdm (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-11.10-beta-2
status: New → Triaged
milestone: ubuntu-11.10-beta-2 → none
Changed in lightdm (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Martin Pitt (pitti)
Changed in lightdm (Ubuntu Oneiric):
assignee: Canonical Desktop Team (canonical-desktop-team) → Robert Ancell (robert-ancell)
tags: added: rls-mgr-o-tracking
Changed in lightdm (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Ok, the fix is:
- The lightdm-gtk-greeter package no longer provides any configuration.
- This package recommends the virtual package lightdm-gtk-greeter-config.
- There is a new package lightdm-gtk-greeter-config-ubuntu which provides a configuration file suitable for Ubuntu.

So derivatives should make a package that:
- Provide, conflict and replace lightdm-gtk-greeter-config
- Contain the file /etc/lightdm/lightdm-gtk-greeter.conf

Suggested naming scheme, lightdm-gtk-greeter-config-xubuntu, lightdm-gtk-greeter-config-lubuntu etc.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Thanks for your work on this!

> Ok, the fix is:
> - The lightdm-gtk-greeter package no longer provides any configuration.

Looks ok until this sentence, and then when I read what's below, I'm starting not to understand why such a complex solution is used...

> - This package recommends the virtual package lightdm-gtk-greeter-config.
> - There is a new package lightdm-gtk-greeter-config-ubuntu which provides a
> configuration file suitable for Ubuntu.
>

No, please don't do that, several packages to share one conffile don't look like the right solution to me (not to mention that having to go through NEW now is a waste of archive admin's time).

> So derivatives should make a package that:
> - Provide, conflict and replace lightdm-gtk-greeter-config

This is definitely a bad idea: it is already hard enough to be able to co-install two derivatives because of unexpected conflicts that arise (a few releases back, it was due to libsdl-{alsa,pulse}, then notification-daemon, and now that?); with such a solution it will be completely impossible.

> - Contain the file /etc/lightdm/lightdm-gtk-greeter.conf
>
> Suggested naming scheme, lightdm-gtk-greeter-config-xubuntu, lightdm-
> gtk-greeter-config-lubuntu etc.

Maybe I'm missing something obvious, but you could use alternatives instead of this complicated solution. This is what was done in the old times of gdm (before its rewrite), and seemed to work fine (sorry if I look like an u-a fanboy, but as this worked in the past with gdm, I feel we're reinventing the wheel, but with a squared shape this time).

1/ All packages stop shipping /etc/lightdm/lightdm-gtk-greeter.conf.

2/ lightdm-gtk-greeter (or lightdm-gtk-greeter-config-ubuntu if you insist on splitting it) ships /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf , registered as /etc/lightdm/lightdm-gtk-greeter.conf by u-a with the lowest priority in the maintainer scripts: "update-alternatives --install /etc/lightdm/lightdm-gtk-greeter.conf lightdm-gtk-greeter-config-derivative /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf 10"

3/ xubuntu-default-settings ships /etc/xdg/xdg-xubuntu/lightdm-gtk-greeter.conf, registered as /etc/lightdm/lightdm-gtk-greeter.conf by u-a with an higher priority in the maintainer scripts: "update-alternatives --install /etc/lightdm/lightdm-gtk-greeter.conf lightdm-gtk-greeter-config-derivative /etc/xdg/xdg-xubuntu/lightdm-gtk-greeter.conf 30"

4/ lubuntu-default-settings ships /etc/xdg/xdg-lubuntu/lightdm-gtk-greeter.conf, registered as /etc/lightdm/lightdm-gtk-greeter.conf by u-a with an higher priority in the maintainer scripts: "update-alternatives --install /etc/lightdm/lightdm-gtk-greeter.conf lightdm-gtk-greeter-config-derivative /etc/xdg/xdg-lubuntu/lightdm-gtk-greeter.conf 50"

5/ etc.

It's easy to change by an admin using "u-a --config lightdm-gtk-greeter-config-derivative", is not a conffile upgrade nightmare to handle, and doesn't involve any conflict for the package manager.

Additionally, all packages doing that can provide lightdm-gtk-greeter-config (no replace nor conflict) to be easily found.

What do you think?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Lionel, sounds good to me. Can you make a patch that does this?

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Sure, I'll try to work on it in a few hours.

Changed in lightdm (Ubuntu Oneiric):
milestone: none → ubuntu-11.10
status: Fix Committed → Triaged
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Sorry for the delay, here's a (probably) working patch.

I tested it locally on a clean Xubuntu vm, and it seems to work fine.

I'm not sure how it's going to work with mythbuntu-lightdm-theme, because this package already diverts the greeter conffile. I wanted to test that, but I don't have enough time right now (and I've been already pinged by Robert this morning to post the patch), so it'll stay like this (and the mtyhbuntu developers will have to handle the possible breakage themselves: after all, they choose to implement an ugly and temporary solution instead of pushing for a clean one...).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Proposed patch" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

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

There was no guarantee that a clean solution would have landed for 11.10 in time. Honestly earlier on in the cycle it didn't look likely. After beta 2 I'll try to clean up the Mythbuntu solution around this patch.

Changed in lightdm (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.0.0-0ubuntu1

---------------
lightdm (1.0.0-0ubuntu1) oneiric; urgency=low

  [ Steve Langasek ]
  * don't start on graphics-device-added; reintroducing this reverted the fix
    for bug #615549 from maverick without explanation.
  * clean up the completely illegible start rule for debian/lightdm.upstart,
    killing off the unnecessary parentheses
  * debian/lightdm.upstart: when lightdm is shut down by a runlevel call,
    emit an upstart event that can be caught by plymouth so it can
    distinguish between the DM shutting down for a runlevel change vs. other
    causes. LP: #854329.

  [ Robert Ancell ]
  * New upstream release.
    [ 0.9.8 ]
    - GetSeatForCookie and GetSessionForCookie are now deprecated. They
      remain for now but use the XDG_SEAT_PATH and XDG_SESSION_PATH
      environment variables instead.
    - Change log filenames to be unique across different display types.
    - Fix up script hooks, add regression tests for them
    - Complete removal of X code from the core of LightDM, so it can better
      support various display types
    - Add ability to set the language of a user from the greeter (LP: #803858)
    - Set LANG variable based on the user language
    - Add language selector into GTK greeter (disabled by default)
    - Allow TCP/IP connections if xserver-allow-tcp is true
    - Allow lightdm --version to be run as non-root
    - Automatically respond to PAM messages without prompts (LP: #783598)
    - Create 'AddLocalXSeat' D-Bus method, and require root to use 'AddSeat'
    - Fix multi-seat configuration picking the same display number (LP: #851362)
    - Use correct D-Bus and power interface in liblightdm-qt (LP: #852803)
    - Run pam_setcred inside the session process so pam_group works
      (LP: #851347)
    - Make sure one session is always selected in the GTK greeter (LP: #819177)
    [ 1.0.0 ]
    - Explicitly grab keyboard focus in GTK greeter
    - Fix removed power and a11y menu items in GTK greeter
    - Put system binary directory into path when running in test mode
      (LP: #860003)
    - Call pam_getenvlist after pam_setcred

  [ Lionel Le Folgoc ]
  * Make the gtk greeter easily themable by derivatives: (LP: #845549)
    - rename lightdm-gtk-greeter.conf to lightdm-gtk-greeter-ubuntu.conf,
      and handle the move in maintainer scripts.
    - manage /etc/lightdm/lightdm-gtk-greeter.conf with update-alternatives,
      by default it uses /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf with a
      very low priority.
  * debian/control: lightdm-gtk-greeter provides lightdm-gtk-greeter-config.
 -- Robert Ancell <email address hidden> Wed, 28 Sep 2011 16:00:20 +1000

Changed in lightdm (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
TK (tkrishan) wrote :

Using Xubuntu Precise Pangolin Alpha2, The unity-greeter.conf still contains the entry:

[greeter]
background=/usr/share/backgrounds/warty-final-ubuntu.png

Wth my nvidia graphic card, the greeting screen flashes with the grid and then goes blank. The login screen is fully functional but one is working blind. My graphics driver is nvidia-current.

Commenting out the line or removing it corrects the problem

Revision history for this message
Alexey-Sandy (alexeysandy) wrote :

In /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf, set: show-language-selector=true
In /etc/lightdm/lightdm.conf, set: greeter-session=lightdm-gtk-greeter/deutschland/deutsch

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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