On 11/28/05, Robin Gilks <[EMAIL PROTECTED]> wrote: > > > This is probably easy, but I can't think of an obvious way to > > automatically > > login as a user. From that point you need to start X and mythfrontend, > > but > > that is probably easy as long as one can figure out how to execute a > > script > > as a particular user. > > > > The overall idea is to have the system get to the point that you can use > > the > > remote automatically after you turn it on. I'm using Gentoo Linux. This > > shouldn't be that hard, but I just don't see an obvious starting point > > other > > than maybe figuring out the init process from inittab or maybe something > > like > > xdm that does autologins. > > > > I'm running gentoo on a keyboardless/mouseless box so this is what I came > up with. > > If not already using it, emerge mingetty and put the following into > /etc/inittab - this will log you in as the mythtv user: > c7:12345:respawn:/sbin/mingetty --autologin=mythtv tty7 > > Next, make sure that you have a home directory for the mythtv user in > /etc/passwd: > mythtv:x:1000:100::/home/mythtv:/bin/bash > > In that home directory, create a .bash_profile file like this - this > starts up X only if running on vertual terminal 7, so if you telnet or ssh > into the box it doesn't throw a wobbly. It also restarts X if the frontend > crashes: > if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty7 ]; then > while [ 1 == 1 ] > do > startx > sleep 10 > done > fi > > The next step is to get X to start up a window manager and the mythtv > frontend. This is done in .xinitrc which should contain something like > this. Note that by uncommenting a line or two I can also run up the setup > or an xterm: > xset -dpms s off > xsetroot -solid black > x11vnc -many -q -bg -rfbauth .vnc/passwd > fvwm2 & > mythfrontend > /home/mythtv/mythfrontend.log 2>&1 > #mythtv-setup > #xterm > > Finally, a bit of fine tuning of the window manager (fvwm2 in my case but > other lightweight ones could be used). This is my .fvwm2rc file: > # 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 > > > Enjoy... > > -- > Robin Gilks >
Fantastic! Thanks Robin. Very clean and easy. For the archives, I had a small problem where mythtv was getting logged in, but X wasn't starting. The only thing I had to change was: if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty7 ]; then to if [ -z "$DISPLAY" ] && [ $(tty) == /dev/vc/7 ]; then and it worked like a charm. Thanks much! Phill W. _______________________________________________ mythtv-users mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
