RHEL 6 inittab
In RHEL 5 I use to be able to enter the following in the inittab file:
1:2345:respawn:/bin/su - joe "/usr/bin/startx" I tried something similar in RHEL 6's /etc/init/tty.conf. It is not working. I need X to start at boot up under as a particular user. Ideas how I might accomplish this under RHEL 6? |
Code:
perl -pi -e 's?^(exec\s+/sbin/mingetty\s+)(.*)?\1--autologin joe \2?' /etc/init/tty.conf |
Lazy
Thank you, for your response. I must be getting lazy not to have looked at the mingetty man page, --autologin was right there.
I ended up with the following in the tty.conf file: # tty - getty # # This service maintains a getty on the specified device. stop on runlevel [S016] respawn instance $TTY exec /sbin/mingetty /dev/tty1 exec /sbin/mingetty /dev/tty2 exec /sbin/mingetty --autologin idp /dev/tty3 and .bash_profile: if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty3 ]; then startx fi |
Other suggestions
I ended up changing the tty.conf file to:
stop on runlevel [S016] respawn instance $TTY exec /sbin/mingetty --autologin idp $TTY This article and follow ups shows some other ways of doing this: http://sudhaker.com/23/centos-rhel-6-autologin |
works for me!
Thank you for the .bash_profile snippet, I was wondering how I was going to restrict to one X session.
|
All times are GMT -5. The time now is 04:42 AM. |