From c1e6181d4a72e1eaec4b636b51c2b44e5cedbd92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 9 May 2015 20:16:17 +0200 Subject: 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. --- mga-bg-res/NEWS | 4 +++- mga-bg-res/mga-bg-res.sh | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mga-bg-res') 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 -- cgit v1.2.1