[mythtv-users] Autologin lost on upgrade to ubuntu 9.10

David eldavidillo at hotmail.com
Mon Feb 1 22:58:48 UTC 2010


*> On Tue, Jan 12, 2010 at 3:54 PM, Ross Campbell <ross.campbell at
gmail.com <http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users>>wrote:
>
>> On Tue, Jan 12, 2010 at 12:49 PM, sdavmor <sdavmor at systemstheory.net <http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users>>
>> wrote:
>>> Ross Campbell wrote:
>>>>
>>>> On Tue, Jan 12, 2010 at 11:42 AM, sdavmor
>>>> <sdavmor at systemstheory.net <http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users>> wrote:
>>>>>
>>>>> Stuart Larson wrote:
>>>>>>>>
>>>>>>>> One quick question since everything else on my upgrade from
>>>>>>>>  Ubuntu 9.04 to 9.10 went very well.
>>>>>>>>
>>>>>>>> Before the upgrade it would autologin and start mythtv. Now
>>>>>>>> I get the user login screen. Once I select the user
>>>>>>>> (there's only one on our media center server) and put in
>>>>>>>> the user password everything proceeds as before. Where do I
>>>>>>>> need to go to force-fix this so it starts up and logs
>>>>>>>> itself in as it used to do?
>>>>>>>
>>>>>>> If you are running mythbuntu on your Ubuntu system, you can
>>>>>>> just go to the mythbuntu control centre. There you can
>>>>>>> disable/enable the autologin. There is a way to manually do
>>>>>>> it as well but you can google that as easily as any of us.
>>>>>>
>>>>>> I googled it for the OP (I believe it's basically renaming the custom
>>>>>> config file in /etc/gdm to custom.conf, and ensuring
>>>>>> your username is in it.
>>>>
>>>> I believe some gnome behaviors changed between 9.04 and 9.10 that
>>>> have more subtle impact on the autologin functionality.
>>>>
>>>> In 9.04, I had autologin enabled, and whenever my myth box hung,
>>>> I'd hit ctrl-alt-backspace to restart the xserver. Autologin would
>>>> run a timer and then automatically start mythfrontend at end of
>>>> time if I did nothing. This was a simple "panic button" fix for
>>>> myhtv with a high WAF.
>>>>
>>>> With 9.10, initial boot autologin and start of mythfrontend works
>>>> as desired, HOWEVER... ctrl-alt-backspace is disabled by default.
>>>> After re-enabling it, I found that gdm doesn't auto-re-login, and
>>>> when I manually login, it doesn't auto-re-start mythfrontend.
>>>>
>>>> Anyone know how to change this back to the 9.04 behavior?
>>>>
>>>> Also, here's how to re-enable ctrl-alt-backspace -
>>>>
>>http://www.ubuntugeek.com/how-to-enabledisable-ctrlaltbackspace-in-ubuntu-9-10-karmic.html
>>>>  -- IMHO, this may be a useful default for mythbuntu.
>>>>
>>>> -Ross
>>>
>>> I haven't tested any of what is on this page, but this link provides
>>> info on "Frontend Auto Login". Option 3 for Karmic mentions dealing
>>> with mythfrontend crashes.
>>>
>>>
>>> http://www.mythtv.org/wiki/Frontend_Auto_Login#Note_on_Ubuntu_Karmic_.289.10.29
>> >
>>
>> different - that's just process restarting. I'm talking about dealing
>> with locked up x session by restarting x and having gdm ALWAYS
>> autologin (not just 1st boot)
>>
>> -Ross
>
>
> What I do is I set both timed and automatic login in custom.conf and it
> works.
>
> Just add the following lines to /etc/gdm/custom.conf
>
> [daemon]
> AutomaticLoginEnable=true
> AutomaticLogin=mythtv
> TimedLoginEnable=true
> TimedLogin=mythtv

*This one bit me today.

Even after editing /etc/gdm/custom.conf, autologin would work only on
the first boot.
If the mythtv user logs out then, it won't autologin again until gdm
is restarted.
Since this doesn't look like it's going to be fixed soon
<https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/499337>, I
gathered some <http://ubuntuforums.org/showthread.php?t=252935> tips
<http://digitalmoosetracks.com/blog/mythtv-tip-power-button> and found
a workaround.

First of all, edit the sudoers file to allow the mythtv user to
restart gdm without a password:
$ sudo visudo
Put this at the end of the file:
# user mythtv can use sudo to restart gdm without a password
mythtv ALL=NOPASSWD: /etc/init.d/gdm restart

Then, create the .gdmlogout script in the mythtv user's home dir
containing this:
#!/bin/bash
# restart gdm when logging out so autologin can kick in again
sudo /etc/init.d/gdm restart

Remember to make that script executable. Then tell gdm to run $HOME/.gdmlogout
whenever a user logs out, by editing /etc/gdm/PostSession/Default to
contain the following:
#!/bin/sh
logoutscript="$HOME/.gdmlogout";
if [ -x "$logoutscript" ] ; then
  su $USER -c "$logoutscript"
fi
exit 0

This way, when the mythtv user logs out, gdm will run
/home/mythtv/.gdmlogout, which
in turn will restart gdm via sudo, without asking for a password. Upon
gdm restart, autologin
will kick in again.

The rest of the users won't have a .gdmlogout script in their home dir, so
nothing will happen when they log out.

It works for me. Hope that helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100201/14d1a4b7/attachment-0001.htm>


More information about the mythtv-users mailing list