Bug 1177513
Summary: | Xorg without root rights breaks by streams redirection | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew <travneff> | ||||
Component: | xorg-x11-xinit | Assignee: | X/OpenGL Maintenance List <xgl-maint> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 21 | CC: | hdegoede, travneff, xgl-maint | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | xorg-x11-xinit-1.3.4-3.fc21 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-01-28 19:53:09 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Andrew
2014-12-28 11:40:24 UTC
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. |