summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2015-05-09 20:16:17 +0200
committerRémi Verschelde <rverschelde@gmail.com>2015-05-09 20:16:17 +0200
commitc1e6181d4a72e1eaec4b636b51c2b44e5cedbd92 (patch)
tree52b4466e1f0bc696bcb5a59521ad6b0d8a5e2643
parented067076a810bc396fc357dd8b0813095bb0c604 (diff)
downloadtheme-c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92.tar
theme-c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92.tar.gz
theme-c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92.tar.bz2
theme-c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92.tar.xz
theme-c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92.zip
Use monitor-edid directly instead of monitor-probe
monitor-probe falls back to monitor-probe-using-X which is broken since X dropped its -probeonly switch (mga#15896) The logic used in mga-bg-res to parse the resolution was probably not adapted to the expected output from monitor-probe-using-X anyway.
-rw-r--r--mga-bg-res/NEWS4
-rwxr-xr-xmga-bg-res/mga-bg-res.sh8
2 files changed, 6 insertions, 6 deletions
diff --git a/mga-bg-res/NEWS b/mga-bg-res/NEWS
index 65d129a..dfc7028 100644
--- a/mga-bg-res/NEWS
+++ b/mga-bg-res/NEWS
@@ -1,4 +1,6 @@
-- Make sure to default to 4:3 aspect ratio if monitor-probe fails (previous
+- Use monitor-edid directly instead of monitor-probe, as the latter falls
+ back to monitor-probe-using-X which is broken (mga#15896)
+- Make sure to default to 4:3 aspect ratio if monitor-edid fails (previous
fix was incomplete)
- Fix exit value when symlink is already correct
diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh
index e73caa4..00f7688 100755
--- a/mga-bg-res/mga-bg-res.sh
+++ b/mga-bg-res/mga-bg-res.sh
@@ -4,11 +4,9 @@ bgpath="/usr/share/mga/backgrounds"
theme="Mageia-Default"
curlink=$(readlink $bgpath/default.jpg)
-# Search for the optimal background resolution according to the driver
-DRIVER=$(grep -A 6 'Device' /etc/X11/xorg.conf | grep 'Driver') # => Driver "DriverName"
-DRIVER=$(expr "$DRIVER" : '.*"\(.*\)"') # isolate driver's name
-if [ ! -z "$DRIVER" -a -e /usr/sbin/monitor-probe ]; then
- res=$(exec /usr/sbin/monitor-probe $DRIVER | grep -m 1 ModeLine) # => ModeLine "1920x1080" ...
+# Search for the optimal background resolution according to monitor-edid
+if [ -e /usr/sbin/monitor-edid ]; then
+ res=$(exec /usr/sbin/monitor-edid | grep -m 1 ModeLine) # => ModeLine "1920x1080" ...
res=$(expr "$res" : '.*"\(.*\)".*') # isolate the resolution
fi