Tried to launch Xorg w/o root privileges as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1078902#c5 Result: it's ok when launched as simple "startx" but fails with specific streams redirection. More precisely, failing cases are: 1. startx < /dev/null Error in xorg log: > Fatal server error: > [ 101.797] (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied) 2. startx &> /tmp/file > Fatal server error: > [ 196.962] (EE) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted 3. startx 2> /tmp/file Same error as for "&>" Cases 2. and 3. corrupt VT—it's necessary to issue "reset" to fix it. Working cases: 1. startx > /tmp/file 2. startx 2>&1 > /tmp/file This last method is enough for my purposes. kernel 3.17.7-300.fc21.x86_64 xorg-x11-server-common-1.16.2.901-1.fc21.x86_64 selinux: permissive Some additional info starts from here: https://bugzilla.redhat.com/show_bug.cgi?id=1078902#c9
Amendment: "startx 2>&1 > /tmp/file" is my fail. Sure it doesn't redirect stderr to file. When fixed ("startx > /tmp/file 2>&1") it has the same error as for another stderr redirections described.
Hmm, so adding some logging: [ 17404.898] (++) using VT number 2 [ 17404.898] (++) stat 0 result 0 S_ISCHR 0 major 0 minor 0 [ 17404.898] (++) stat 1 result 0 S_ISCHR 0 major 0 minor 0 [ 17404.898] (++) stat 2 result 0 S_ISCHR 1 major 4 minor 2 [ 17404.898] (--) controlling tty is VT number 2, auto-enabling KeepTty and when redirecting stderr: [ 17404.898] (++) using VT number 2 [ 17404.898] (++) stat 0 result 0 S_ISCHR 0 major 0 minor 0 [ 17404.898] (++) stat 1 result 0 S_ISCHR 0 major 0 minor 0 [ 17404.898] (++) stat 2 result 0 S_ISCHR 0 major 0 minor 0 [ 17404.898] (--) controlling tty is VT number 2, auto-enabling KeepTty So it seems that xinit already detaches stdin and stdout from the terminal leaving only stderr, and if you then redirect stderr the "auto-enabling KeepTty" breaks. This works however: startx -- -keeptty 2> /dev/null IOW explictly telling X to keeptty works, so we can fix this by patching startx to add -keeptty when it is adding a vt# argument matching the current tty (which it does when no -- vt# is specified).
Created attachment 982820 [details] [PATCH xinit] startx: Pass -keeptty when telling the server to start on the current tty
xorg-x11-xinit-1.3.4-3.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/xorg-x11-xinit-1.3.4-3.fc21
Package xorg-x11-xinit-1.3.4-3.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing xorg-x11-xinit-1.3.4-3.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-1067/xorg-x11-xinit-1.3.4-3.fc21 then log in and leave karma (feedback).
xorg-x11-xinit-1.3.4-3.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.