diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-24 21:07:26 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-24 21:45:26 +0200 |
commit | d84741a4bfb6ed2531ec7154479c147d2c9a737c (patch) | |
tree | 03bf4a2d7081ab28120aae02dbec6a1d35ce7860 /nixos/modules/services/x11/xserver.nix | |
parent | 012313f2532e4809dd2cd9051ee046dae43c6aab (diff) | |
download | nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar.gz nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar.bz2 nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar.lz nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar.xz nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.tar.zst nixlib-d84741a4bfb6ed2531ec7154479c147d2c9a737c.zip |
X server: Log to the journal instead of /var/log/X.0.log
This ensures that "journalctl -u display-manager" does what you would expect in 2016. However, the main reason is to ensure that our VM tests show the output of the X server. A slight problem is that with KDE user switching, messages from the various X servers end up in the same place. However, that's an improvement over the previous situation, where the second X server would overwrite the /var/log/X.0.log of the first. (This was caused by the fact that we were passing a hard-coded value for -logfile.)
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 4f65ed72d36e..82d3e31e2a01 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -520,6 +520,7 @@ in serviceConfig = { Restart = "always"; RestartSec = "200ms"; + SyslogIdentifier = "display-manager"; }; }; @@ -527,10 +528,11 @@ in [ "-terminate" "-config ${configFile}" "-xkbdir" "${cfg.xkbDir}" + # Log at the default verbosity level to stderr rather than /var/log/X.*.log. + "-verbose" "3" "-logfile" "/dev/null" ] ++ optional (cfg.display != null) ":${toString cfg.display}" ++ optional (cfg.tty != null) "vt${toString cfg.tty}" ++ optional (cfg.dpi != null) "-dpi ${toString cfg.dpi}" - ++ optionals (cfg.display != null) [ "-logfile" "/var/log/X.${toString cfg.display}.log" ] ++ optional (!cfg.enableTCP) "-nolisten tcp"; services.xserver.modules = |