* Start a display manager (SLiM).

svn path=/nixos/trunk/; revision=8045
This commit is contained in:
Eelco Dolstra 2007-02-25 22:27:17 +00:00
parent 426a8b806b
commit ef6b45d924
2 changed files with 27 additions and 9 deletions

View file

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

View file

@ -9,6 +9,9 @@
, # Initial client/window manager.
twm, xterm
, # Needed for the display manager (SLiM).
slim, xauth
, xf86inputkeyboard
, xf86inputmouse
@ -51,6 +54,24 @@ let
${xterm}/bin/xterm -ls
";
xserverArgs = [
"-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"
"-config ${config}"
":${toString display}" "vt${toString tty}"
];
# Note: lines must not be indented.
slimConfig = writeText "slim.cfg" "
xauth_path ${xauth}/bin/xauth
default_xserver ${xorgserver}/bin/X
xserver_arguments ${toString xserverArgs}
login_cmd exec ${stdenv.bash}/bin/sh ${clientScript}
";
in
rec {
@ -63,13 +84,10 @@ start script
end script
# !!! -ac is a bad idea.
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 \\
-config ${config} \\
:${toString display} vt${toString tty}
env SLIM_CFGFILE=${slimConfig}
env FONTCONFIG_FILE=/etc/fonts/fonts.conf # !!! cleanup
exec ${slim}/bin/slim
";
}