• 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 90
Linux HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based
(2012-10-17, 23:17)Hack_kid Wrote: yeah dude its the solid state
heres finished version with user variable and i got rid of startx since xinit does the same thing ?

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"

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" $USER
end script


This is great work, not only eliminating the idle startx middle-man, if only we can control start | Stop | restart not via /etc/init.d/ stop but rather stop | start | restart xbmc, as well as making sure xbmc is starting at the correct TTY like it was already said., I think the other did this too., its useful if you want to compile or have multiple xbmc installs ++++1 the hack-kid strikes again! Good work man.

Where can we + someoneHuh Cant see it

I digress.

uNi
Reply
Does this script support libcec?
Reply
(2012-10-18, 05:46)PANiCnz Wrote: Does this script support libcec?

The XBMC packages installed are from XVBA support it but you must install the library (I think), here are the package names:
Code:
cec-utils USB CEC Adaptor communication Library (utility programs)

libcec Transitional package libcec.

libcec-dev USB CEC Adaptor communication Library (development files)

libcec1
Reply
(2012-10-18, 02:14)uNiversal Wrote: Where can we + someoneHuh Cant see it

Check the bottom left corner of the post, there's "+/-" button.
|
|
\/
Reply
PM FIND
QUOTE QUOTE+ REPORT

I cant see a +/-

Need glasses or the hubble telescope :/

EDIT: You need 100 posts for +/- to show up! wth, lame
Reply
I had already planned to add optional libcec installation support. I'll include it in the next version.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
(2012-10-18, 02:14)uNiversal Wrote:
(2012-10-17, 23:17)Hack_kid Wrote: yeah dude its the solid state
heres finished version with user variable and i got rid of startx since xinit does the same thing ?

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"

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" $USER
end script


This is great work, not only eliminating the idle startx middle-man, if only we can control start | Stop | restart not via /etc/init.d/ stop but rather stop | start | restart xbmc, as well as making sure xbmc is starting at the correct TTY like it was already said., I think the other did this too., its useful if you want to compile or have multiple xbmc installs ++++1 the hack-kid strikes again! Good work man.

Where can we + someoneHuh Cant see it

I digress.

uNi

have you even used the script? it has all of these things except the tty thing. it goes in etc/ini not etc/init.d the init.d/xbmc can be deleted entirely. you can start or stop xbmc with either "service xbmc stop" or "stop xbmc" "start xbmc" or "restart xbmc" without the quotes of course.

oh on an unrelated note. i found out what the cause of some people's (i.e. me) audio not working on startup without a sleep command (this was only with the OLD init.d script because it had no start on commands) it was for users with nvidia and having to use modprobes to get audio sometimes xbmc would boot before the modprobe was applyed. THE NEW UPSTART SCRIPT DOES NOT HAVE THIS PROBLEM. because of the start on stopped udevtrigger, it makes it 100% reliable with no startup delay (trust me i tested) but during my tests to get around audio not working BEFORE i rlealized stopped devtrigger was the key i worked around it by adding the modprobe snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2 to the pre-start script area (its gone now because its not needed) but i just wanted to document this in case anyone down the road has any problem like that (they shouldn't) but i just wanted to report my findings.

but the script i posted works fine the way it is though. and you can start/stop/restart xbmc like this: start xbmc

as far as being on tty8 i'm pretty sure thats the norm for any x session as right now i'm on that with my laptop that has 12.04 desktop installed and gnome3. and if i closed lightdm it doesnt switch to tty1 it stays on tty8 until i switch with ctl+alt+F1 or 2 and so on... i could very well be confused here someone clarify and ill do it but until then....
Reply
@Hack_kid the TTY thing was a comment by jbravo a few posts back http://forum.xbmc.org/showthread.php?tid...pid1216467 if it does how he says then maybe its worth looking at it, if not, ignore it.

I didn't know that the start stop was supported directly via this because, well there's no entries for it, to my versy untrained eye, but if you say it does, I believe u.

Stuff with desktop on usually behaves very different, its just an observation Smile
Reply
If you have a desktop manger installed it takes tty7, XBMC then takes tty8.

In my case (with old init.d script, and no desktop manager) XBMC was started on tty1. If XBMC then was manually restarted (login on e.g tty2 and do /etc/init-d/xbmc stop|start) XBMC ended up on tty7 as expected.

My assumption is that this behaviour depends on the start up sequence, tty7 may not be available when XBMC is started. I will try the new upstart script and see what happens.

