Kodi Community Forum
[LINUX] HOW-TO launch applications from XBMC Live (e.g. Firefox) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO launch applications from XBMC Live (e.g. Firefox) (/showthread.php?tid=71664)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12


- psybertech - 2010-06-08

I agree... so I just tested this and changed my post above to only add rights to the sudoers file for alsa-utils

Code:
echo 'xbmc ALL= /etc/init.d/alsa-utils' >> /etc/sudoers

This is much safer for everyone....

I was just lazy earlier and playing but now that I am not testing anything ATM, I figured I would put the bare minimum up to get this all to work.

Anyway...........


- vikjon0 - 2010-06-08

I understand.

However I have now finally tested myself and option number 1 works fine. I cannot repeat any issue with xbmc setting analog, hdmi or digital,hdmi, hdmi. Please try and let me know exactly how to recreate the problem if you still have it.

Working:
Quote:pcm.!default {
type plug
slave {
pcm "hdmi"
}
}

with this "defaults.pcm.device 3" I get the same problem as you in xbmc.


- vikjon0 - 2010-06-08

Quote:1) The fbsetbg line doesn't get rid of the message... I will look into that later.
Dont put in the script...just do it once in terminal in fluxbox.


- psybertech - 2010-06-08

I will play around a little more, but for me it is how I stated...

If I use any .asoundrc file (like the one you just posted or the single defaults line) then XBMC doesn't play any audio, just the menu sounds.

I will see if I can come up with any other way to do this without all the hoops I am jumping through... trust me, I prefer simple over complicated but working is working and for me right now, that is all I really care about.

..... I'll be back.....................


- psybertech - 2010-06-09

vikjon0 Wrote:Dont put in the script...just do it once in terminal in fluxbox.
I've done that a bunch of times. I've tried with the message present and I've done it after dismissing the message but neither get rid of it.

I've pulled it out of my script since it doesn't do anything.


- vikjon0 - 2010-06-09

Quote:I've done that a bunch of times. I've tried with the message present and I've done it after dismissing the message but neither get rid of it.

I've pulled it out of my script since it doesn't do anything.

Ok, don't know how to fix that. Except that you can do as the messages says and install the wallpapers etc. I did that first and it worked fine except that I didnt have a completly black wallpaper.

Also check in early post in this thread where someone describes how to config fluxbox directly in the config file.
http://forum.xbmc.org/showpost.php?p=519750&postcount=10
Quote:in ~/.fluxbox/init
I added/changed these lines:

Code:
session.screen0.rootCommand: fbsetbg -b -solid black
session.screen0.toolbar.autoHide: true



- psybertech - 2010-06-09

thanks for the pointer vikjon... I found that last night and that took care of it for me. Big Grin


- Ninety-9 SE-L - 2010-06-15

Awesome write-up. Even a beginner, like me, was able to get this working.

I haven't tested the audio, I'm still hunting for my second HDMI cord, so I'm using the analog audio out.

edit: all working.


- ngiardina - 2010-06-17

psybertech Wrote:I agree... so I just tested this and changed my post above to only add rights to the sudoers file for alsa-utils

Code:
echo 'xbmc ALL= /etc/init.d/alsa-utils' >> /etc/sudoers

This is much safer for everyone....

I was just lazy earlier and playing but now that I am not testing anything ATM, I figured I would put the bare minimum up to get this all to work.

Anyway...........

I followed your script for renaming the asoundrc file and restsrting alsa, but no sound in firefox, so I ran the alsa restart from terminal, and it stops, but cannot restart. Any ideas?

Aspire revo 3610 running xbmcfreak v14. I did not have an asoundrc file to begin with, and when I created one that mimicks yours, Gained audio in firefox, lost audio in xbmc. Seems like I am having the same problem you had, but I just can't get the alsa restart to work. I edited /etc/sudoers as specified.

