Start App by opening a compatible file?


TheCom1

Still Fresh
Joined
Feb 22, 2011
Messages
3
Age
35
Hey, this may be a stupid question but I haven't been able to find an answer anywhere. I thought this would be a pretty standard thing to do but I guess not, and it surprises me that nobody else has seemed to have brought it up yet.


How do I make a certain app open certain files when I click on them? I already did the start with... Thing like in windows where you choose a program from the list or browse for it and check off the use every time box. When I did this (browsed for the .pnd and selected it) it just gives me either an error message or does nothing.


Here is an example of my dilemma: I have the vlc player and a couple of movies, when I double tap the movies, the "open with "thing comes up and I select vlc.pnd. Then I tap the movie again and nothing happens. Or in the case of .torrents and transmission an error will come up.


Ugh somebody please help, maybe I'm just stupid but explain it to me anyway please.


Thank you in advance.
 
EDIT: scrap that, tried and failed lots :(
 
Last edited by a moderator:
you can use the default box that pops up when you try to run it, the application you need to choose to open the file with is a command.



Code:
/usr/pandora/scripts/pnd_run.sh vlc.pnd


or somthing like that.
 
Last edited by a moderator:
you can use the default box that pops up when you try to run it, the application you need to choose to open the file with is a command.



Code:
/usr/pandora/scripts/pnd_run.sh vlc.pnd


or somthing like that.

I already tried that and I tried creating a launcher for the .pnd and using that...still no success
 
does the launcher load vlc up just by double clicking it? or does it lauch vlc from th terminal with the pnd_run.sh command? make sure that works first.
 
Last edited by a moderator:
Some WM and filemanagers require a "%?" type option at the end of the program selection dialog to designate what you are sending to the program. I.E. in efm you have to add %u for the filename to be send to vlc. I'm not sure what the option would be in xfce's file-manager but I'm willing to bet that is the problem.
 
chance are, the pnd launching script isnt passing the parameters correctly. i havent tryed it personally so i cant say for sure, but ill do some tests tonights and make it work xD.
 
Any additional parameters added at the end would be passed to pnd_run and not the launched application. Does pnd_run forward those parameters to the launched application?
 
What exactly is the difference between /usr/bin/pnd_run and /usr/pandora/scripts/pnd_run.sh? Their parameters differ.


Plain pnd_run doesn't understand -a while pnd_run.sh does, however I'm having some trouble invoking pnd_run.sh directly.
 
Last edited by a moderator:
well as far as im aware the pnd_run is a command created from the pnd_run.sh file which just means you can invoke it streight from the terminal like this:



Code:
pnd_run pndfile.pnd



instead of like this:



Code:
/usr/pandora/scripts/pnd_run.sh pndfile.pnd
 
well as far as im aware the pnd_run is a command created from the pnd_run.sh file which just means you can invoke it streight from the terminal like this:



Code:
pnd_run pndfile.pnd



instead of like this:



Code:
/usr/pandora/scripts/pnd_run.sh pndfile.pnd
It probably parses the pxml file then as pnd_run.sh requires both the pnd file and the executable to be specified, such as in:



Code:
/usr/pandora/scripts/pnd_run.sh -p pndfile.pnd -e <executable>
 
you can use the default box that pops up when you try to run it, the application you need to choose to open the file with is a command.



Code:
/usr/pandora/scripts/pnd_run.sh vlc.pnd



or somthing like that.
For vlc that command line should be:



Code:
/usr/pandora/scripts/pnd_run.sh -p <full-path-to-vlc.pnd> -e scripts/vlc.sh -a <full-path-to-media>

e.g.



Code:
/usr/pandora/scripts/pnd_run.sh -p /media/mmcblk0p1/pandora/menu/vlc.pnd -e scripts/vlc.sh -a %U


<edit>So yeah, we need a mechanism to (dis)associate files whenever a PND gets (un)mounted.</edit>
 
Last edited by a moderator:
Thanks for all your effort guys, I will be trying some of your suggestions later. Let's hope it works.. I still wish there would be an easier, more straight forward approach to a very basic operation like this though.
 
Back
Top