summaryrefslogtreecommitdiffstats
path: root/mga-bg-res
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-30 22:09:56 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-30 22:09:56 +0000
commita2e654fd0c049dcf82a27318120083375b5261ab (patch)
tree8e2a50e8113fa92f29cb0a2ea2dcae9e6e927d55 /mga-bg-res
parent384235e0286d74b3c215954fd6c5235873e5a6b0 (diff)
downloadtheme-a2e654fd0c049dcf82a27318120083375b5261ab.tar
theme-a2e654fd0c049dcf82a27318120083375b5261ab.tar.gz
theme-a2e654fd0c049dcf82a27318120083375b5261ab.tar.bz2
theme-a2e654fd0c049dcf82a27318120083375b5261ab.tar.xz
theme-a2e654fd0c049dcf82a27318120083375b5261ab.zip
mga-bg-res: don't use monitor-edid during a local install
monitor-edid sometimes hangs when run in a nested X session.
Diffstat (limited to 'mga-bg-res')
-rwxr-xr-xmga-bg-res/mga-bg-res.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh
index 79c0e68..888db1a 100755
--- a/mga-bg-res/mga-bg-res.sh
+++ b/mga-bg-res/mga-bg-res.sh
@@ -5,7 +5,9 @@ theme="Mageia-Default"
curlink=$(readlink $bgpath/default.png)
# Search for the optimal background resolution according to monitor-edid
-if [ -e /usr/sbin/monitor-edid ]; then
+# Skip this during a local install (drakx-in-chroot or draklive2), as
+# monitor-edid sometimes hangs when run in a nested X session.
+if [ -e /usr/sbin/monitor-edid -a -z "$LOCAL_INSTALL" ]; then
res=$(exec /usr/sbin/monitor-edid | grep -m 1 ModeLine) # => ModeLine "1920x1080" ...
res=$(expr "$res" : '.*"\(.*\)".*') # isolate the resolution
fi