Here is what restarting alsa tells me when run from the terminal (same results without using -force argument):
Code:
ngiardina@XBMCLive:/$ sudo /etc/init.d/alsa-utils restart -force
* Shutting down ALSA...                                                 ( OK )
* Setting up ALSA...
* warning: 'alsactl restore' failed with error message 'alsactl: set_control:1389: Cannot write control '2:0:0:IEC958 Playback Default:0' :
Operation not permitted
alsactl: set_control:1389: Cannot write control '2:0:0:IEC958 Playback Switch:0' : Operation not permitted'...
amixer: Invalid command!
   ...done.



- psybertech - 2010-06-18

ngiardina Wrote:ngiardina@XBMCLive:/$ sudo /etc/init.d/alsa-utils restart -force
* Shutting down ALSA... ( OK )
* Setting up ALSA...
* warning: 'alsactl restore' failed with error message 'alsactl: set_control:1389: Cannot write control '2:0:0:IEC958 Playback Default:0' :
Operation not permitted
alsactl: set_control:1389: Cannot write control '2:0:0:IEC958 Playback Switch:0' : Operation not permitted'...
amixer: Invalid command!
...done.
ngiardina,

In your session above you are logged in as ngiardina... did you add the user ngiardina to the sudoers or did you add the user xbmc?

If you added the user xbmc, then you should log into your xbmc ssh session as 'xbmc' since ngiardina doesn't have the rights.

If you added the user xbmc, but you have xbmc running under the user ngiardina, then add ngiardina to sudoers instead of the user xbmc.
If that is the case, check the launcher script and make sure you are renaming the .asoundrc file in ngiardina home, not xbmc's
Code:
change this:
mv /home/xbmc/.asoundrc.old /home/xbmc/.asoundrc
to:
mv /home/ngiardina/.asoundrc.old /home/ngiardina/.asoundrc
and change this:
mv /home/xbmc/.asoundrc /home/xbmc/.asoundrc.old
to:
mv /home/ngiardina/.asoundrc /home/ngiardina/.asoundrc.old

If you added ngiardina and it still is failing then I am unsure what to look for here, sorry.

A final question.... Did you try to restart alsa-utils logged in as root?

Good luck!


- ngiardina - 2010-06-18

I use ngiardina as xbmc user name. My home folder is home/ngiardina. I have no xbmc user name. I did add ngiardina to sudoers. Tried it as root, no luck. I did a grep | PCM and xbmc won't let go of the sound in order for me to restart. I rewrote the script with killall xbmc.bin before the first alsa restart, and then restart service xbmc-live after the second alsa restart. It makes all the transitions properly, and if I execute that from a command prompt, alsa restarts correctly, bit still no sound in firefox. I'm going to play with the asound.conf file an maybe do a similar rename on it before the restart. I'll see if that works.


- vikjon0 - 2010-06-18

or try with a clean xbmclive 9.11 setup since it is working for other people. Or at least try the freak cd with xbmc as a user. I am pretty sure the freak cd normally has a asoundrc. Also, try with the asounrc that is working for me.


Woo-Hoo - ngiardina - 2010-06-18

I got it. I deleted /etc/asound.conf, then created /home/ngiardina/.asoundrc (defaults.pcm.device 3), and changed the firefox script back to the original (without the alsa restarts). I then changed my xbmc audio settings to:
Audio output device: default
Passthrough audio: custom
Custom device: plughw:0,3

I was pretty sure I had tried that before, as it is identical to DuffMan's instructions, but I think I just effed up.

Now I have audio working on XBMC, Firefox, and zsnes.

Thanks very much for all of your help guys.


- gsgleason - 2010-06-22

I just updated to the following via the svn ppa:
$ apt-cache policy xbmc
xbmc:
Installed: 1:10.08~svn31181-karmic1
Candidate: 1:10.08~svn31181-karmic1
Version table:
*** 1:10.08~svn31181-karmic1 0
500 http://ppa.launchpad.net karmic/main Packages
100 /var/lib/dpkg/status

Scripts and plugins no longer work. Looks like it's using the new add-on system.


- sdsnyr94 - 2010-06-22

It looks like development for Launcher has ended..... so probably no "add-on" update from the creator.

Look at this thread... http://forum.xbmc.org/showthread.php?tid=35739&page=68
in post 675 a user has repackaged Launcher to function an add-on. It's a little buggy, but it works.