LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-16-2012, 04:32 PM   #1
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 87

Rep: Reputation: 15
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?
 
Old 08-16-2012, 07:03 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,716

Rep: Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634
Code:
perl -pi -e 's?^(exec\s+/sbin/mingetty\s+)(.*)?\1--autologin joe \2?' /etc/init/tty.conf
Then just add startx to ~joe/.bash_profile I suppose
 
1 members found this post helpful.
Old 08-17-2012, 10:08 AM   #3
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 87

Original Poster
Rep: Reputation: 15
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
 
Old 08-17-2012, 12:12 PM   #4
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 87

Original Poster
Rep: Reputation: 15
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
 
Old 10-09-2013, 04:10 PM   #5
colossalman
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
Thumbs up works for me!

Thank you for the .bash_profile snippet, I was wondering how I was going to restrict to one X session.
 
  


Reply

Tags
red hat, xorg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade to RHEL 5.3 from RHEL 4.4 only using the kernel rpm of RHEL 5.3 rhystech Red Hat 4 05-28-2012 10:01 PM
inittab allensim81 Linux - Newbie 22 09-29-2009 04:12 AM
/etc/inittab cybersam45 Linux - Newbie 6 04-21-2009 06:29 AM
rc[0-6] and inittab kpachopoulos Linux - General 1 08-12-2005 04:27 PM
inittab mikedeatworld Linux - Software 3 08-13-2004 10:01 AM


All times are GMT -5. The time now is 07:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration