Closed Barbaross93 closed 2 years ago
Try setting allow_users
to anybody
in /etc/X11/Xwrapper.confg
.
I vaguely remember this happening to me once before even while using startx
(e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801529) when I was attempting to redirect stdout and stderr to a logger.
It may also be an issue with the version of Xorg that you are using as the bug report notes. Otherwise check your ~/.local/share/xorg/Xorg.$n.log
for any indication.
Unfortunately setting allow_users
to anybody
seems to have no effect. I am able to redirect stdout and stderr with &>/dev/null
using startx
. I can't quite determine the Xorg version used in the bug report (1:7.7+12
?), but I am using xinit 1.4.1
and sx 2.1.7
on void linux.
I'm using X.Org X Server 1.20.13
and can't reproduce this issue. It even have something to do with logind
, you'll have to look at the logs.
I am also using xorg-xserver 1.20.13
. Since I don't have systemd, I do not have logind or elogind currently. Do I need to try with elogind then?
Look at the server logs
When I run with exec sx &>~/.local/share/xorg/x.log
I get this line in x.log
:
/usr/libexec/Xorg.wrap: Only console users are allowed to run the X server
With a bit of google-fu, it turns out that adding allowed_users = anybody
rather than just allow_users = anybody
solves my issue. Apparently this will cause problems if multiple people try to login to the same X session, but for a single user setup, this shouldn't be an issue. Thanks for the help.
Why would setting allow_users
to anyone
not help if the error message returned by Xorg.wrap
is telling you that it's attempting to run as a console user?
The server log if running as root would be written to /var/log/Xorg.$n.log
.
Edit: I see, it's allowed_users
and not allow_users
.
Because allow_users
isn't a real setting. allowed_users
(with emphasis on the ed) is a legitimate setting. I'm also not running X as root by setting needs_root_rights = auto
in my /etc/X11/Xwrapper.config
Ah woops, just saw that you edited your response. Sorry to redundantly explain. I do think it odd that I can't redirect both stdout and stderr as the console user. Maybe I'll tinker with the Xwrapper.config
settings to see if any other combo besides allowing root works.
EDIT:
Fun fact, an Xwrapper.config
with:
allowed_users = anybody
needs_root_rights = no
also works
Yes, that is what I've ended up using over the years. I've forgotten the details as to why
As the title says, attempting to suppress both stdout and stderr causes X to never launch. If I only suppress one of the two,
sx
is able to launch Xorg fine.