Bogus handling of Xresources dir

Bug #800193 reported by Loïc Minier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: lightdm

Hi

/etc/lightdm/Xsession does:

for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -nocpp -merge "$file"
    fi
done

but here /etc/X11/Xresources is a directory, which means that the resources in there don't get applied.

Changing this to:
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -nocpp -merge "$file"
    elif [ -d "$file" ]; then
        for i in `ls "$file"`; do
            if [ -r "$i" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
                xrdb -nocpp -merge "$i"
            fi
        done
    fi
done

fixes it

Cheers

Revision history for this message
Loïc Minier (lool) wrote :

The provided snippet was incorrect, but this should work:

# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -nocpp -merge "$file"
    elif [ -d "$file" ]; then
        for i in `ls "$file"`; do
            if [ -r "$file/$i" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
                echo "Loading resource: $file/$i"
                xrdb -nocpp -merge "$file/$i"
            fi
        done
    fi
done

tags: added: patch
Revision history for this message
papukaija (papukaija) wrote :

This bug might be fixed by bug 795083.

tags: removed: patch
Revision history for this message
Loïc Minier (lool) wrote :

Nope, still an issue

tags: added: patch
Revision history for this message
papukaija (papukaija) wrote :

Please do not add the patch tag that without an actual patch: A patch contains changes to an Ubuntu package that will resolve a bug, since this was not one I've deleted the patch tag. In the future keep in mind the definition of a patch. You can learn more about what qualifies as a patch at https://wiki.ubuntu.com/Bugs/Patches. Thanks!

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

This bug was fixed in the package lightdm - 0.4.0-0ubuntu7

---------------
lightdm (0.4.0-0ubuntu7) oneiric; urgency=low

  * debian/Xsession:
    - Correctly load Xresources (LP: #800193)
 -- Robert Ancell <email address hidden> Mon, 27 Jun 2011 09:43:49 +0100

Changed in lightdm (Ubuntu):
status: New → Fix Released
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.