View previous topic :: View next topic |
Author |
Message |
TheCubeIsALie n00b
Joined: 11 Sep 2013 Posts: 19
|
Posted: Fri Aug 22, 2014 4:02 am Post subject: Rootless X |
|
|
Hi, I've been messing around with rootless X by setting -suid and editing the xorg-server ebuild to add the --enable-suid-wrapper option. I didn't run into any problems here, and the X server started as my user instead of root (ps aux confirms this). However, it wouldn't respond to my mouse or keyboard.
Some digging led me to find that this was a permission issue with /dev/input/event* files. So I added the following rule into /etc/udev/rules.d
Code: | KERNEL=="event*", TAG+="uaccess" |
The end result was that my mouse and keyboard began responding in X again. This was great, and I went on using my system as normal. I didn't run into any problems until I tried to switch VTs. I could switch to another VT and it would work, but if I tried to switch back to the VT where X was running, my system would stop responding until I killed X.
Any ideas? I have a feeling that X loses its permission to access the /dev/input/event* files when I switch VTs, and for some reason doesn't regain permission when I switch back. I'm thinking that the udev rule isn't the right one to use in this situation, but I haven't found another idea that works. |
|
Back to top |
|
|
TheCubeIsALie n00b
Joined: 11 Sep 2013 Posts: 19
|
Posted: Fri Aug 22, 2014 4:08 am Post subject: |
|
|
I tried adding my user to the input group, as it appears in my system that the /dev/input/event* files accessible by anyone in that group. But VT switching still didn't work so I don't think it's a problem with /dev/input/event*. Could it be a bug in systemd or X? I'm leaning toward it just being a configuration problem on my end, as it appears Arch Linux has rootless X working. |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Fri Aug 22, 2014 1:19 pm Post subject: |
|
|
Last I heard, rootless X required systemd-logind in order to manage the input devices properly. I don't know everything behind that, nor would I see why diddling user/group permissions properly shouldn't do the same thing, unless it is a group-write permission issue. The OpenBSD people are working on a set of OS-agnostic systemd-helper workalikes so that non-systemd people can have the capabilities of systemd-logind and friends. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
TheCubeIsALie n00b
Joined: 11 Sep 2013 Posts: 19
|
Posted: Fri Aug 22, 2014 2:49 pm Post subject: |
|
|
Hi, I probably should have mentioned that I am in fact already using systemd on this system. I'm not sure either why systemd-logind is needed, so I'm going to investigate this as possibly being the point of failure. I've tested this on a desktop using the nouveau drivers, and a laptop using the Intel drivers and they both have the same problem with VT switching, so it's safe to eliminate any Nvidia card weirdness right now. |
|
Back to top |
|
|
apurkrt Tux's lil' helper
Joined: 26 Feb 2011 Posts: 116 Location: Czechia, Europe
|
Posted: Thu Sep 11, 2014 9:26 pm Post subject: |
|
|
Any progress with this, TheCubeIsALie? I'm experiencing the same problem, afaictl:
https://forums.gentoo.org/viewtopic-p-7616016.html
I didn't try rootless X intentionally, just migrated to systemd and don't have "suid" use flag set. Also, I haven't written any udev rules. The X just works, except for switching to VT/console and back; I lose keyboard and mouse input after the switch (can regain mouse after replugging it). |
|
Back to top |
|
|
|