On Wed, Jan 28, 2009 at 11:05 PM, Chris Lamb <[email protected]> wrote: > Are you sure you really mean "+" here? We've been avoiding them elsewhere in > live-* and replacing them with explicit versions because they're so easy to > mix up.
Ok I removed that as XVIDEOMODE has to be set at that stage anyway. Thank for the comments and new version of the patch is attached.
From 4f7808d538369cad308dab093d761a4a71b8ce52 Mon Sep 17 00:00:00 2001 From: Kai Hendry <[email protected]> Date: Wed, 28 Jan 2009 22:21:00 +0100 Subject: [PATCH] Add basic xrandr support for lenny and newer 2.0 --- scripts/live-bottom/21xvidemode | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/scripts/live-bottom/21xvidemode b/scripts/live-bottom/21xvidemode index ead3a6c..6cea832 100755 --- a/scripts/live-bottom/21xvidemode +++ b/scripts/live-bottom/21xvidemode @@ -32,14 +32,24 @@ fi . /scripts/live-functions +[ -n "$XVIDEOMODE" ] || exit + log_begin_msg "Configuring X video modes" # live-initramfs script . /live.vars -if [ -n "$XVIDEOMODE" ] +if test $(cat /root/etc/debian_version | sed 's/\..*$//') -ge 4 # lenny or newer +then + +if [ -x "$(which xrandr 2>/dev/null)" ] then + echo "xrandr -s ${XVIDEOMODE} || /bin/true" >> /root/etc/X11/Xsession.d/21xvidemode +fi + +else # etch or older + mount -o bind /sys /root/sys mount -o bind /proc /root/proc mount -o bind /dev /root/dev -- 1.5.6.5
