Mailing List Archive

Autostart of MythTV
Hello !

I've seen the following point in the documentation:

19.3: I'd like MythTV to automatically startup.

Interesting, but I presume that I must at least log in with your login and
password in xdm...

How could I configure my system to let it start everything without any user
action ?


(OK, it's a huge security hole, I must admit)




Thank you !





--
Open WebMail Project (http://openwebmail.org)
Debian Project (http://www.debian.org)

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Autostart of MythTV [ In reply to ]
On Wednesday 06 August 2003 16:44, Yannick wrote:
> Hello !
>
> I've seen the following point in the documentation:
>
> 19.3: I'd like MythTV to automatically startup.
>
> Interesting, but I presume that I must at least log in with your login
> and password in xdm...
>
> How could I configure my system to let it start everything without any
> user action ?

1. Create an auto-login executable (assuming you want to run as something
other than root):

int main () {
execlp ("login", "login", "-f", "username", 0);
}

2. Install this somewhere (e.g. /usr/local/bin)

3. Update inittab and set the terminal to point to your autologin executable:

c1:12345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologinusername 38400
tty1

(all in one line)

4. Update your .bash_profile, append something like:

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/vc/1 ]; then
startx
fi

5. Update your .xinitrc to something like:

fluxbox &
exec /usr/bin/mythfrontend &>/tmp/mythfrontend

(assuming you are using fluxbox)

In addition, mythbackend needs to run as well.

Somebody else might have an easier method, for instance using auto-login
features in kdm/xdm etc. The method I mentioned (shamelessly collected
through various hints elsewhere) should be fairly distribution and window
system agnostic.

Regards,

Marius Kjeldahl

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Autostart of MythTV [ In reply to ]
> Interesting, but I presume that I must at least log in with your login
and
> password in xdm...
>
> How could I configure my system to let it start everything without any
user
> action ?
>

kdm will permit autologins
don't ask me how to alter the config file, but on my system (gentoo) theres
a "kde login manager" program so u can click the button...

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Autostart of MythTV [ In reply to ]
Here's a more convoluted way: Don't use a graphical display manager.

1) copy this to autologinmythtv.c
/*----------------------- BEGIN ----------------------*/
int main(){
execlp( "login", "login", "-f", "mythtv",0);
}
/*----------------------- END ----------------------*/

2) then gcc -o autologinmythtv autologinmythtv.c
3) copy the resulting binary (autologinmythtv) to /usr/local/sbin

4) change /etc/inittab to autologin myth in run level 4
########################################################
replace: (in /etc/inittab)
1:2345:respawn:/sbin/getty 38400 tty1
with these two lines:
1:235:respawn:/sbin/getty 38400 tty1
myth:4:respawn:/sbin/getty -n -l /usr/local/sbin/autologinmythtv 38400 tty1
########################################################

5) change your initdefault thusly: (also in /etc/inittab)
########################################################
id:4:initdefault:
########################################################

6) Get rid of display managers in runlevels below 5
(they shouldnt be there anyway)
########################################################
rm /etc/rc[234].S99?dm
########################################################

7) Put this in the mythtv users ~/.profile (you will probably have to create it)
########################################################
/usr/bin/X11/startx
logout
########################################################

Now when the computer boots, It will go to run level 4, autologin mythtv,
start X-Windows and assuming you put mythfrontend in the mythtv users .xinitrc,
It will boot right into myth-frontend.

Then if you want to do maintenance chage the initdefault to 3 for text login
or to 5 for graphical logins.

--------------------------------------------------------------
James S. White GAPS Incorporated
james@jameswhite.org Electrical Engineer - Etc.
http://www.jameswhite.org Caffeine is my anti-drug.
--------------------------------------------------------------
I can picture in my mind a world without war, a world without hate.
And I can picture us attacking that world, because they'd never expect it.
-Jack Handy

On Wed, 6 Aug 2003, Mark Edwards wrote:

> > Interesting, but I presume that I must at least log in with your login
> and
> > password in xdm...
> >
> > How could I configure my system to let it start everything without any
> user
> > action ?
> >
>
> kdm will permit autologins
> don't ask me how to alter the config file, but on my system (gentoo) theres
> a "kde login manager" program so u can click the button...
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
Re: Autostart of MythTV [ In reply to ]
The way I did it on a Gentoo box was to change the initlevel to 3 (multiuser).
Then add this line:

su - mythuser -c "source /etc/profile && export HOME=~
&& /usr/X11R6/bin/startx"

to the /etc/conf.d/local.start (/etc/rc.d/rc.local on other distros). The
mythuser has a .xinitrc file that look like this:
xset -dpms s off
twm &
mythfrontend&

Reboot and enjoy!!

-lee

Quoting Yannick <ml.mythtv@free.fr>:

>
>
> Hello !
>
> I've seen the following point in the documentation:
>
> 19.3: I'd like MythTV to automatically startup.
>
> Interesting, but I presume that I must at least log in with your login and
> password in xdm...
>
> How could I configure my system to let it start everything without any user
> action ?
>
>
> (OK, it's a huge security hole, I must admit)
>
>
>
>
> Thank you !
>
>
>
>
>
> --
> Open WebMail Project (http://openwebmail.org)
> Debian Project (http://www.debian.org)
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users