Linux XBMC Stand-alone startup script.....
#1
I have just my Revo machine upgraded to Precise Pangolin and everything working with Eden Stable. My final issue to resolve is with the startup script.
XBMC does not start automatically as it did before. It looks like it tries but fails because it can't start the X server.

Issueing the command "xbmc" from an ssh session says it cannot find X server. However, if I run:

Code:
xinit /usr/bin/xbmc --standalone --no-test

XBMC then fires right up and works flawlessy,

My other concern is this the below output when running the above command:

Code:
xbmc@XBMC:~$ xinit /usr/bin/xbmc --standalone --no-test


X.Org X Server 1.11.3
Release Date: 2011-12-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-31-server i686 Ubuntu
Current Operating System: Linux XBMC 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:51:22 UTC 2012 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-24-generic root=UUID=40a39129-0592-4ee0-8994-a7fa05940b44 ro quiet splash xbmc=autostart,noredir loglevel=0 vt.handoff=7
Build Date: 07 May 2012  11:39:37PM
xorg-server 2:1.11.4-0ubuntu10.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.24.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Jun 11 18:31:17 2012
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Home directory /home/xbmc not ours.
Home directory /home/xbmc not ours.
there is no soundcard
Home directory /home/xbmc not ours.
there is no soundcard
no talloc stackframe around, leaking memory
,
It complains about the /home/xbmc directory, and states there is not soundcard. However, sound works great once XBMC is launched, DTS and all. Second, I'm not sure what the leaking memory error is about, but memory leak is not good. Any idea what file I need to edit to get my autostart working again? I know it used to be in /etc/init.d/ but not anymore since dharma...........and that was the last time I touched it. Any help appreciated.
Image
Reply
#2
http://wiki.xbmc.org/index.php?title=HOW...nit_script
Reply
#3
Ok, I got my startup script going thanks to furlii's link, but now when I execute that script it complains about permissions opening the process id file at /var/run/xbmc.pid.

I can do a: sudo chmod 777 -R /var/run and the script has permission to write to that location and xbmc starts up..........but as soon as I reboot the system, the permission on /var/run, revert back and attempting to start my script throws the same permissions error. How can I permanently give the xbmc user write access to /var/run so that it can create the necessary xbmc.pid file?

-hogfan
Image
Reply
#4
Hogfan - would you mind posting the output of your /etc/init.d/xbmc script

just followed the same guide to get xbmc to autostart on 12.04 server but it just not doing it

The settings seem Ok - theres no error or anything

Thanks
Reply
#5
(2012-06-12, 16:56)hogfan Wrote: Ok, I got my startup script going thanks to furlii's link, but now when I execute that script it complains about permissions opening the process id file at /var/run/xbmc.pid.

I can do a: sudo chmod 777 -R /var/run and the script has permission to write to that location and xbmc starts up..........but as soon as I reboot the system, the permission on /var/run, revert back and attempting to start my script throws the same permissions error. How can I permanently give the xbmc user write access to /var/run so that it can create the necessary xbmc.pid file?

-hogfan

just change the PID_FILE= location in the script to be somewhere your xbmc user has access to.
Reply
#6
so updating the options is wonderful, i changed the PID_FILE location to /home/xbmc

"testing the script" part however, it falls down:

root@XBMCLive:/etc/init.d# /etc/init.d/xbmc start
Starting XBMC
/usr/bin/xinit already running.

root@XBMCLive:/etc/init.d# /etc/init.d/xbmc stop
Stopping XBMC

root@XBMCLive:/etc/init.d#


As you can see it states that its starting XBMC, but i remain on the command prompt?
Reply
#7
Same here, still hung at a prompt that says "Starting XBMC....." I'm still trying to get a working startup script. I was going to just try installing XBMCbuntu but the Acer revo apparently hates it on a USB drive. Couldn't get it to boot with Unetbootin or Linux Live Installer.

--hogfan
Image
Reply
#8
Please help. I made the mistake of adding the kodi wiki autostart script: Upstart Init Script. All I did was the first step of creating an /etc/init/kodi.conf file with the script to run standalone. Now I'm having a hell of a time because I can't get out of Kodi and can't use my Ubuntu. I guess I should say I installed Kodi on a desktop computer running Ubuntu 14.04 LTS. Now Kodi autostarts in standalone mode and when I exit it goes to the gnome login screen but I can't log in with my username to Ubuntu. It just automatically goes back to Kodi. I booted into terminal and logged in and deleted the kodi.conf file I had created, but it still keeps booting only to Kodi.

All I want to do is get back to a normal Ubuntu start without Kodi autostarting. Can anyone help me get rid of that?

I don't know what the script did, but it really messed up my computer.
Reply
#9
Well...I would think it won't autostart if it isn't there anymore...so I guess a

Code:
sudo apt-get purge kodi

could help. But it deinstalls Kodi. This might help, too: http://kodi.wiki/view/HOW-TO:Install_XBM...installing

After this you can take a look if something is in there which causes Kodi to autostart.
Reply
#10
press CTRL+ALT+F1, login to the shell, then simply delete the upstart script.
Reply
#11
@ wsnipex:

Quote:I booted into terminal and logged in and deleted the kodi.conf file I had created, but it still keeps booting only to Kodi.

Seems he already did. That's why I suggested to deinstall Kodi
Reply
#12
where does he say he deleted that file? It wouldn't autorestart in that case
Reply
#13
Seems to me these people are using init script + upstart script and making a mess of things due to probably using the scripts without modifying them for kodi and probably doing something else which is odd.

Since I dont know what these people are doing I suggest them to delete any scripts they added and just use upstart script.
Reply
#14
I think I wrote clearly that the script I installed was "Upstart Init Script." I just installed that one because it looked like the simplest. Also, I didn't want to deinstall or purge Kodi because it was working perfectly until I added the script. That script is not part of or "in" Kodi. It is really a Ubuntu startup script problem. Anyway, thanks for your comments and help. I finally went over to the Ubuntu forum and asked for help there and resolved the problem pretty quickly.

Oh, one more thing. I also stated that I had installed Kodi on a desktop computer running Ubuntu. Now I see that if you had a TV box on which you only wanted to run Kodi, that script would be great.
Reply
#15
Code:
root@XBMCLive:/etc/init.d# /etc/init.d/xbmc stop
Stopping XBMC

Is not the upstart script.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC Stand-alone startup script.....0