Right, X is running if the init runlevel is 5. I had assumed, maybe incorrectly, that it would be easier to use a runlevel 3 or 4 and then start the x server manually. One possibility that I am loathe to try is just installing gdm and booting to runlevel 5. I understand built into gdm is the ability to autologin a particular user. I'm loathe to do it because there is a fair amount of bloat with gdm that will never be used on this toy of a pc and since it is currently pretty bare-bones, it will probably be a pain to install. But I guess it is an option if nothing else works out.
One suggestion was to create a dummy user ("idiot") and run the following command from the rc.local script:
su - idiot -c "startx > /dev/console 2>&1" &
an alternate suggestion was to edit rc.local and idiot's .bash_profile.
echo "Autologin of user idiot."
su - idiot
if [ "`tty`" = "/dev/console" -o "`tty`" = "/dev/tty0" ]
Unfortunately, both fail. Even executing either command from the command line fails. For example, as root, running 'su - idiot -c "startx"' will fail with the following error:
Fatal Server Error:
PAM authentication failed, cannot start X server,
Perhaps you do not have console ownership
That error is the same if either method (which are virtually the same) is run from rc.local . If run at startup, the error is proceeded by "-bash: no job control in this shell".
I have had some success from the command line with:
su - idiot -c "xinit /usr/bin/<program I want to autostart>"
However when I put it into the rc.local script, the same PAM error occurs. I'm going to read up on PAM and 'su'. Does anyone have any insight?