[LINUX] HOW-TO launch applications from XBMC Live (e.g. Firefox)

  Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Thumbs Up  [LINUX] HOW-TO launch applications from XBMC Live (e.g. Firefox) Post: #1
There is a lot of threads but few good. I have read most of them and compiled a working solution based on a script example from the actual launcher release thread.
This is step by step how to add it to xbmc-live 9.11repack.

EDIT: This works fine in Dharma. Use the program executor, not the launcher. It is pre-installed, at least in xbmcLive.

Install Launcher (skip for Dharma)
-----------------
Log on with the user that runs xbmc and position your self in that user's home directory.

Code:
mkdir Downloads
cd Downloads
wget http://xbmc-launcher.googlecode.com/files/Launcher1.04.zip
unzip Launcher1.04.zip
mv Launcher /home/xbmc/.xbmc/plugins/programs
cd ..


setup firefox launch script
-------------------------------
Code:
mkdir scripts
cd scripts
sudo nano firefox.sh
add:
Code:
#!/bin/bash
fluxbox &
firefox
killall -9 fluxbox

Save and exit nano
Quote:To save: CTRL-o
To exit: CTRL-x

Code:
sudo chmod +x firefox.sh

sudo apt-get update
sudo apt-get --no-install-recommends install firefox flashplugin-nonfree
(--no-install-recommends is VERY important in karmic..omit and you will break things)

Add firefox to launcher (In Dharma use the executer)
-----------------------------
Go to program / program plugin / launcher / add new launcher => select the script
You can add the launcher to favourites or create another launcher with the context menu.


Change DPI (font size etc)
------------------------------------
Code:
sudo nano /etc/X11/xorg.conf
Add an option DPI in the monitor section:

Code:
Section "Monitor"
Identifier "Monitor0"
[b]Option "DPI" "200 x 200"[/b]
EndSection

I wanted to set DPI on the fly with xrandr but couldn't get it to work. If anyone knows howto do it, please let me know.

Config fluxbox
----------------------------------------------------------
a) Get ride of fluxbox error message
Start fluxbox by running the launcher (or from the console by typing "startx", without "")
If needed, minimize firefox and start a terminal by right-clicking on the desktop.
Enter
Code:
fbsetbg -b -solid black
b) Get ride of toolbar
Righ-click on toolbar and check "auto-hide"
c) Maximize firefox and terminate it.
=> back to xbmc


hdmi audio
---------------------------------------------------------

Code:
Create a file in home directory:
nano .asoundrc

Add:

pcm.!default {
type plug
slave {
pcm "hdmi"
}
}

or perhaps:
Code:
defaults.pcm.device 3
3 = the hdmi device number
(This post was last modified: 2010-10-11 21:04 by vikjon0.)
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #2
..
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #3
...
find quote
Csimbi Offline
Member
Posts: 78
Joined: Jan 2010
Reputation: 0
Post: #4
Thanks, I'll give it a go when I get back from vacation...
find quote
kazama42 Offline
Junior Member
Posts: 17
Joined: Mar 2010
Reputation: 0
Post: #5
Cant find the flash plugin. Running xbmc LIVE.

[INDENT]xbmc@XBMCLive:~/scripts$ sudo apt-get --no-install-recommends install firefox adobe-flashplugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package adobe-flashplugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package adobe-flashplugin has no installation candidate
[/INDENT]
(This post was last modified: 2010-04-08 17:45 by kazama42.)
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #6
apt-get install flash should be good.

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
kazama42 Offline
Junior Member
Posts: 17
Joined: Mar 2010
Reputation: 0
Post: #7
sudo apt-get install flashplugin-installer ended up working.
I'll test it out tonight.
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #8
Quote:sudo apt-get install flashplugin-installer ended up working.

Yes, thank you for pointing this out. My bad. I already had it in the system and I copied adobe-flashplugin from another thread and when I tested I was told "already newest version"

Quote:sudo apt-get install flashplugin-nonfree
This see to be working as well.
find quote
rickx Offline
Senior Member
Posts: 159
Joined: Feb 2009
Reputation: 0
Post: #9
nice work.
I'll try the killall too.

would it also work with fluxbox in the background and xbmc above - without calling fluxbox for each launched thing?

I had no-sound problems last time I tried with my actual setup. Can someone confirm this works, firefox/mame with sound? I use alsa.

thanks
find quote
wipmonkey Offline
Junior Member
Posts: 29
Joined: May 2009
Reputation: 0
Post: #10
I changed the script to:
Code:
#!/bin/bash
fluxbox &
"$@"
killall -9 fluxbox

and renamed it /usr/local/bin/startfluxbox
some of my Emulators were not starting and I think it was because they were looking for a windows manager even though they were in full screen.

this is what my mednafen entry in Launcher.xml looks like now:
Code:
...
                <name>Ninteno (NES)</name>
                <application>/usr/local/bin/startfluxbox</application>
                <args>/usr/games/mednafen</args>
                <rompath>/home/xbmc/roms/nes/</rompath>
                <romext>nes|zip|NES|ZIP|Zip|Nes</romext>
...

it will work even with more arguments like:
Code:
...
<launcher>
                <name>Ninteno 64 (N64)</name>
                <application>/usr/local/bin/startfluxbox</application>
                <args>/usr/games/mupen64plus --nogui --fullscreen</args>
                <rompath>/home/xbmc/roms/N64/</rompath>
                <romext>rom|zip|ROM|ZIP|Zip|Rom</romext>
                <thumb></thumb>
                <wait>true</wait>
...


in ~/.fluxbox/init
I added/changed these lines:
Code:
session.screen0.rootCommand:    fbsetbg -b -solid black
session.screen0.toolbar.autoHide:       true

its works great Big Grin
find quote
Post Reply