Created attachment 516 [details] Patch to add missing -s option to su invocation. the init script tries to start the server using this line: su -l -c '/etc/X11/Xserver&' $username This does not work, because the user 'xuser' has default shell /bin/false, so the whole line is a NOP. It can be fixed by adding '-s /bin/sh' to the command line; patch is attached.
I tested rootless X on an atom based Lenovo Ideapad S10-3t, with Intel GPU, and it works fine. I used atom-pc machine target and I didn't need to change anything else. However, it doesn't work in qemux86 anymore because X depends very much on DRI now and qemu does not support it. Nevertheless, the bug doesn't seem to be valid since the xserver-nodm script works fine for atom-pc.
Works fine on real HW. Closing as invalid.
I am using this on real HW too, and it definitely does not work here, and I don't see how it could possibly work considering xuser has no shell ... from a root console, if you do 'su xuser' do you get an xuser shell?
@tf: I do get a shell after doing 'su xuser' in a root console. Also, /etc/passwd shows that xuser does have a shell assigned: xuser:x:1000:1000::/home/xuser:/bin/sh The '/bin/sh' is assigned by default by useradd if no -s option is provided and if /etc/default/useradd exists. In our case, the file exists and the default shell is /bin/sh. So, it should also work for you. Are you using the latest tree? Can you provide more info?
I am using denzil; the xuser entry in the passwd file is: xuser:x:999:999::/home/xuser:/bin/false The reason for this is connman, the connman.inc file also does a useradd xuser and it specifies the shell as /bin/false -- I guess the final outcome depends on whether your xserver-nodm-init or connman recipe gets built first.
You're right. It looks like a parallelism issue. If connman creates the user first, then xserver-nodm-init script will fail to create the user because it already exists. It turns out, I was "lucky" enough not to reproduce it... :)
There is a good reason for connman to create the user -- dbus warns if it comes across a username it doesn't recognise in the rules. Long term I want to see that rule die anyway.
Well, I think the right solution to this would be to make useradd parameters consistent for both connman and xserver-nodm-init. Afterall, they both add the same user which is shared between connman and rootless X.
Patches merged: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ca6d07c92c50a52d05aa960b7929184413780714 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7f017cab0b3e4d5a4fc356eccd8eb8429b0531d0
Thx; it's a fix for now, but having to manually keep files in sync is not very robust -- would it not be better to have a dedicated xuser package that the two packages RDEPEND on?
Technically, it would be better. But I don't think it's worth the effort, provided USERADD_PARAMs are not expected to change that often in the future. Otherwise, yes, I agree with you.
I've made it a personal mission to remove the xuser reference in connman anyway.
Hi, I have tested it with the core-image-sato-sugarbay-20120618061023.hddimg. X starts, the line: xuser:x:1000:1000::/home/xuser:/bin/sh exist in /etc/passwd, and in connman.inc the USER_ADD_PARAM${PN} is created like this: USERADD_PARAM_${PN} = "--create-home \ --groups video,tty,audio \ --user-group xuser" Setting it to verified. alex.