* Start a display manager (SLiM).
svn path=/nixos/trunk/; revision=8045
This commit is contained in:
parent
426a8b806b
commit
ef6b45d924
@ -118,8 +118,8 @@ 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 writeText lib xterm;
|
inherit (pkgs) stdenv writeText lib xterm slim;
|
||||||
inherit (pkgs.xorg) xorgserver xinit twm
|
inherit (pkgs.xorg) xorgserver xinit twm xauth
|
||||||
xf86inputkeyboard xf86inputmouse xf86videovesa;
|
xf86inputkeyboard xf86inputmouse xf86videovesa;
|
||||||
fontDirectories = import ./fonts.nix {inherit pkgs;};
|
fontDirectories = import ./fonts.nix {inherit pkgs;};
|
||||||
})
|
})
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
, # Initial client/window manager.
|
, # Initial client/window manager.
|
||||||
twm, xterm
|
twm, xterm
|
||||||
|
|
||||||
|
, # Needed for the display manager (SLiM).
|
||||||
|
slim, xauth
|
||||||
|
|
||||||
, xf86inputkeyboard
|
, xf86inputkeyboard
|
||||||
|
|
||||||
, xf86inputmouse
|
, xf86inputmouse
|
||||||
@ -51,6 +54,24 @@ let
|
|||||||
${xterm}/bin/xterm -ls
|
${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
|
in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
@ -63,13 +84,10 @@ start script
|
|||||||
|
|
||||||
end script
|
end script
|
||||||
|
|
||||||
# !!! -ac is a bad idea.
|
env SLIM_CFGFILE=${slimConfig}
|
||||||
exec ${xinit}/bin/xinit ${stdenv.bash}/bin/sh ${clientScript} -- ${xorgserver}/bin/X \\
|
env FONTCONFIG_FILE=/etc/fonts/fonts.conf # !!! cleanup
|
||||||
-ac -nolisten tcp -terminate \\
|
|
||||||
-logfile /var/log/X.${toString display}.log \\
|
exec ${slim}/bin/slim
|
||||||
-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}
|
|
||||||
";
|
";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user