Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635582 - x11-base/xorg-server-1.19.5-r1 ignores ~/.xserverrc
Summary: x11-base/xorg-server-1.19.5-r1 ignores ~/.xserverrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-27 14:53 UTC by Saul Peebsen
Modified: 2018-06-13 18:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saul Peebsen 2017-10-27 14:53:50 UTC
I'm not sure if this is a bug or feature, it is a bug for me. Because I use ~/.xserverrc to start X with custom options. If this feature was removed for a reason I'd expect a news item explaining how to pass custom options to the X with new xorg-server.
Comment 1 Matt Turner gentoo-dev 2017-10-27 20:35:30 UTC
Hmm. We began passing --enable-suid-wrapper unconditionally in -r1, and so the X server began running as a regular user (instead of root) in most cases.

/usr/bin/Xorg is now a shell script that executes /usr/libexec/Xorg.wrap.

I don't know what your .xserverrc looks like. Are you passing arguments that perhaps don't work if run as your regular user instead of root?
Comment 2 Saul Peebsen 2017-10-27 21:16:14 UTC
My ~/.xserverrc is simple, 'exec /usr/bin/X -listen tcp'. I created the udev rule for inputs and I can run the server as user, no problem. But it seems the ~/.xserverrc is not parsed any more? I can see in ps output the command line, and there is no .xserverrc. I reverted back to old server that runs as root and now the command line is:
'xinit /home/saul/.xinitrc -- /home/saul/.xserverrc :0 -auth /home/saul/.serverauth.23522'
I'm used to run some X apps remotely. I know, I could use SSH. But why should I have SSH overhead in my home network.
Comment 3 Matt Turner gentoo-dev 2017-10-27 21:21:00 UTC
(In reply to Saul Peebsen from comment #2)
> My ~/.xserverrc is simple, 'exec /usr/bin/X -listen tcp'. I created the udev
> rule for inputs and I can run the server as user, no problem. But it seems
> the ~/.xserverrc is not parsed any more? I can see in ps output the command
> line, and there is no .xserverrc. I reverted back to old server that runs as
> root and now the command line is:
> 'xinit /home/saul/.xinitrc -- /home/saul/.xserverrc :0 -auth
> /home/saul/.serverauth.23522'

To be clear, it works with xorg-server-1.19.5 but not with 1.19.5-r1?
Comment 4 Saul Peebsen 2017-10-27 21:32:20 UTC
Correct. And there is no .xserverrc seen on the command line with -r1.
Comment 5 Nick Sarnie gentoo-dev 2017-11-24 00:31:07 UTC
Hey Saul,

Thanks for the bug report and for trying the new version. I have spent a while on this and haven't been able to reproduce the issue. For testing, I am giving X a bogus argument so it will error out if .xserverrc gets parsed. When I run 'xinit' from a user terminal, I always see X error our with the unrecognized argument error. My .xserverrc is is below
exec /usr/bin/X FOOBAR

If you change your script to use a bogus argument, do you see the same behavior? 
If not, do you have any ideas on what else might be preventing me from reproducing the issue?

Thanks,
Sarnex
Comment 6 Saul Peebsen 2017-11-24 00:45:33 UTC
I downgraded and currently cannot dedicate any time on this, sorry. However, you can use the same valid line I used (exec /usr/bin/X -listen tcp) and check with 'ps ax | grep /usr/bin/X' to see if it was applied. Thank you for your interest.
Comment 7 Nick Sarnie gentoo-dev 2017-11-24 01:12:36 UTC
(In reply to Saul Peebsen from comment #6)
> I downgraded and currently cannot dedicate any time on this, sorry. However,
> you can use the same valid line I used (exec /usr/bin/X -listen tcp) and
> check with 'ps ax | grep /usr/bin/X' to see if it was applied. Thank you for
> your interest.

I tried your exact .xserverrc, and I did see the correct arguments passed to the X binary, not in /usr/bin/X (because it's a wrapper) but in /usr/libexec/Xorg.

Not sure where to go from here.

Sarnex
Comment 8 Saul Peebsen 2017-11-24 01:35:41 UTC
Me neither, with my current Xorg I get 
~ $ ps ax | grep /usr/bin/X
2791 tty7     Ssl+  50:20 /usr/bin/X -listen tcp
and with new "rootless" version it wasn't there and incoming SSH connections were denied.
Comment 9 Saul Peebsen 2017-11-24 01:37:19 UTC
(In reply to Saul Peebsen from comment #8)
> Me neither, with my current Xorg I get 
> ~ $ ps ax | grep /usr/bin/X
> 2791 tty7     Ssl+  50:20 /usr/bin/X -listen tcp
> and with new "rootless" version it wasn't there and incoming SSH connections
> were denied.

Correction, incoming X connections on port 6000.
Comment 10 Larry the Git Cow gentoo-dev 2017-12-28 01:29:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223d6b7e15d965e9254c303fa43f279deeec8f9d

commit 223d6b7e15d965e9254c303fa43f279deeec8f9d
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2017-12-28 01:21:06 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2017-12-28 01:28:23 +0000

    x11-base/xorg-server: Drop version 1.19.5-r1
    
    -r1 changed suid behavior, breaking some users for unknown reasons.
    
    Bug: https://bugs.gentoo.org/635102
    Bug: https://bugs.gentoo.org/635582

 profiles/package.mask                             |   5 -
 x11-base/xorg-server/xorg-server-1.19.5-r1.ebuild | 251 ----------------------
 2 files changed, 256 deletions(-)}
Comment 11 Matt Turner gentoo-dev 2018-03-01 20:01:22 UTC
I've added xorg-server-1.19.99.901 to the tree, with the --enable-suid-wrapper flag passed unconditionally. Let's give this another try and see if it still causes problems. If it does, I'll poke some people upstream and see if they have an idea what's wrong.
Comment 12 Saul Peebsen 2018-03-03 16:00:35 UTC
No change, incoming connections on port 6000 are denied again. If there is a way to enable listen tcp I'd like to hear about it.
Comment 13 Matt Turner gentoo-dev 2018-04-15 23:06:04 UTC
Please try 1.19.99.904.
Comment 14 Larry the Git Cow gentoo-dev 2018-04-15 23:07:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39fdaceded21ebd4c6665ec6147ab65f263ac564

commit 39fdaceded21ebd4c6665ec6147ab65f263ac564
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-04-15 22:56:14 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-04-15 22:56:14 +0000

    x11-base/xorg-server: Install setuid without systemd
    
    When using systemd, the Xserver does not need to run with root
    privileges. Without systemd... I'm not sure.
    
    Bug: https://bugs.gentoo.org/635102
    Bug: https://bugs.gentoo.org/635582

 x11-base/xorg-server/xorg-server-9999.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)}
Comment 15 Saul Peebsen 2018-04-17 12:20:16 UTC
(In reply to Matt Turner from comment #13)
> Please try 1.19.99.904.

Thank you for your interest. However, my ~/.xserverrc is still ignored.

6000/tcp closed X11

This is nmap output from remote host after the host was allowed using xhost.
Comment 16 Saul Peebsen 2018-04-17 12:53:43 UTC
I know this is another bug ... 
There is no mouse in dosbox with 1.19.99.904, keyboard works, mouse does not. I am using libinput. Downgrading xorg-server restored the mouse.
Comment 17 Matt Turner gentoo-dev 2018-04-17 16:37:54 UTC
(In reply to Saul Peebsen from comment #15)
> (In reply to Matt Turner from comment #13)
> > Please try 1.19.99.904.
> 
> Thank you for your interest. However, my ~/.xserverrc is still ignored.
> 
> 6000/tcp closed X11
> 
> This is nmap output from remote host after the host was allowed using xhost.

Are you using systemd or openrc?
Comment 18 Saul Peebsen 2018-04-17 16:54:09 UTC
Very lean setup, OpenRC, no login manager, using 'startx -- vt1'.
Comment 19 Matt Turner gentoo-dev 2018-05-07 01:41:54 UTC
No reason to believe anything has changed, but I pushed 1.19.99.905 into the tree.
Comment 20 Matt Turner gentoo-dev 2018-06-08 05:11:05 UTC
Please test xorg-server-1.20.
Comment 21 Saul Peebsen 2018-06-13 18:00:23 UTC
It works! Thank you very much.