Kodi Community Forum
Linux HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Linux HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based (/showthread.php?tid=141369)



RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - VanillaXtract - 2013-12-14

(2013-12-14, 13:38)gmain Wrote: Strange, I followed your guide as instructed. I'll give it another go, hopefully correctly this time. Thanks for your help and patience.
Wget the two amd64 files and the all.deb and install the kernel from nightly 3.13 kernel. Use the command from Post #1 just change 3.12 to 3.13


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - gmain - 2013-12-14

Thanks for your help. I've just got it all working using the same set of instructions but this time I had another audio device that I didn't notice before which had the master level muted.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-15

Classic, muted devices....


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Hack_kid - 2013-12-25

i'll be updating this script soon. the issue most of you are having where xbmc wont start after the script is ran is permissions issues. the script screws the permissions of your .xbmc folder. run this after the script

chown -R xbmc:xbmc /home/xbmc/.xbmc

and you should be all good. I added this to my script. also the upstart is not expeiremental i dont know why he has it marked like that. it is more stable and the correct way to start processes in ubuntu.

I'm a android developer so i know my way around linux. my username on xda is albinoman887, (might of heard of me) also anyone know who i can PM to change my username? i dont want to loose my join date etc

@uNiversal care to drop me a PM? got a question or two for ya

one last thing.....anyone try running ubuntu 13.10. I got it going but i think something about the policies for power managment changed as i can't shut down via xbmc and the option in gui is not read correctly. wondering if anyone else bumped into this or whats the verdict even with ubuntu 13.10. should i even worry about support?


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-26

@hack kid

/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla with should do it.
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesk​top.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Yes Upstart is best and safest and most efficient I use this in /etc/init/xbmc.conf

Code:
# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc

description     "XBMC-barebones-upstart-script"
author          "Matt Filetto - Tweaked by uNiversal"

start on (filesystem and stopped udevtrigger)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21

script
  #exec su -c "xinit /usr/bin/xbmc -d -- -nocursor :0" $USER
  exec su -c "xinit /usr/bin/xbmc -d --standalone -- -nocursor :0" $USER
end script

Sure ask away I dont enable pm's but sure ask away. This thread has been polouted with so much irrelevant crap in makes no difference.

Feel free to for my version of script on github and improve on it. I suspected as much that these directories you speak of need creating and chowning at beginning of process before installing xbmc.

I have a gist https://gist.github.com/uNiversaI/7734643 which is a rought step and https://github.com/uNiversaI/xbmc-ubuntu-minimal

Again just ask I will do what I can.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Hack_kid - 2013-12-27

(2013-12-26, 01:17)uNiversal Wrote: @hack kid

/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla with should do it.
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesk​top.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Yes Upstart is best and safest and most efficient I use this in /etc/init/xbmc.conf

Code:
# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc

description     "XBMC-barebones-upstart-script"
author          "Matt Filetto - Tweaked by uNiversal"

start on (filesystem and stopped udevtrigger)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21

script
  #exec su -c "xinit /usr/bin/xbmc -d -- -nocursor :0" $USER
  exec su -c "xinit /usr/bin/xbmc -d --standalone -- -nocursor :0" $USER
end script

Sure ask away I dont enable pm's but sure ask away. This thread has been polouted with so much irrelevant crap in makes no difference.

Feel free to for my version of script on github and improve on it. I suspected as much that these directories you speak of need creating and chowning at beginning of process before installing xbmc.

I have a gist https://gist.github.com/uNiversaI/7734643 which is a rought step and https://github.com/uNiversaI/xbmc-ubuntu-minimal

Again just ask I will do what I can.

alright cool. Yeah i got reboot and shudown working by install consolekit. i ran that policykit actions test command (cant remember it off hand) and it was missing the consolekit related policies so i installed them manually. only thing now is suspend. also looking at your init script, what is the limit nice 21 21 for? i'm assuming nice level but just wondering since we set this elsewhere.

oh and what is the -d option in the exec line? is that an xbmc related switch or for xinit?


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-27

