Kodi

xinitrc
Both methods require you to create an xbmc user and place an .xinitrc:

First create the xbmc user

Via inittab
This is based on the way the mythtv ebuilds enable the autostart auf the mythtv frontend. But since XBMC is the better fronted, I want XBMC to autostart on boot. :)

Then create the login scripts

Finally add an inittab entry which does the autologin

Shutdown
Allow the xbmc user to issue an shutdown via polkit, resulting in a shutdown option in the XBMC menu:

For >=sys-auth/polkit-0.110 rules: