Kodi

Kodi (formerly XBMC) is Article description::an open source home theater application.

Create user
First create the user:

To add support for HDMI CEC:

OpenRC + xinit
Then define the Kodi file with the following contents:

Set the appropriate permissions:

And tell OpenRC to start it on boot:

Using inittab
First create the user (see above). This is based on the way the MythTV ebuilds enable the autostart of the MythTV frontend.

Define an file in 's home:

Then create the login scripts:

Finally append an inittab entry which does the autologin:

Gentoo Hardened
Running Kodi on a Hardened Gentoo installation is possible. To avoid grsecurity interfering with network connectivity, the CONFIG_GRKERNSEC_PROC_USER kernel option must not be enabled.

Should you require a restricted filesystem, use CONFIG_GRKERNSEC_PROC_USERGROUP and set GRKERNSEC_PROC_GID to the ID of a group that the user running Kodi is a member of.

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

External resources

 * Unofficial Kodi Overlay