Pandora Run a pnd with a simple command


shideneyu

Still Fresh
Joined
Jan 31, 2011
Messages
83
Hello,


I need to run vlc (the version in repo) with the simple command "vlc" in my terminal, at any cost.


Certainly, this appears: "command not found";


I think I have to install it on the nand =)


Why do I want that?


I have a Java software that I successfully succeed to run (myfreetv) which need tu run "vlc" (in command line) in order to work.


However, from what I understood, vlc is mounted each time when run, but that software doesn't work :huh:


I'm a Ubuntu user for 2 years now, and a very new Pandora user (2 days now :lol: ) , thanks you for your help :rolleyes:
 
Easy way: Install to nand.


Long way: create a symlink named "vlc" to "mnt/utmp/vlc/bin/vlc in your "/usr/bin" and mount the vlcpnd with "/usr/pandora/scripts/pnd_run.sh -p /path/to/your/vlcpnd/vlc.pnd -m".


You will need to do "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/utmp/vlc/lib" and "export PATH=$PATH:/mnt/utmp/vlc/bin" and run your app from the commandline you exported these.


Hope that helps a bit.


Edit: Of course you can make a small shellscript, that does all that for you and start you program afterwards.
 
Last edited by a moderator:
Okay I think the long way will be usefull (in order to save nand space)


I understand the goal of the process


But I don't know how to do:

create a symlink named "vlc" to "mnt/utmp/vlc/bin/vlc in your "/usr/bin"

Sorry I'm a little confuse, thanks for your help ;)
 
I think you won't even need that, when you exported your PATH.


Sorry for confusion ;)


Edit: Edited previous post for clarification.
 
Last edited by a moderator:
My OVR editor has some functionality for launching PNDs from the shell. Passing parameters is still a bit experimental and not tested too much though.


At the very least it is useful to reveal the proper shell commands for starting PND applications.
 
Last edited by a moderator:
My OVR editor has some functionality for launching PNDs from the shell. Passing parameters is still a bit experimental and not tested too much though.


At the very least it is useful to reveal the proper shell commands for starting PND applications.

Well, he doesn't need to start the pnd. He needs to start an executable frm this pnd as if it was in PATH.
 
Last edited by a moderator:
Well, he doesn't need to start the pnd. He needs to start an executable frm this pnd as if it was in PATH.
Yes, but as PNDs are not permanently mounted, one way to deal with that is to have a script on your path which mounts and starts the PND. E.g. put a vlc script in /usr/bin which boots up the PND.
 
you can just run the PND from desktop or menu


then run vlc executable from terminal:



Code:
cd /mnt/utmp/vlc/bin



Code:
./vlc parameters file

Will maybe not work, as vlc needs other programs like ffmpeg etc, that are located in it's binfolder.


Also this might produce a failure because of not found shared libraries.


But this is the easiest way, if it works.

Well, he doesn't need to start the pnd. He needs to start an executable frm this pnd as if it was in PATH.
Yes, but as PNDs are not permanently mounted, one way to deal with that is to have a script on your path which mounts and starts the PND. E.g. put a vlc script in /usr/bin which boots up the PND.

Yeah, that was, what I wanted to suggest before, but then I thought it is easier to do it in the startupscript for the app and not modify your nand.
 
Code:
/usr/pandora/scripts/pnd_run.sh -p /path/to/vlc.pnd -m

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/mnt/utmp/vlc/lib"

export PATH="$PATH:/mnt/utmp/vlc/bin"


vlc --help
 
Easy way: Install to nand.


Long way: create a symlink named "vlc" to "mnt/utmp/vlc/bin/vlc in your "/usr/bin" and mount the vlcpnd with "/usr/pandora/scripts/pnd_run.sh -p /path/to/your/vlcpnd/vlc.pnd -m".


You will need to do "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/utmp/vlc/lib" and "export PATH=$PATH:/mnt/utmp/vlc/bin" and run your app from the commandline you exported these.


Hope that helps a bit.


Edit: Of course you can make a small shellscript, that does all that for you and start you program afterwards.


I think you won't even need that, when you exported your PATH.


Sorry for confusion


Edit: Edited previous post for clarification.

I did everything you said, I copied manually everything; "vlc" on terminal works now :D


Thanks for everyone who answered in this topic;


