TL;DR: One Arch installation will allow redirecting startx's stderr to
a file, one won't. What is the difference between systems?
I am having an issue with logging xsession errors. Specifically, if I
create an .xsession-errors file in /home/user, then startx with
<<startx 2> /home/user/.xsession-errors>>, startx will write to the
file, but otherwise error-out and not actually start X. The error, in
its entirety, is:
"X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.5.4-1-ARCH x86_64
Current Operating System: Linux archlinux 4.7.4-1-ARCH #1 SMP PREEMPT
Thu Sep 15 15:24:29 CEST 2016 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux
Build Date: 19 July 2016 05:54:24PM
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/dutch/.local/share/xorg/Xorg.0.log", Time: Sat Sep
17 20:01:10 2016
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)
Please consult the The X.Org Foundation support
(EE) Please also check the log file at
"/home/dutch/.local/share/xorg/Xorg.0.log" for additional information.
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error"
For the correctness of the specific incantation
<<startx 2> /home/user/.xsession-errors>>, see these  threads. In
addition, that command works on any number of other distros (Fedora,
Gentoo, etc., and even OpenBSD).
But here is the real kicker - I have another computer with a very
similar Arch installation, i.e., x86_64, fully up-to-date, "full" KDE
and other window managers installed, using identical (actually copied
from machine-to-machine) .xinitrc files. The above error only happens
on one machine, and happens regardless of whether I am trying to start
Plasma or just DWM, Awesome, i3, or whatever.
Searching for that specific error does return a few hits , but none of
those issues/remedies are similar to mine.
Any ideas on how I can determine the differences between the two Arch
installations that are causing only one to error-out when redirecting
stderr to a file?