lightdm-session runs xrdb with -nocpp option

Bug #1244578 reported by iGEL on 2013-10-25
80
This bug affects 17 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Medium
Unassigned
Precise
Medium
Jorge Niedbalski
Trusty
Medium
Jorge Niedbalski
Utopic
Medium
Jorge Niedbalski
Vivid
Medium
Jorge Niedbalski

Bug Description

[Impact]

lightdm-session runs xrdb for .Xresources file with the -nocpp option (Line 37 and 43), which prevents the xrdb from preprocessing the .Xresources file. Many configurations like the popular solarized color theme (https://github.com/solarized/xresources/blob/master/solarized) use this and you find some complaints about in on the internet

https://bbs.archlinux.org/viewtopic.php?id=164108
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1163129
http://superuser.com/questions/655857/urxvt-uses-pink-instead-of-solarized-until-i-run-xrdb-xresources/656213

I don't see a reason for not using the preprocessor and so did the editor of Xsession (the option is not used in /etc/X11/Xsession.d/30x11-common_xresources)

[Test Case]

 - Install solarized theme https://github.com/solarized/xresources/blob/master/solarized

- Load default Xresources file (xrdb < .XDefaults )

- Now every macro supported by CPP will not work.

[Regression Potential]

* No regression potential advised, small (0.001%) load average increase
on startup time because of enabling Cpp.

[Solution]

Backport default wily session to older releases.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Olivier Mengué (dolmen) wrote :

I think that cpp has been disabled for performance reasons: few people use .Xresources, and fewer use cpp processing directives in their .Xresources.

As you are manually editing your .Xresources only once in a while it would be more efficient for session initialization to process your X ressources definitions yourself through cpp just once after your editing.

So I propose to mark this bug as WONTFIX.

Olivier Mengué (dolmen) wrote :

I've added a detailed workaround in comment in #1163129

Olivier Mengué (dolmen) wrote :

I just wrote a wrapper for your $EDITOR to edit your Xresources and process them through cpp.
Check https://github.com/dolmen/Xresources.edit

Seth Arnold (seth-arnold) wrote :

xrdb has supported this feature for longer than the operating system kernel we're all using has even existed. I see no reason to break backwards compatibility just for the sake of breaking it.

Thanks

iGEL (igel) wrote :

As you say, most people don't have a .Xresources file, and for these people, xrdb won't even be executed - No loss in speed. For those people who do: I would argue, that the complications of your solution are far worse than the 0.01 second the -nocpp option saves (tested on my crappy 400 Euro notebook from 2011). People expect standard features to work out of the box these days.

Roelof Kallenkoot (roelof000) wrote :

I personally end up editing /usr/sbin/lightdm-session line 37 and 43 after every installation.

Completely agree with iGEL with his comment: `and for these people, xrdb won't even be executed - No loss in speed.`

Unless someone comes with a good reason not to fix this, this should definitely be fixed.

Changed in lightdm (Ubuntu Trusty):
status: New → In Progress
Changed in lightdm (Ubuntu Utopic):
status: New → In Progress
Changed in lightdm (Ubuntu Vivid):
status: New → In Progress
Changed in lightdm (Ubuntu Trusty):
assignee: nobody → Jorge Niedbalski (niedbalski)
Changed in lightdm (Ubuntu Utopic):
assignee: nobody → Jorge Niedbalski (niedbalski)
Changed in lightdm (Ubuntu Vivid):
assignee: nobody → Jorge Niedbalski (niedbalski)
Jorge Niedbalski (niedbalski) wrote :
Jorge Niedbalski (niedbalski) wrote :
Jorge Niedbalski (niedbalski) wrote :

This is fixed on Wily, I am attaching the Vivid, Utopic and Trusty patches.

description: updated
Chris J Arges (arges) on 2015-06-15
Changed in lightdm (Ubuntu):
status: Confirmed → Fix Released
Jorge Niedbalski (niedbalski) wrote :
Jorge Niedbalski (niedbalski) wrote :
Chris J Arges (arges) wrote :

Sponsored for P/T/U/V

Changed in lightdm (Ubuntu Precise):
assignee: nobody → Jorge Niedbalski (niedbalski)
status: New → In Progress

Hello iGEL, or anyone else affected,

Accepted lightdm into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.14.2-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lightdm (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in lightdm (Ubuntu Utopic):
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

Hello iGEL, or anyone else affected,

Accepted lightdm into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.12.3-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lightdm (Ubuntu Trusty):
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

Hello iGEL, or anyone else affected,

Accepted lightdm into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.10.5-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lightdm (Ubuntu Precise):
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

Hello iGEL, or anyone else affected,

Accepted lightdm into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.2.3-0ubuntu2.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

iGEL (igel) wrote :

Hello Brian!

I installed the proposed package and it looks like it works. The bug is fixed at least. :)

$ apt-cache policy lightdm
lightdm:
  Installed: 1.10.5-0ubuntu1.1
  Candidate: 1.10.5-0ubuntu1.1
  Version table:
 *** 1.10.5-0ubuntu1.1 0
        400 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1.10.5-0ubuntu1 0
        500 http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1.10.0-0ubuntu3 0
        500 http://kr.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.10.5-0ubuntu1.1

---------------
lightdm (1.10.5-0ubuntu1.1) trusty; urgency=medium

  * debian/lightdm-session: Enable the C preprocessor
    when loading X resources. (LP: #1244578).

 -- Jorge Niedbalski <email address hidden> Mon, 15 Jun 2015 13:39:27 -0500

Changed in lightdm (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for lightdm has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

tags: added: verification-needed-precise verification-needed-utopic verification-needed-vivid
removed: verification-done
Sebastien Bacher (seb128) wrote :

could somebody on one of the SRU series verify the update?

tags: added: verification-done-vivid
removed: verification-needed-vivid
Chris J Arges (arges) on 2015-10-14
Changed in lightdm (Ubuntu Utopic):
status: Fix Committed → Won't Fix
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.14.2-0ubuntu1.1

---------------
lightdm (1.14.2-0ubuntu1.1) vivid; urgency=medium

  * debian/lightdm-session: Enable the C preprocessor
    when loading X resources. (LP: #1244578).

 -- Jorge Niedbalski <email address hidden> Mon, 15 Jun 2015 11:39:09 -0500

Changed in lightdm (Ubuntu Vivid):
status: Fix Committed → Fix Released
Changed in lightdm (Ubuntu):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Precise):
importance: Undecided → Critical
importance: Critical → Medium
Changed in lightdm (Ubuntu Trusty):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Vivid):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Utopic):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Vivid):
importance: Medium → Critical
importance: Critical → High
importance: High → Medium
tags: removed: verification-needed-utopic
tags: added: verification-done-trusty

The fix for this bug has been awaiting testing feedback in the -proposed repository for precise for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Seth Arnold (seth-arnold) wrote :

Preparing to replace lightdm 1.2.3-0ubuntu2.7 (using .../lightdm_1.2.3-0ubuntu2.8_amd64.deb) ...

Verified that the ..2.7 version failed to handle #defines, the ...2.8 version worked as expected.

tags: added: verification-done-precise
removed: verification-needed-precise
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.2.3-0ubuntu2.8

---------------
lightdm (1.2.3-0ubuntu2.8) precise; urgency=medium

  * debian/lightdm-session: Enable C preprocessor
    when loading X resources. (LP: #1244578).

 -- Jorge Niedbalski <email address hidden> Mon, 15 Jun 2015 13:47:46 -0500

Changed in lightdm (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers