lightdm-session runs xrdb with -nocpp option

Bug #1244578 reported by iGEL
80
This bug affects 17 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Jorge Niedbalski
Trusty
Fix Released
Medium
Jorge Niedbalski
Utopic
Won't Fix
Medium
Jorge Niedbalski
Vivid
Fix Released
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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in lightdm (Ubuntu):
status: New → Confirmed
Revision history for this message
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.

Revision history for this message
Olivier Mengué (dolmen) wrote :

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

Revision history for this message
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

Revision history for this message
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

Revision history for this message
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.

Revision history for this message
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)
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

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

description: updated
Chris J Arges (arges)
Changed in lightdm (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :
Revision history for this message
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
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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!

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Chris Halse Rogers (raof) wrote : Update 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
Revision history for this message
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)
Changed in lightdm (Ubuntu Utopic):
status: Fix Committed → Won't Fix
Revision history for this message
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
Mathew Hodson (mhodson)
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
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [lightdm/precise] verification still needed

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
Revision history for this message
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
Revision history for this message
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  
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.