Why the xdg-open command does not work ?


ekianjo

Hardcore Member
Joined
May 7, 2012
Messages
8,261
Location
神戸市、日本 (Japan)
As you may know the xdg-open command in terminal should call your favorite browser and open the link you require, but it does not work on Pandora, even if specify the command for the favorite browser as :

pnd_run /media/sdcardname/pandora/menu/firefox-18.0-2  ?

Any idea what is going on ?
 
The problem with that line is, that the website after the pnd_run command is not given to the pnd, as the pnd_run command only calls the startupscript in the pnd and not the binary itself.
 
Create a script and put that "pnd_run" line into it, then call the script to open your browser.

Also works for opening media like mp3s or pdfs or whatever: create a script (typically on NAND) with the pnd_run line, and then opening is a simple task of calling that script.
 
The problem with that line is, that the website after the pnd_run command is not given to the pnd, as the pnd_run command only calls the startupscript in the pnd and not the binary itself.
Nope, I omitted that part in the command but I do have the part transferring the URL to the pnd_run command. That still will not run. 

Create a script and put that "pnd_run" line into it, then call the script to open your browser.


Also works for opening media like mp3s or pdfs or whatever: create a script (typically on NAND) with the pnd_run line, and then opening is a simple task of calling that script.
Any suggestion as to what that script would look like ? 
 
wait, wait, I'm stupid. pnd_run doesn't allow passing arguments. You need pnd_run.sh

#!/bin/sh
/usr/pandora/scripts/pnd_run.sh -p /<path-to-pnd>.PND -e <executable-inside-pnd> -a "$@"ie: /usr/pandora/scripts/pnd_run.sh -p "/media/PANDORA/pandora/apps/firefox.pnd" -e "firefox.sh" -a "$@"Basically you right-click on a desktop icon and copy the "command" line from the "launcher" tab and add "-a "$@"" to the end of it.

$@ just copies all arguments (the url or the video or whatever) to the script. It needs to be wrapped in quotes just in case the passed arguments contain spaces.

You can put it anywhere that's accessible, but I put mine into my home/bin directory, makes it easier to make a backup of them.
 
Thanks WizardStan, will try that. 

Now, other questions - where can you define the favorite applications to open any kind of file ? Let's say I want to open all .xlsx files with Libreoffice PND, where would I register this kind of information ? 
 
They do different things, why they are named so similarly is another thing.
 
Back
Top