I have a private lab network consisting of a raspberry pi and a x86 box. I want to run the pi (host2) as a XDMCP client and the X86 box (host1) as the XDMCP server.
On the x86 box, host1, I created a test_user with a .~/xsession to launch twm once logined in. I then commented out the line in /etc/X11/xdm-config so xdm could manage X terminals.
Next, I added host1:0 foreign at the end of the /etc/X11/xdm/Xservers file. And finished up by adding host2 by itself on a line in /etc/X11/xdm/Xaccess to establish a direct XDMCP connection to my XDMCP client, host2.
Once configured, I killed the xdm server running on host1 (which was started by init?) and restarted it as root, # /usr/bin/xdm.
On host2 I started the X server manually using the command host2# /usr/bin/X -query host1
host1 presented the login screen on host2 (as I expected) and once logged in as test_user, my twm desktop appeared and I was able to work using it.
I logged out of host2, and rebooted both machines. After rebooting host1, xdm login appears, and I login in as a normal user. The host2 boots to the login prompt, and I login as root.
This time when I issue the #/usr/bin/X -query host1 ... starts up and crashes with the message host1 is unwilling to manage the Xsession.
After examining the files on host1, I kill the xdm process and restart it manually #/usr/bin/xdm as root. Now when I issue the #/usr/bin/X -query host1 on host2, everything works again.
So after thinking about this for a while, I think there is something different when xdm is started at boot time verses being manually started using /usr/bin/xdm.
Does this have something to do with the logind interface I read about in eselect news? If so, what do I have to do to get xdm to manage xservers without killing it and restarting it as root?
The Pi is running Gentoo 6.1.32-v8 and the x86 box 6.1.46-gentoo-x86_64
I'm confused
