Command line to detect what pnds are installed?


ekianjo

Hardcore Member
Joined
May 7, 2012
Messages
8,261
Location
神戸市、日本 (Japan)
I am interested for one application I am working on, to check if VLC or SMPlayer is installed and launch it via a command line instruction.


The question is, is there a way to find out what PNDs are installed on your Pandora, without listing whatever is in the directory of the SD card ?
 
All i can think of is using something like


[ -d /media/BOOT/pandora/appdata/vlc ] && echo '1'


for checking if vlc is installed (same goes for SMplayer).


Then you can list folders present in /media/ and blindly launch from all of them (except from ram, hdd and ROOT). I guess you can assume pnd will be in pandora/apps or pandora/menu.


You can also ask the user to point where vlc or SMplayer pnd's are located at first run of your program and use that location later.
 
You could grep for 'libpnd' in /usr/share/applications and ~/Desktop .. the .desktop files :)


I have always meant to make 'pndls' that lists all installed pnds, to go along with pnd-run family of tools for invocation. If anyone likes, I can put together a 'pndls' (or lspnd, to be like lsusb pspci etc) trivially.. like 20 lines of code, using libpnd library of course.


jeff
 
You could grep for 'libpnd' in /usr/share/applications and ~/Desktop .. the .desktop files :)


I have always meant to make 'pndls' that lists all installed pnds, to go along with pnd-run family of tools for invocation. If anyone likes, I can put together a 'pndls' (or lspnd, to be like lsusb pspci etc) trivially.. like 20 lines of code, using libpnd library of course.


jeff

Please do so :) That's always something someone can reuse easily then :)
 
I vote to name it pndls, so that it is "grouped" with the other pnd* tool family,


and to create a symlink to lspnd to be associated as a specific sort of ls.


On the Mac I know of


ls prefixed CLI apps


lsbom -- list contents of a bom file


lsof - list open files


lsvfs -- list known virtual file systems


ls suffixed CLI apps


mdls -- lists the metadata attributes for the specified file
 
Can't you also just grep for the desktop file in /tmp?
 
Back
Top