But now the java software that I run still don't work :( He says "Cannot run program "/usr/bin/vlc/" [...] No such file or directory";


Okay I think i made a crucial mistake, the software doesn't run "vlc" on his terminal, but use vlc directly at the root... I'm doing some test
 
Last edited by a moderator:
Then the path to vlc is hardcoded in your app.


You will need to make a symlink then:



Code:
sudo ln -s /mnt/utmp/vlc/bin/vlc /usr/bin/vlc
 
But now the java software that I run still don't work :( He says "Cannot run program "/usr/bin/vlc/" [...] No such file or directory";

(as root) Create a script named /usr/bin/vlc like this one :



Code:
#!/bin/sh


if [ ! -x /mnt/utmp/vlc/bin/vlc ];then


  /usr/pandora/scripts/pnd_run.sh -p /path/to/vlc.pnd -m

fi



export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/mnt/utmp/vlc/lib"

export PATH="$PATH:/mnt/utmp/vlc/bin"

vlc $*




you might need to set correct permission on the file (755), also I havent tested it (just typed in the comment form ;P)
 
I'm trying to understand everything :rolleyes:


But still doesn't work, here's what I get:

sudo /media/mmcblk0p1/new
not mounted on loop yet, doing so


LoopMountedon:


/dev/loop1


Filetype is Squashfs


Mounting PND (mount -t squashfs) :


/dev/loop1 on /mnt/pnd/vlc type squashfs (ro)


Filesystem is vfat


Mounting the Union FS using /media/mmcblk0p1/pandora/appdata/vlc as Write directory:


mount -t aufs -o exec,noplink,dirs=/media/mmcblk0p1/pandora/appdata/vlc=rw+nolwh:/mnt/pnd/vlc=rr none /mnt/utmp/vlc


none on /mnt/utmp/vlc type aufs (rw,si=6dc26837,noplink)


VLC is not supposed to be run as root. Sorry.


If you need to use real-time priorities and/or privileged TCP ports


you can use vlc-wrapper (make sure it is Set-UID root and


cannot be run by non-trusted users first).


salameche-citron:~$ vlc


bash: vlc: command not found
 
Ok, from start:


do



Code:
rm /usr/bin/vlc



then do





Code:
sudo touch /usr/bin/vlc

sudo chmod 775 /usr/bin/vlc

mousepad /usr/bin/vlc



Paste this into the editor:





Code:
#!/bin/sh


if [ ! -x /mnt/utmp/vlc/bin/vlc ];then


  /usr/pandora/scripts/pnd_run.sh -p /path/to/vlc.pnd -m

fi



export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/mnt/utmp/vlc/lib"

export PATH="$PATH:/mnt/utmp/vlc/bin"

vlc $*


Replace "/path/to/vlc.pnd" with the path to your vlc.pnd and save.


Then run your app.


Should work :)
 
"No such file or directory" with ./vlc


mcobit, i'm doing what you say ;) I'm not very quick sry


Thanks everyone :)
 
Last edited by a moderator:
Woow no error, the software seems to detect vlc :D


However, vlc doesn't appear :eek: This is a compatibility issue I think


The main trouble is that my pannel isn't working properly now :eek: :eek: The menu diseapered, and the icons changed to the "default" one oO


on top of that, everything is going wrong, don't know what's happening, the mouse is becoming crazy (it's slowing down), even after having restart the pandora (I couldn't stop the pandora, i had to remove the battery...)


I followed the instruction correctly step by step


I will reflash my pandora, I'm just doing a screenshot to show the bug, I don't wanna waste time on resolve it :blink:


Ok I didn't succeed to make the screenshot, for I didn't succeed to launch the script :lol:


Thanks you very much everyone, it's not because of you, I think I used the Pandora during 10 hours today now lol she's a little sick


Last thing, could you tell me by the way why (before this incident) some app didn't succeed to open?


It was saying something as "couldn't open pnd"... "look at" blabla


Thanks


[edit]: Here is the correct issue for the last thing i need help: "Mounting the PND failed. The application wont start. Please have a look at /tmp/mypnd."
 
Last edited by a moderator:
likely a memory issue, try closing other apps or just take a look at the .out file in the folder advised, should give you exact info why it wont load, if you cant figure it out, youre welcome to paste it here in a pastebin or spoiler tag
 
Back
Top