Merge lp:~robert-ancell/lightdm/handle-no-xrdb into lp:lightdm

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1811
Merged at revision: 1811
Proposed branch: lp:~robert-ancell/lightdm/handle-no-xrdb
Merge into: lp:lightdm
Diff against target: 87 lines (+39/-26)
2 files modified
debian/changelog (+7/-0)
debian/lightdm-session (+32/-26)
To merge this branch: bzr merge lp:~robert-ancell/lightdm/handle-no-xrdb
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+189971@code.launchpad.net

Commit message

Allow lightdm-session to run if xrdb, setxkbmap or xmodmap are not installed

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-10-06 23:09:59 +0000
3+++ debian/changelog 2013-10-08 20:51:36 +0000
4@@ -1,3 +1,10 @@
5+lightdm (1.7.18-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/lightdm-session:
8+ - Handle xrdb, setxkbmap and xmodmap not being installed (LP: #1236317)
9+
10+ -- Robert Ancell <robert.ancell@canonical.com> Wed, 09 Oct 2013 09:46:39 +1300
11+
12 lightdm (1.7.18-0ubuntu1) saucy; urgency=low
13
14 * New upstream release:
15
16=== modified file 'debian/lightdm-session'
17--- debian/lightdm-session 2013-07-16 23:36:16 +0000
18+++ debian/lightdm-session 2013-10-08 20:51:36 +0000
19@@ -29,36 +29,42 @@
20 done
21
22 # Load resources
23-xresourcedir="/etc/X11/Xresources"
24-if [ -d "$xresourcedir" ]; then
25- for file in $xresourcedir/*; do
26- echo "Loading resource: $file"
27- xrdb -nocpp -merge "$file"
28- done
29-fi
30-xresourcefile="$HOME/.Xresources"
31-if [ -f "$xresourcefile" ]; then
32- echo "Loading resource: $xresourcefile"
33- xrdb -nocpp -merge "$xresourcefile"
34-fi
35+if type xrdb >/dev/null 2>&1; then
36+ xresourcedir="/etc/X11/Xresources"
37+ if [ -d "$xresourcedir" ]; then
38+ for file in $xresourcedir/*; do
39+ echo "Loading resource: $file"
40+ xrdb -nocpp -merge "$file"
41+ done
42+ fi
43+ xresourcefile="$HOME/.Xresources"
44+ if [ -f "$xresourcefile" ]; then
45+ echo "Loading resource: $xresourcefile"
46+ xrdb -nocpp -merge "$xresourcefile"
47+ fi
48+fi
49
50 # Load keymaps
51-for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
52- if [ -f "$file" ]; then
53- echo "Loading keymap: $file"
54- setxkbmap `cat "$file"`
55- XKB_IN_USE=yes
56- fi
57-done
58+if type setxkbmap >/dev/null 2>&1; then
59+ for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
60+ if [ -f "$file" ]; then
61+ echo "Loading keymap: $file"
62+ setxkbmap `cat "$file"`
63+ XKB_IN_USE=yes
64+ fi
65+ done
66+fi
67
68 # Load xmodmap if not using XKB
69-if [ -z "$XKB_IN_USE" ]; then
70- for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
71- if [ -f "$file" ]; then
72- echo "Loading modmap: $file"
73- xmodmap "$file"
74- fi
75- done
76+if type xmodmap >/dev/null 2>&1; then
77+ if [ -z "$XKB_IN_USE" ]; then
78+ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
79+ if [ -f "$file" ]; then
80+ echo "Loading modmap: $file"
81+ xmodmap "$file"
82+ fi
83+ done
84+ fi
85 fi
86
87 unset XKB_IN_USE

Subscribers

People subscribed via source and target branches