The limit nice 21 21 can be removed not required I was experimenting with that. What your talking about is /etc/security/limits,conf which sets nice -1 (thats option to allow XBMC to request a nice level but you can set whatever level you want.

-d that is the debug? If I remember correctly ( I compile XBMC from source and I cannot get it to use GDB when it crashes) Never was able to resolve that.

-- -nocursor removes the X cursor from XBMC startup (for ppl using mouse not a good idea but I hate mouse + xbmc)

So, you wanna work on improving the script?


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Hack_kid - 2013-12-27

wget https://github.com/Albinoman887/xbmc-ubuntu-minimal/raw/master/12.10/prepare_xbmc_install.sh

Smile

(2013-12-27, 11:07)uNiversal Wrote: The limit nice 21 21 can be removed not required I was experimenting with that. What your talking about is /etc/security/limits,conf which sets nice -1 (thats option to allow XBMC to request a nice level but you can set whatever level you want.

-d that is the debug? If I remember correctly ( I compile XBMC from source and I cannot get it to use GDB when it crashes) Never was able to resolve that.

-- -nocursor removes the X cursor from XBMC startup (for ppl using mouse not a good idea but I hate mouse + xbmc)

So, you wanna work on improving the script?

i forked the original github of this instead of yours just for sake of making things easier to revert if there are issues. i'll go through yours and if there is anything it has that this version doesnt i'll for sure add it...

(oh and i know the script still grabs all the config files from bran77's github. this is a rough draft

also anyone know how or who i need to pm to get my username changed. i'm yrs old now. i cant be going by Hack_kid lmao


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-27

Well Bram77 script is full of bugs that mine already fixed and I already added many other fixes from other forks though it is a big huge pita for ATI and Intel

TBH I dont think running the script from root is a good idea it needs to be ran from xbmc user in the fresh install anything else likely will fail because of this.

Anyway I made last patches and fixes, you're welcome to take in on, I just dont have the necessary skills to undertake the stuff that needs doing, not to mention lack of interest.

Would I be more proficient I would remove ATI and INTEL support completely, as cannot test since unlikely to buy a machine of each just to test.

For username changes see website and forums sub-forum or PM a moderator.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - fritsch - 2013-12-27

That's wrong.

You copied the limit nice 21 21 from my upstart script over at the radeon thread without knowing what it does. Some background: upstart does not read mod pam, therefore the /etc/security/limits.conf does not get applied at all. Therefore you need that workaround it in the upstart config. The goal behind that is to allow the AESink thread to have higher priority.

So, if you start xbmc via upstart, you will need both (security limits and the limit nice in upstart)


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-27

Thanks fritsch see https://github.com/uNiversaI/xbmc-ubuntu-minimal/commit/4a3d1efdc17198db77d2611e96004e1ec7cd30ed
will do though my xbmc runs at nice level of 20 and haven't noticed any higher priority changes via this.

Do you have any idea about why compiled from source XBMC doesnt output GDB into crashlogs or where to look why it doesnt? GDB is installed.
I am able to get GDB output by starting XBMC with gdb option but otherwise not and cant leave it because otherwise its always filtered through gdb and drag on resources.

Im trying to make it work like ppa compiled packages but no I wont use ppa because it doesnt compile and pull patches for testing and cannot be reliant on ppa do do these jobs.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - fritsch - 2013-12-27

Open your own ppa and upload specific version.

We do this with all fernetmenta code. Wsnipex is packaging them automatically every night. Same btw. with xbmc nightlies.

Edit: Concerning the priority. Show the threads with ps and compare priorities. It's not about the primary xbmc.bin. Audio should have 21.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-27

I tried ppas a while back and its way too much time consuming and slower, sometimes need to wait hours sometimes in excess of 8 hours, have experienced more, before job gets started by compile machines at best its 2 hours 1 hour... By then including uploading which is slow as hell, terrible idea for this.

The right tool for job is indeed compiling locally, though I could test with checkinstall and see if makes a dif.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-12-27

@fritsch seems if you use upstart even with the exec stanza inserting gdb is not possible. I read a few google results and it all starts going a bit too technical not long after.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - fritsch - 2013-12-27

That's not related and was not meant as a solution. If you need to run through gdb, start it manually from e.g. fluxbox.