* Use xinit to start the X server plus some initial clients (twm + xterm).

svn path=/nixos/trunk/; revision=8043
This commit is contained in:
Eelco Dolstra 2007-02-25 16:20:14 +00:00
parent 3ad2c91939
commit 426a8b806b
3 changed files with 17 additions and 6 deletions

View file

@ -118,8 +118,9 @@ import ../upstart-jobs/gather.nix {
# X server. # X server.
++ optional ["services" "xserver" "enable"] ++ optional ["services" "xserver" "enable"]
(import ../upstart-jobs/xserver.nix { (import ../upstart-jobs/xserver.nix {
inherit (pkgs) stdenv lib; inherit (pkgs) stdenv writeText lib xterm;
inherit (pkgs.xorg) xorgserver xf86inputkeyboard xf86inputmouse xf86videovesa; inherit (pkgs.xorg) xorgserver xinit twm
xf86inputkeyboard xf86inputmouse xf86videovesa;
fontDirectories = import ./fonts.nix {inherit pkgs;}; fontDirectories = import ./fonts.nix {inherit pkgs;};
}) })

View file

@ -4,7 +4,7 @@ EndSection
Section "ServerFlags" Section "ServerFlags"
Option "AllowMouseOpenFail" "on" Option "AllowMouseOpenFail" "on"
Option "DontVTSwitch" "off" Option "DontVTSwitch" "off"
EndSection EndSection
@ -26,7 +26,7 @@ EndSection
Section "InputDevice" Section "InputDevice"
Driver "mouse" Driver "mouse"
Identifier "Mouse[0]" Identifier "Mouse[0]"
Option "Device" "/dev/mice" Option "Device" "/dev/input/mice"
EndSection EndSection

View file

@ -1,9 +1,14 @@
{ stdenv { stdenv, writeText
, lib , lib
, xorgserver , xorgserver
, xinit
, # Initial client/window manager.
twm, xterm
, xf86inputkeyboard , xf86inputkeyboard
, xf86inputmouse , xf86inputmouse
@ -41,6 +46,11 @@ let
"; ";
}; };
clientScript = writeText "xclient" "
${twm}/bin/twm &
${xterm}/bin/xterm -ls
";
in in
rec { rec {
@ -54,7 +64,7 @@ start script
end script end script
# !!! -ac is a bad idea. # !!! -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 \\ -ac -nolisten tcp -terminate \\
-logfile /var/log/X.${toString display}.log \\ -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 \\ -modulepath ${xorgserver}/lib/xorg/modules,${xf86inputkeyboard}/lib/xorg/modules/input,${xf86inputmouse}/lib/xorg/modules/input,${xf86videovesa}/lib/xorg/modules/drivers \\