[RELEASE] Chrome Launcher

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
crankshaft Offline
Junior Member
Posts: 12
Joined: Jun 2013
Reputation: 0
Post: #301
Is it possible to include a keymap configuration for chrome launcher in userdata/keymaps/xxx.xml

I already have keymaps setup for wiimote which works great in xbmc, but is it also possible to add a map for chrome launcher ??

Is it possible to enable the virtual Keyboard in ChromeLauncher, or possibly add a new map something like:

<joystick name="WiiRemotePAC">
<button id="6">Shift</button>
<button id="7">CursorLeft</button>
<button id="9">CursorRight</button>
<button id="10">Symbols</button>
<button id="11000">BackSpace</button>
find quote
jknight2014 Offline
Junior Member
Posts: 23
Joined: Jan 2015
Reputation: 1
Post: #302
(2013-12-25 02:14)rob hodge Wrote:  hello-

i wanted to throw an idea out there as a suggestion to fix the issues that people are having with this plugin and XBMCbuntu, as i ran into this before with my the emulators that i have setup, as well as the compoholio ubuntu-netflix i had been running with.

to have focus grabbed and to go full-screen when yo have a second program running, you need to be running a window manager, as this is the part of the desktop environment that manages what programs are on the screen, and who gets control and focus and all that. i use open box, as this comes installed with the xbmcbuntu installation as it is what the xbmcbuntu desktop environment mode uses. all XBMCbuntu installs ship with it.
to return to XBMC gracefully, you then need to kill the window manager after the program (chrome) ends.

on my emulators i do this via this script:
openbox &
kill 1%

line-by line, what this does is:

identify this is a bash script

openbox &
launch openbox. the '&' means execute in background, and move to the next line

the $1 means execute the first command line parameter passed to it. since this is run foreground, the script waits for this to exit before executing the next line

kill 1%
the 'kill %1' tells it to kill the first child process launched by this script that is running in the background. (openbox)

so, if i call this 'launcher' by executing
launcher  "emulator --paramaters --romname --etc"

it runs "emulator --paramaters --romname --etc" inside a 'wrapper' of the script that opens the window manager, runs "emulator --paramaters --romname --etc", and (once 'emulator' closes) closes the window manager. Everything works perfectly and transparently.

would it be possible to implement a method to use this in chrome launcher?
perhaps instead of a 'execute script before' option, an 'execute script and pass command as a parameter' option? this would allow us to write a script that would run on both sides of chrome, both setting up and deconstructing any environment or helper programs needed, as well las making it much more customizable.

or, for a more idiot proof option that wouldn't require scripting knowledge, an option to chose a window manager to have chrome launcher open and close before and after chrome?

this execute window manager / execute app / kill window manager process is pretty much essential to launch any program from within XBMCbuntu and have your control and focus work properly. implement this procedure, and most of the issues you hear from XBMCbuntu users would evaporate.

there is a kludge i've come up with to get things working as is;

it's this script run from within chrome launcher:
openbox &
sleep 30
pids= pidof chromium-browser
wait $pids
kill %1
this runs open box
waits 30 seconds
gets the Program id's of all the chromium processes
tells the script to wait untill all the chromium processes have terminated
then kill open box.

it is a hack; there is a potential race condition. if chromium doesn't open within 30 seconds of the start of the script, it wil ljust kill open box and exit, leaving the system kinda borked. i haven't had this happen, but it's why i'd rather launch chromium from within the script.

I know this is kind of old but couldn't you do a while loop checking for chrome process. I would set a max execution. So if chrome never starts the script will exit eventually.
find quote
anahka2309 Offline
Posts: 55
Joined: Oct 2011
Reputation: 0
Post: #303
Does anyone know of a more charming way to close Chrome/Youtube on Windows? Alt + F4 or ctrl + W is fine for me but less savvy computer users tend to close XBMC too. If XBMC is set up as shell they're kinda stuck and have to restart the computer.
find quote
rhon Offline
Junior Member
Posts: 2
Joined: Mar 2011
Reputation: 0
Post: #304

Is it possible to make optional the use of black.html javascript to launch site, and pass the url on the command line instead, if the option is disabled ?

I'm trying to use a sandboxed Chrome in a docker container (see https://github.com/jlund/docker-chrome-pulseaudio for details) and it doesn't work because of black.html trick.
find quote
Post Reply