With my media computer coming together nicely, I wanted to remove all user intervention such that the computer will boot directly to XBMC. The two primary obstacles to this are automatically logging in the user and automatically starting a program once in XFCE.
I decided to use SLiM as my log-in manager since it is very lightweight and works well with the XFCE environment I’m using. SLiM has autologin behavior built-in, just edit /etc/slim.conf
default_user syzygy
auto_login yes
Of course, change the default user to your username. And thats it, you’ll now be logged in automagically. Now that we are logged into XFCE, I want to autostart XBMC. These instructions are specific to XFCE, but I’m sure there is a similar solution for KDE or Gnome. When XFCE starts, it looks in the ~./config/autostart/ directory and any scripts within are then executed when XFCE starts.
Now create a script. I’ve named mine autostart_xbmc, but the name does not matter:
$ cd ~./config/autostart/
$ echo "xbmc" > autostart_xbmc
Restart XFCE, and XBMC should automatically launch right after.