PND:FAQ
From Pandora Wiki
This is a list of frequently asked questions about using the Pandora PND package format. For factual and other kinds of questions, use the search box. If your question is not answered on this page, do some research and include it!
Contents
- 1 The PND system
- 2 Usage
- 2.1 How do I use PND files?
- 2.2 How do I change the search paths for PND files? (Advanced)
- 2.3 How do I launch a PND application without putting it in a special location?
- 2.4 How do I choose where the shortcut icons for a PND appear?
- 2.5 How do I configure different locations for my PND shortcuts? (Advanced)
The PND system
What is a PND file?
- A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.
Why are PNDs useful?
- Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.
- PND files are used to allow for applications to be executed without them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.
- This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.
How is a PND file structured? (Advanced)
- The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a "PXML.xml" appended at the end. There can also be an accompanying screenshot that is appended as well.
Can I modify a PND file?
- You can, but you need easily obtained open source freeware special tools to do so. (These tools are included by most Linux distributions by default, but are downloads for Windows and Mac OSX users.) It is advised that only developers modify or create PND files.
Can a PND file modify itself?
- No, not generally. A pnd-file, even after extended use may be copied anywhere and still be in its original state. Any changes the application has made will have been redirected to its appdata directory instead, so you have your self-contained directory of its changes.
How does a PND store application data?
- Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.
- The application data folders are located in "pandora/appdata/*" on the device that the PND is stored on.
Can a PND-file be unpacked and used?
- A pnd-file may be unpacked into what is called a "PXML-application directory" if the packager of the pnd-file followed the specification. (ie: the icon and PXML.xml metadata are included in the contained filesystem and not just found at the end of the pnd-file.) An application directory may be auto-discovered and executed just like a pnd-file, but you can muck with the files in-place without a problem. When the application writes back to itself however, the changes will still be directed to the appdata directory as with a regular pnd-file.
- This is an advanced topic, noted here for completeness.
How does the PND discovery mechanism work? (Advanced)
- There is a special process called "pndnotifyd" that watches the PND search paths for file changes. Once it finds a new PND file, it mounts the file system image or archive portion of the file, and uses the PXML.xml file to generate one or multiple "*.desktop" files for the PND.
Usage
How do I use PND files?
- Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is "/media/*/pandora/apps" which means that PNDs will be found on any SD card, USB stick or similar that has a "pandora/apps" folder.
- Once you've put your PND in a known location, the PND system will pick up the new PND, "activate" it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.
How do I change the search paths for PND files? (Advanced)
- Simply edit the "/etc/pandora/conf/apps" file, and change the "searchpath" entry to include the paths you want to use. Paths are separated by colons (":") and may include wildcards (in the shape of "*") anywhere in the path.
How do I launch a PND application without putting it in a special location?
- If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.
How do I choose where the shortcut icons for a PND appear?
- With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:
- "/media/*/pandora/menu" - These PND-files will only generate shortcut icons in the system's application menu. ("*.desktop" files will be written to "/usr/share/applications")
- "/media/*/pandora/desktop" - These PND files will only generate shortcut icons on the Desktop. ("*.desktop" files will be written to "~/Desktop")
- "/media/*/pandora/apps" - At the moment, this path does the same as the "desktop" path: it extracts shortcuts on the desktop.
- "/usr/pandora/apps" This also extracts shortcut icons to the desktop.
How do I configure different locations for my PND shortcuts? (Advanced)
- Edit the file "/etc/pandora/conf/desktop" (The "desktop" refers to "*.desktop files"). It will look like this:
# Open Pandora # Desktop configuration [desktop] searchpath /media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps dotdesktoppath ~/Desktop/ iconpath /tmp [menu] searchpath /media/*/pandora/menu dotdesktoppath /usr/share/applications iconpath /tmp
- You should leave the "iconpath" variables be, but you can change which paths are searched through and where "*.desktop" files are extracted with the "searchpath" and "dotdesktoppath" variables, respectively.