Reply
(2012-10-18, 11:27)uNiversal Wrote: @Hack_kid the TTY thing was a comment by jbravo a few posts back http://forum.xbmc.org/showthread.php?tid...pid1216467 if it does how he says then maybe its worth looking at it, if not, ignore it.

I didn't know that the start stop was supported directly via this because, well there's no entries for it, to my versy untrained eye, but if you say it does, I believe u.

Stuff with desktop on usually behaves very different, its just an observation Smile

thats the standard upstart feature.
And as already said by Jbravo, default tty for X is tty7
Reply
XBMC is still starting on tty1 on my system, using the new upstart script. If restarted XBMC is started on tty7. No big issue, but I find it a bit strange.

If XBMC is stopped via the shutdown menu "Exit", XBMC is now restarted directly. I must say that I prefer this over exiting to a blank screen. This removes the possibilty that someone accidentally exits XBMC and gets stuck.

Is there really a need to specify "script" and "end script", " exec su -c "xinit /usr/bin/xbmc --standalone :0" $USER" should be enough.
Reply
@Bram77

Running the script pauses a few times, needing to tap enter at random times should not need user input to proceed on basic functions, there's a few errors at the end just before it rebooted first time, but everything runs.

script errors at end before reboot
Code:
sh: 0: getcwd() failed: No such file or directory
All profile caches have been cleared, but no profiles have been unloaded.
Unloading profiles will leave already running processes permanently
unconfined, which can lead to unexpected situations.
To set a process to complain mode, use the command line tool
'aa-complain'. To really tear down all profiles, run the init script with the 'teardown' option."

The upstart script I installed (experimental) theres a typo on script it says expirimental but Im using

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"

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" $USER
end script

and -- deleted /usr/bin/runXBMC
-- deleted /home/xbmc/.xsession

thx thethirdnut using same except script uses xinit not startx since xinit would be more direct?

works fine.

Booting I dont get a plymouth at all, grub line looks ok, I cant figure it out. for some reason and there's quite a few errors while booting.

the internal CIR works out of the box, though the remote itself, most keys dont work anymore. SO good news at least there, in part. Im trying some custom keymaps but idk yet.

atm I think thats all except I thought a newer xbmc would be installed I guess its the stable.

uNi

Reply
The script detected my Power Color Radeon HD 6450 as "Advanced" and exited. Had to modify the script to proceed.

Here's what lspci thinks about the card:
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Caicos [Radeon HD 6450]

Otherwise a great script. Big Grin
Reply
Thanks Smile

How did you modify the script exactly? The script stoped and displayed that your current videocard is not supported by the script? Th exact name displayed was "Advanced"? That's strange... But I'll add support for the "Advanced" card, I'm not sure why it doesn't just work. Your coard should be detected properly.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
@Bram77

Does the script do??
Code:
usermod --group audio,video,fuse,cdrom,plugdev xbmc
in addition to the problems I had running install see this post 2 up from this one I dont think xbmc is added to all the groups required (not properly?) I see entry on script but no dice.. mainly my no sound and was unable to get it working, so I'm reinstalling again. 3rd time lucky?

Edit
xbmc needs
Code:
sudo adduser xbmc users
automount is not working see this post and this post and this post

typo in optons
Code:
options=(1 "init.d" on
            2 "upstart (expirimental)" off)
Should read experimental though the method mentioned works (not so experimental now)

the upstart routine the thirdnut, hack_kid outlined (also mentioned in my previous post is a great way to go.

Ah also the grub errors, can be fixed by appending
Code:
vga=792
to etc/default/grub/ in GRUB_CMDLINE_LINUX_DEFAULT=

Still didnt get a plymouth bootup, I recon this has to be done, http://ubuntuguide.net/howto-change-plym...untu-10-04 still applies to newer Linux the priority has to be 100... like so
Code:
update-alternatives --install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/xbmc-logo/xbmc-logo.plymouth 100
Code:
update-initramfs -u
but I haven't tested the fixes.

EDIT
When I got audio working, if xbmc has option synback to display enabled, playing a video there is no audio, I'm trying to fix that...
There's a great deal of judder, I would think that a xorg.conf would fix this, but in this method, we are not installing xorg idk what installing xorg will do to the install.

TIA

uNi
Reply
  • 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 90

Logout Mark Read Team Forum Stats Members Help
HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based11