From 426a8b806b2eadef8cb4920ef4475d04102c43ca Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 25 Feb 2007 16:20:14 +0000 Subject: [PATCH] * Use xinit to start the X server plus some initial clients (twm + xterm). svn path=/nixos/trunk/; revision=8043 --- system/upstart.nix | 5 +++-- upstart-jobs/xserver.conf | 4 ++-- upstart-jobs/xserver.nix | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/system/upstart.nix b/system/upstart.nix index 5f70d8e228f..fb7526afc87 100644 --- a/system/upstart.nix +++ b/system/upstart.nix @@ -118,8 +118,9 @@ import ../upstart-jobs/gather.nix { # X server. ++ optional ["services" "xserver" "enable"] (import ../upstart-jobs/xserver.nix { - inherit (pkgs) stdenv lib; - inherit (pkgs.xorg) xorgserver xf86inputkeyboard xf86inputmouse xf86videovesa; + inherit (pkgs) stdenv writeText lib xterm; + inherit (pkgs.xorg) xorgserver xinit twm + xf86inputkeyboard xf86inputmouse xf86videovesa; fontDirectories = import ./fonts.nix {inherit pkgs;}; }) diff --git a/upstart-jobs/xserver.conf b/upstart-jobs/xserver.conf index b244530147a..d6d0cd4265e 100644 --- a/upstart-jobs/xserver.conf +++ b/upstart-jobs/xserver.conf @@ -4,7 +4,7 @@ EndSection Section "ServerFlags" - Option "AllowMouseOpenFail" "on" + Option "AllowMouseOpenFail" "on" Option "DontVTSwitch" "off" EndSection @@ -26,7 +26,7 @@ EndSection Section "InputDevice" Driver "mouse" Identifier "Mouse[0]" - Option "Device" "/dev/mice" + Option "Device" "/dev/input/mice" EndSection diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index ffce0f74a6a..a92cdbb251e 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -1,9 +1,14 @@ -{ stdenv +{ stdenv, writeText , lib , xorgserver +, xinit + +, # Initial client/window manager. + twm, xterm + , xf86inputkeyboard , xf86inputmouse @@ -41,6 +46,11 @@ let "; }; + clientScript = writeText "xclient" " + ${twm}/bin/twm & + ${xterm}/bin/xterm -ls + "; + in rec { @@ -54,7 +64,7 @@ start script end script # !!! -ac is a bad idea. -exec ${xorgserver}/bin/X \\ +exec ${xinit}/bin/xinit ${stdenv.bash}/bin/sh ${clientScript} -- ${xorgserver}/bin/X \\ -ac -nolisten tcp -terminate \\ -logfile /var/log/X.${toString display}.log \\ -modulepath ${xorgserver}/lib/xorg/modules,${xf86inputkeyboard}/lib/xorg/modules/input,${xf86inputmouse}/lib/xorg/modules/input,${xf86videovesa}/lib/xorg/modules/drivers \\