[Linux] HOW-TO make XBMC for Linux auto start on Ubuntu - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [Linux] HOW-TO make XBMC for Linux auto start on Ubuntu (/showthread.php?tid=38473)
HOW-TO make XBMC for Linux auto start on Ubuntu - MrCerulean - 2008-10-06 04:30
I built a media centre PC specifically to run XBMC on Linux. I'm using the PPA's on Hardy Heron (8.04). Since this box is only going to run XBMC, I thought I'd get it to power up, log in and fire up XBMC automatically.
Keep in mind that these steps are for Ubuntu. Other distro's may differ.
Login as the user who installed XBMC. I find it easier to do all this from my laptop, ssh'd in to the XBMC box.
Using your favourite editor, create a file in your home directory called .xinitrc that contains the following:
Make .xinitrc executable:
Edit your .bashrc and add the following as the last line:
Run rcconf and turn off gdm:
Change the line:
Reboot to test.
With this setup, you're not loading gdm or gnome. You're not loading a window manager. The load will be lighter and the boot process will be faster.
Please let me know if there are any questions! Thanks to AlTheKiller for some pointers.
- malloc - 2008-10-06 07:05
great howto. this would be great in the wiki. ask pike for ninja status if you'd like to contribute it and you need write access.
- althekiller - 2008-10-06 07:52
Looks good. I would however edit .bash_login instead of .bashrc and/or wrap launching startx with an "if x`pidof X` = ''x" ; then startx; fi" (or similar) to stop launching multiple instances if you open an xterm or login another tty.
- QuietTime - 2008-10-07 02:09
Forgive me for being a linux noob, but where should the first file you create (.xinitrc) be located?
- MrCerulean - 2008-10-07 17:39
The .xinitrc file should be in your home directory. I'll clarify that...
- proctor - 2008-10-08 00:42
Anyone know what to check to find out why I lose my sound when I set XBMC to autostart? The sound works if i go back to gdm.
- MrCerulean - 2008-10-08 01:29
Try renaming your .xinitrc to off.xinitrc (mv .xinitrc off.xinitrc). Reboot the system. You should wind up in a terminal logged in as your XBMC user. Run alsamixer and see if all the sound points are turned on.
To restore XBMC startup, mv off.xinitrc .xinitrc and reboot again.
- covert - 2008-10-08 06:41
My Ubuntu auto logs me in (mythbuntu). This is the default file that starts MythTV. Easy to change it to start XBMC..
- Chaos_666 - 2008-10-08 10:53
Great Howto, thats exactly how i solved this problem, before there was this howto.
But what happens if you press the Off Button on the remote or shuts it down via menu?
Here it quits xbmc but stays in X?!
Anyone knows a solution for that?
- proctor - 2008-10-08 16:15
MrCerulean Wrote:Try renaming your .xinitrc to off.xinitrc (mv .xinitrc off.xinitrc). Reboot the system. You should wind up in a terminal logged in as your XBMC user. Run alsamixer and see if all the sound points are turned on.
Thanks, I booted to terminal and found out that my user 'xbmc' was not a member of the 'audio' group.
I did: sudo adduser xbmc audio
Restarted and everything works as advertised.