You are not logged in.

#1 2014-08-03 13:54:21

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Autostarting XBMC with a LightDM session

Following https://bugs.archlinux.org/task/41391, I decided to use a lightweight DM to set up an X sesstion for XBMC instead of hacking around a more secure X server.

I found that LightDM would be the best option to autologin and start XBMC as it should, do I installed lightdm and its GTK2 greeter (because it seems that carries the least amount of dependencies with it on this Media Center server).

I modified /etc/lightdm/lightdm.conf to read:

[SeatDefaults]
autologin-user=xbmc
autologin-user-timeout=0
user-session=XBMC
greeter-session=lightdm-gtk-greeter

and ensured /usr/share/xsessions/XBMC.desktop contains:

[Desktop Entry]
Name=XBMC
Comment=This session will start XBMC Media Center
Exec=xbmc-standalone
TryExec=xbmc-standalone
Type=Application

As discussed here.

I added an autologin group and made the xbmc user a part of it:

groupadd autologin
usermod -a -G autologin xbmc

Starting the lightdm service, it starts, but login fails and all I see on the screen is the LightDM greeter screen.
journalctl -u lightdm gives me this output:

aug 03 15:42:09 arch-htpc lightdm[289]: ** (lightdm:289): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
aug 03 15:42:09 arch-htpc lightdm[310]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was met by user "xbmc"
aug 03 15:42:09 arch-htpc lightdm[289]: ** (process:310): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
aug 03 15:42:09 arch-htpc lightdm[310]: pam_unix(lightdm-autologin:session): session opened for user xbmc by (uid=0)
aug 03 15:42:10 arch-htpc lightdm[289]: ** (process:336): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
aug 03 15:42:10 arch-htpc lightdm[336]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)

It seems some (optional?) dependency wasn't installed. lightdm does not have any optional dependencies, so I have no idea where to start looking. Any help is appreciated.

Last edited by rubenvb (2014-08-03 13:58:51)

Offline

#2 2014-08-06 09:58:01

BlackIkeEagle
Package Maintainer (PM)
From: Belgium
Registered: 2008-09-24
Posts: 78

Re: Autostarting XBMC with a LightDM session

I have the following in my lightdm.conf

[SeatDefaults]
session-wrapper=/etc/lightdm/Xsession
pam-service=lightdm-autologin
autologin-user=xbmc
autologin-user-timeout=0
user-session=XBMC
aug 06 08:25:44 BlackHawk lightdm[237]: ** (lightdm:237): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: 
aug 06 08:26:02 BlackHawk lightdm[407]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was met by user "xbmc"
aug 06 08:26:02 BlackHawk lightdm[237]: ** (process:407): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: 
aug 06 08:26:02 BlackHawk lightdm[407]: pam_unix(lightdm-autologin:session): session opened for user xbmc by (uid=0)

And it works just fine, the only thing is that time from boot -> xbmc is longer than before with the xbmc.service


- Arch64 / Arch32 -- Desktops & Mediacenters & Laptops & home Servers
- MyAUR
- MyArchWiki
- pgp key: 0x796CA067

Offline

#3 2014-08-06 12:12:52

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Re: Autostarting XBMC with a LightDM session

Thanks! I was missing one line:

session-wrapper=/etc/lightdm/Xsession

I don't know about slow boot, this is my systemd-analyze output:

 2.862s mnt-NAS.mount
 2.125s netctl@ethernet.service
  368ms transmission.service
  250ms ufw.service
  171ms lightdm.service
   77ms accounts-daemon.service
   71ms alsa-restore.service
   71ms systemd-logind.service
   ...

I also installed the "accountsservice" package to get rid of the warnings you show.

Offline

Board footer

Powered by FluxBB