[arch-general] .xsession-errors - can't startx with that file
Hello all: 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 root=UUID=763598c6-08b4-44d9-9b21-d4dbd558b107 rw 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" (EE) Fatal server error: (EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied) (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/home/dutch/.local/share/xorg/Xorg.0.log" for additional information. (EE) (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 [1][2] 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 [3][4], 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? [1] https://bbs.archlinux.org/viewtopic.php?id=143068 [2] https://www.linuxquestions.org/questions/slackware-14/where-is-~- xsession-errors-log-867498/ [3] https://bugs.launchpad.net/ubuntu/+source/xinit/+bug/1562219 [4] https://bbs.archlinux.org/viewtopic.php?id=192329
On Sun, 18 Sep 2016 09:11:45 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
Hello all:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Is X running as root or as the user (rootless)? This can change based on configuration and on drivers used.
On Sun, Sep 18, 2016 at 09:23:01AM -0500, Doug Newgard wrote:
On Sun, 18 Sep 2016 09:11:45 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
Hello all:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Is X running as root or as the user (rootless)? This can change based on configuration and on drivers used.
Excellent question - how is this conclusively determined? Note I have taken no explicit action either way, i.e., to enable rootlessness or not. Looking at the xorg wiki, it appears as though 3 conditions are necessary for running "rootless": 1. systemd >= 216; OK, I'm at 231 on both machines; 2. start X via xinit; OK, I'm using xinit through startx, not a display manager; 3. if I can summarize, if using a proprietary display driver, such as Catalyst or Nvidia, need to take an extra step to run rootless; *this may be the issue.* On the machine where redirection works, I am using the nvidia proprietary driver; on the machine where the error occurs, I am using the xf-video-ati driver. So, unless I have step 3 above backwards (which is entirely possible), the question is how to redirect stderr when running rootless? (If I am in fact misunderstanding, please explain so a moron like me can understand!) Thanks for your help.
On Sun, 18 Sep 2016 09:47:57 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
On Sun, Sep 18, 2016 at 09:23:01AM -0500, Doug Newgard wrote:
On Sun, 18 Sep 2016 09:11:45 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
Hello all:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Is X running as root or as the user (rootless)? This can change based on configuration and on drivers used.
Excellent question - how is this conclusively determined? Note I have taken no explicit action either way, i.e., to enable rootlessness or not.
Looking at the xorg wiki, it appears as though 3 conditions are necessary for running "rootless":
1. systemd >= 216; OK, I'm at 231 on both machines; 2. start X via xinit; OK, I'm using xinit through startx, not a display manager; 3. if I can summarize, if using a proprietary display driver, such as Catalyst or Nvidia, need to take an extra step to run rootless; *this may be the issue.*
On the machine where redirection works, I am using the nvidia proprietary driver; on the machine where the error occurs, I am using the xf-video-ati driver.
So, unless I have step 3 above backwards (which is entirely possible), the question is how to redirect stderr when running rootless? (If I am in fact misunderstanding, please explain so a moron like me can understand!)
Thanks for your help.
rooted vs rootless does look like one difference between the systems. Next, I would enable rooted X on the problem machine and see if it works. If it does, we know we've narrowed down the issue.
On Sun, Sep 18, 2016 at 10:14:35AM -0500, Doug Newgard wrote:
On Sun, 18 Sep 2016 09:47:57 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
On Sun, Sep 18, 2016 at 09:23:01AM -0500, Doug Newgard wrote:
On Sun, 18 Sep 2016 09:11:45 -0500 Dutch Ingraham <stoa@gmx.us> wrote:
Hello all:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Is X running as root or as the user (rootless)? This can change based on configuration and on drivers used.
Excellent question - how is this conclusively determined? Note I have taken no explicit action either way, i.e., to enable rootlessness or not.
Looking at the xorg wiki, it appears as though 3 conditions are necessary for running "rootless":
1. systemd >= 216; OK, I'm at 231 on both machines; 2. start X via xinit; OK, I'm using xinit through startx, not a display manager; 3. if I can summarize, if using a proprietary display driver, such as Catalyst or Nvidia, need to take an extra step to run rootless; *this may be the issue.*
On the machine where redirection works, I am using the nvidia proprietary driver; on the machine where the error occurs, I am using the xf-video-ati driver.
So, unless I have step 3 above backwards (which is entirely possible), the question is how to redirect stderr when running rootless? (If I am in fact misunderstanding, please explain so a moron like me can understand!)
Thanks for your help.
rooted vs rootless does look like one difference between the systems. Next, I would enable rooted X on the problem machine and see if it works. If it does, we know we've narrowed down the issue.
Bingo. Created the Xwrapper.config file with the line "needs_root_rights = yes" and I can now startx and redirect stderr. To get back the rootless operation, I then backed that file out and appended, to ~/.xserverrc, "vt$XDG_VTNR -keeptty." This seems to be working at this point. (Note I had, some days ago, appended the "vt$XDG_VTNR" to the .xserverrc, but that alone doesn't work. Need the -keeptty.) Thanks for your help.
On Sun, 18 Sep 2016 09:11:45 -0500, Dutch Ingraham wrote:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Hi, what actually was too long to read? Did you for testing purpose install a display manger, e.g. lightdm? Does lightdm or any other DM also not provide the wanted output? If so, what does the display manager's log file in /var provide? Regards, Ralf
On Sun, 18 Sep 2016 16:24:12 +0200, Ralf Mardorf wrote:
On Sun, 18 Sep 2016 09:11:45 -0500, Dutch Ingraham wrote:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Hi,
what actually was too long to read?
Did you for testing purpose install a display manger, e.g. lightdm? Does lightdm or any other DM also not provide the wanted output? If so, what does the display manager's log file in /var provide?
Pardon, your mal was TL;DR, my bad, ok, .xsession-errors is used, here is output, however, what is mentioned by "Please also check the log file at "/home/dutch/.local/share/xorg/Xorg.0.log" for additional information"? -- Death of ROXTerm https://sourceforge.net/p/roxterm/discussion/422638/thread/60da6975/
On Sun, Sep 18, 2016 at 04:29:47PM +0200, Ralf Mardorf wrote:
On Sun, 18 Sep 2016 16:24:12 +0200, Ralf Mardorf wrote:
On Sun, 18 Sep 2016 09:11:45 -0500, Dutch Ingraham wrote:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Hi,
what actually was too long to read?
Did you for testing purpose install a display manger, e.g. lightdm? Does lightdm or any other DM also not provide the wanted output? If so, what does the display manager's log file in /var provide?
Pardon, your mal was TL;DR, my bad, ok, .xsession-errors is used, here is output, however, what is mentioned by "Please also check the log file at "/home/dutch/.local/share/xorg/Xorg.0.log" for additional information"?
Sorry, I should have included information on that; there are no errors at all noted in the xorg.log.
On Sun, Sep 18, 2016 at 04:24:12PM +0200, Ralf Mardorf wrote:
On Sun, 18 Sep 2016 09:11:45 -0500, Dutch Ingraham wrote:
TL;DR: One Arch installation will allow redirecting startx's stderr to a file, one won't. What is the difference between systems?
Hi,
what actually was too long to read?
Did you for testing purpose install a display manger, e.g. lightdm? Does lightdm or any other DM also not provide the wanted output? If so, what does the display manager's log file in /var provide?
Regards, Ralf
Thanks for your response. I do have sddm installed, as it came along with the Plasma goo, but it is disabled as I never use a display manager. I could enable it for testing purposes, though, if other testing does not pan out (see other responses in this thread.) Thanks again.
participants (3)
-
Doug Newgard
-
Dutch Ingraham
-
Ralf Mardorf