[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#701824: Always configure X11 server



Package: live-config
Version: 3.0.21
Severity: normal
Tags: patch

The live-config 1150-xserver-xorg is only run once for live sytems with
a rw persistence medium. While this behavior might make sense for other
live-config scripts which modify configuration settings, this does not
make sense for hardware configuration. One of the main purposes of a
live system is to be hardware agnostic.

The attached patch makes the script run on every boot and ensures that
xorg autodetection works if an other driver was selected before by
removing those settings.

Gaudenz

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 4b9fe959a8a4636a0c1bc9ade8331bc7368af8a6 Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@soziologie.ch>
Date: Tue, 19 Feb 2013 16:12:51 +0100
Subject: [PATCH 1/3] Always configure X server

As a live system is intended to be run in various different hardware
configurations, the X server configuration should be adjusted at each
boot and not only once the first time this live-config script is run.
---
 scripts/config/1150-xserver-xorg |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/config/1150-xserver-xorg b/scripts/config/1150-xserver-xorg
index 20903df..d38b4d1 100755
--- a/scripts/config/1150-xserver-xorg
+++ b/scripts/config/1150-xserver-xorg
@@ -11,8 +11,7 @@
 Xserver_xorg ()
 {
 	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/xserver-xorg.list ] || \
-	   [ -e /var/lib/live/config/xserver-xorg ]
+	if [ ! -e /var/lib/dpkg/info/xserver-xorg.list ] ;
 	then
 		return
 	fi
@@ -211,6 +210,10 @@ EOF
 		esac
 	fi
 
+	# Remove leftovers from previous runs of this script, ensure that xorg autoconfig works and mesa is selected
+	rm /etc/X11/xorg.conf.d/zz-live-config_xserver-xorg.conf || true
+	update-alternatives --quiet --set glx /usr/lib/mesa-diverted
+
 	if [ -n "${LIVE_XORG_RESOLUTION}" ]
 	then
 		echo "xrandr -s ${LIVE_XORG_RESOLUTION} || /bin/true" >> /etc/X11/Xsession.d/21xvidemode
@@ -228,8 +231,6 @@ EOF
 			| grep -v "overwriting possibly-customised configuration" \
 			| grep -v "file; backup in /etc/X11/xorg.conf" || true
 
-		# Creating state file
-		touch /var/lib/live/config/xserver-xorg
 	fi
 }
 
-- 
1.7.10.4


Reply to: