Difference between revisions of "Frontend Auto Login"

From MythTV Official Wiki
Jump to: navigation, search
 
Line 1: Line 1:
{{inuse}}
 
 
= Auto Login=
 
= Auto Login=
 
Part of a proper frontend system is having it automatically login as the mythtv user and loading mythfrontend. There are a variety of methods to do this. KDM allows for auto-login, but doesn't handle mythfrontend crashes well. The best method is  to use inittab to login the user straight into mythfrontend.  
 
Part of a proper frontend system is having it automatically login as the mythtv user and loading mythfrontend. There are a variety of methods to do this. KDM allows for auto-login, but doesn't handle mythfrontend crashes well. The best method is  to use inittab to login the user straight into mythfrontend.  

Revision as of 15:41, 11 January 2006

Auto Login

Part of a proper frontend system is having it automatically login as the mythtv user and loading mythfrontend. There are a variety of methods to do this. KDM allows for auto-login, but doesn't handle mythfrontend crashes well. The best method is to use inittab to login the user straight into mythfrontend.

Setup

First you will need to make sure you have mingetty installed. Next, make sure you have a dedicated user to run the mythfrontend wth a home directory.

inittab

Add the following line to your '/etc/inittab' file,

c7:12345:respawn:/sbin/mingetty --autologin=mythtv tty7

This is what will login the mythtv user.

MythTV User setup

Now we will setup the mythtv user,

.bash_profile

In that home directory, create/edit a .bash_profile file like this,

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty7 ]; then
:while [ 1 == 1 ]
:do
:::startx
:::sleep 10
:done
fi

this will start X only if running on virtual terminal 7, so if you telnet or ssh into the box it will not react strnge. It will also restart X if the frontend crashes.

.xinitrc

There are two options for .xinitrc, one will load a window manager, the other will not.

No Window Manager

For no windowmanager, create/edit the user's .xinitrc and add,

xset -dpms s off
xsetroot -solid black
mythfrontend -v -l /home/mythtv/mythfrontend.log
#mythtv-setup
#xterm

This will turn off dpms, turn the X default background color black, turn verbose logging on, and log everything to /home/mythtv/mythfrontend.log, this can be changed. Also included is an easy way to access mythtv-setup or xterm, just uncomment the appropriate line and comment out the mythfrontend line.

fvwm

To use fvwm, edit your .xinitrc like,

xset -dpms s off
xsetroot -solid black
x11vnc -many -q -bg -rfbauth .vnc/passwd
fvwm2 &
mythfrontend -v -l /home/mythtv/mythfrontend.log 2>&1
#mythtv-setup
#xterm

Next edit your .fvwm2rc,

# Submitted by Scott Elliott <selliott at insight.rr.com>
Style "*" RandomPlacement, DumbPlacement
Style myth* NoTitle, NoHandles, Sticky, WindowListSkip, SloppyFocus,
GrabFocus, BorderWidth 0
Style xmame* NoTitle, NoHandles, Sticky, WindowListSkip, SloppyFocus,
GrabFocus, BorderWidth 0, StaysOnTop
Style mplayer* NoTitle, NoHandles, Sticky, WindowListSkip, SloppyFocus,
GrabFocus, BorderWidth 0



--Steveadeff 15:40, 11 January 2006 (UTC)