In my myth frontend I wanted to have the system automaticaly login and start X as a user. With Fedora13 they moved a few things around so its not as easy as it used to be (editing inittab). This method even respawns the processes if terminated and does not use a heavy windows manager like KDE or Gnome.

To automaticaly log a user into console:
create a NEW FILE in /etc/init/tty6.conf


start on runlevel [23]
stop on runlevel [!23]

exec /sbin/mingetty --autologin=root tty6

Now when you boot console tty6 (alt+f6) will be logged in root (or any user you specified)

Note you dont have to use tty6, you can use any tty. IF you wish to reduce the amout of TTYs fedora launches edit /etc/sysconfig/init and change ACTIVE_CONSOLES=/dev/tty[1-6]

Start x automatically
Edit your ~/.bash_profile
This is like AutoExec.bat in the old dos sytems. remember that ~ in this case is the home directory of the user that is LOGGING IN not yours.
It should look as follows


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs


export PATH

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty6 ]; then
while [ 1 == 1 ]
sleep 10


Note: The if [ -z “$DISPLAY” ] && [ $(tty) == /dev/tty6 ]; then is set for tty6, if you selected a differn TTY change it to whatever tty you specified above. This ensures that only THAT console starts x automatical, not any other one that you log in on (ie ssh)

Finally to start X software edit your ~/.xinitrc with the files you want to run in X

Remember to & everything except the main application

Below is my xinitrc it starts blackbox (light windows manager probably not needed anymore) turns of auto-display shutoff. Starts irexec and finally launches mythfront end storing the log file in the home directory. After myth finishes it will rotate the logs.

blackbox &
set -dpms s off
irexec &
#nvidia-settings -l
mythfrontend -l $HOME/mythfrontend.log

for i in 5 4 3 2 1 ; do
if [ -f mythfrontend.log.$i ]; then
mv -f mythfrontend.log.$i mythfrontend.log.$(($i + 1))


Thats all therse to it

Leave a Reply

Your email address will not be published.