According to Montana Quiring:
There's a possible race condition there, I think, so it's perhaps not the safest way to do it. Using "exec startx" might be better, since startx would then replace the login shell, so there's no bash prompt (since there's no more login shell) to return to.
I don't think the tty is strictly needed here. See below...
This is what is in my /etc/inttab: id:2:initdefault
This says the default run level is 2, so only inittab entries with a 2 in their run level list will be considered...
These will work, since 2 is among their list of run levels.
x:5:respawn:/usr/X11R6/bin/startx > tty1
This line will only work at run level 5, so you can either...
- change that to a 2, so it runs at the default run level,
- change the initdefault line to use run level 5, but that might break other things...
- have a command run somewhere at the end of all the run level 2 stuff, which says "/sbin/init 5" to change the run level. That's rather convoluted, though. (But it's similar to what Solaris's init scripts do.)
Thanks for your patience. I haven't worked with inittab much in the past, so this has been a real learning experience for me.
It's worth a careful read of the init(8) and inittab(5) man pages, to better understand the concepts behind it. After than, the setup makes more sense.
Good information. Thanks.
If I put this line in /etc/inittab: x:2:respawn:/usr/X11R6/bin/startx > tty1 or x:2:respawn:/usr/X11R6/bin/startx
I get this error after it boots up: /usr/X11R6/bin/startx: line xxx: xinit: command not found /usr/X11R6/bin/startx: line xxx: xauth: command not found (xxx being a number in the 100's)
This led me to look at the startx script and I figured out that xauth and xinit were scripts in /usr/X11R6/bin/ that were not in the path when inittab was being run.
So I edited startx and made the first line: export PATH=$PATH:/usr/X11R6/bin/
Now X starts but it starts as root. *Insert frown here* I guess this makes sense because inittab is run as root, right?
So I edited the /etc/inittab again and changed the line to: x:2:respawn:/usr/bin/sudo -H -u me /usr/X11R6/bin/startx
and I added this to sudoers: me ALL=NOPASSWD: /usr/X11R6/bin/startx
but I get this error on bootup: X: user not authorized to run the X server, aborting. xinit: Server error.
Gee wizz this has been a pain.
-Montana
"When I give, I give myself. -Walt Whitman