Linux Ubuntu 12.10 and XBMC autostart not working
#1
I'm reasonably new to the world of Linux so please bear with me.

I'm running Ubuntu 12.10 desktop 64-bit. I've installed the latest version of XBMC (Eden). Everything seems to be working great (I love this app!).

The only small issue I'm running into is that I can't figure out how to make XBMC launch automatically on boot/restart. In the 'Startup Applications Preferences' dialog in Ubuntu I have added a new launcher with the command
Code:
/usr/bin/xbmc
and ticked the checkbox next to it. When I restart though XBMC doesn't launch. I know this is the correct path because I ran
Code:
which xbmc
in the Terminal to confirm it.

Am I doing something really stupid here? How come XBMC won't launch automatically? It works fine if I click its icon in the dock.

Many thanks,

FieldDoc
Reply
#2
Look at the minimal inall script on my signature.

It should take care of that for you no problems.

uNi
Reply
#3
Thanks for the quick reply uNiversal.

I have everything setup vert precisely at the moment and am hesitant to change too much. That script seems great but very complicated. Is there a simpler way to to autostart without changing my system too much using your full script?
Reply
#4
Some things to try:
  • Try running /usr/bin/xbmc in a terminal window and see if XBMC launches.
  • Review your startup applications to confirm that your entry for XBMC still has the checkbox selected.
  • Try adding another startup application. Choose an innocuous application such a web browser or text editor. Reboot your PC and see if this other application launches automatically.
Reply
#5
Here's something to look at.

http://forum.xbmc.org/showthread.php?tid=38473

and here

http://ubuntuforums.org/showthread.php?t=1710258

I dont really use xbmc + Full desktop or window managers.

My xbmc is being started with a upstart+xinit script very tiny one. disseminated the script are extract that part as below. Which I post for information only. Use if you like.

Created a /etc/init/xbmc.conf with contents.

Code:
# xbmc-upstart
# starts XBMC on startup using xinit and the startx command. Runs as xbmc as user
description     "XBMC-barebones-upstart-script"
author          "Matt Filetto"

start on (filesystem and stopped udevtrigger)

stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn

script
  exec su -c "xinit /usr/bin/xbmc --standalone :0" xbmc
end script

We sym link for legacy purposes and make sure that X is allowed everyone to use it.

Code:
sudo ln -s /lib/init/upstart-job /etc/init.d/xbmc
sudo sh -c 'echo "allowed_users=anybody" >> /etc/X11/Xwrapper.config'

Obviously Desktop behaves differently. but these changes can be easily undone.

Also I added xbmc to necessary groups e.g. audio/video etc.
Code:
sudo usermod --group adm,sudo,cdrom,audio,video,plugdev,fuse xbmc
sudo adduser xbmc users

That's the short short version...

uNi


Reply
#6
Thanks for the help so far - I think I'm going to reinstall and try Bram77's script to see if that will work.
Reply
#7
That's what I used with Ubuntu 12.04 mini (I used 32 bit cause I only have 4Gb ram and 12.04 because I prefer LTS releases), in fact the init script I posted has been included in in bram77 script as the upstart option.

idk if the script works with full desktop stuff, but it certainly works in with the mini install options.

I tested the script to death and afetr adding some tweaks for my system (which are in my signature) I can say everything is perfect.

One thing I veered off script is I compile xbmc from master git, I removed the ppa version, either works fine though I rather use recent code for bugfixes.

* un1versal wishing FieldDoc good luck and success.

uNi

Reply
#8
Hi uNiversal!

I used description of XBMC autostart, as you written above (I have full Ubuntu 12.10 with desktop).

After start, XBMC launch automaticly at fullscreen - thats ok.

But when I click on power button in XBMC, theres only Restart, Suspend and Exit buttons. Turn off (and maybe any other) button disappear!
And when I click on Exit, XBMC exit but Ubuntu desktop doesnt start (theres only black screen with cursor). My idea is, when I exit from XBMC it automatic return to Ubuntu desktop.
Reply
#9
the xinit method is not good for your usecase.

Use step 4 from http://forum.xbmc.org/showthread.php?tid=116996
Using lightdm, you will be dropped back to the login screen when exiting xbmc
Reply
#10
When I edit /etc/lightdm/lightdm.conf (/usr/share/xsessions/XBMC.desktop allready exist in desired content) and restart PC, only Ubuntu started (not XBMC).

Is necessary to change also any other file, or where I made mistake?
Reply
#11
logout, select the xbmc session, reboot. It should auto start xbmc.

Lightdm(and most other desktop managers) auto save the last used session as default.
Reply
#12
when I logout frum Ubuntu desktop it blink to black screen with warning "The system is running in low-graphic mode" and when I click OK it show window: "Stand by one minute while the display restarts..." and nothing more happend. I waited 10min and nothing.
Im not sure where is the problem Sad

In /var/log/Xorg.0.log is this: http://xbmclogs.com/show.php?id=9159
Reply
#13
Were you able to get this working on Ubuntu 12.10 (which uses LightDM)?
I have created the lightdm.conf and XBMC.desktop files as instructed in step 4 of this guide, but I am still brought to the regular Ubuntu desktop upon login. Even after I log out and then log back in explicitly choosing the "XBMC" session.

Any ideas?
Reply
#14
Finaly I used easiest solution - add XBMC to program startup (in Ubuntu) with command -fs (fullscreen) which work for me fine.Its only neccessary to turn on TV first, then PC.
Reply
#15
Hmm ok, thanks.

Thats what I have now, but XBMC is the only desktop-program I use on this machine so I'd like to have lightdm start right into XBMC for me..
If anyone who knows how to make this happen on Ubuntu 12.10, please chime in!

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 12.10 and XBMC autostart not working0