<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Edlee</id>
	<title>Pandora Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Edlee"/>
	<link rel="alternate" type="text/html" href="https://pandorawiki.org/Special:Contributions/Edlee"/>
	<updated>2026-04-22T22:16:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0-alpha</generator>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Keyboard&amp;diff=29198</id>
		<title>Keyboard</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Keyboard&amp;diff=29198"/>
		<updated>2013-12-20T07:17:55Z</updated>

		<summary type="html">&lt;p&gt;Edlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Pandkey.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the months before the first preorders were taken, there was much discussion and community voting about the best layout. [http://www.gp32x.com/board/index.php?/topic/43762-pandora-keyboard-layout/ This] was one of the final votes. The final layout was different from either one of the two most popular community proposals, but incorporated some of the suggestions such as having a &amp;quot;Pandora&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Many desirable applications require a keyboard,general consensus was that an on-screen keyboard wasn't good enough. For computing mode, the game controls are used for mouse, cursor and control keys.&lt;br /&gt;
&lt;br /&gt;
Some classic systems such as the Atari and C64, which had keyboards, are far more comfortably emulated on a device with a keyboard.&lt;br /&gt;
&lt;br /&gt;
==Hotkeys==&lt;br /&gt;
'''alt+ctrl+ up / down'''        | switches between virtual desktops. (if you put them in a single row in the widget you can use ← →) &amp;lt;br /&amp;gt;&lt;br /&gt;
'''powerbutton slidelock left''' | locks keyboard nubs L and R shoulderbuttons &amp;lt;br /&amp;gt;&lt;br /&gt;
'''pandorabutton + start'''      | brings up a dialogue to kill processes&lt;br /&gt;
&lt;br /&gt;
==Keycodes==&lt;br /&gt;
This table might be useful if you're trying to map keys in some program, or writing a program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pandora button!!Keycode!!Hex Equivalent&lt;br /&gt;
|-&lt;br /&gt;
|Space || key 32 || 0020&lt;br /&gt;
|-&lt;br /&gt;
|Pandora || key 147 || 0093&lt;br /&gt;
|-&lt;br /&gt;
|D-pad up || key 273 || 0111&lt;br /&gt;
|-&lt;br /&gt;
|D-pad down || key 274 || 0112&lt;br /&gt;
|-&lt;br /&gt;
|D-pad right || key 275 || 0113&lt;br /&gt;
|-&lt;br /&gt;
|D-pad left || key 276 || 0114&lt;br /&gt;
|-&lt;br /&gt;
|Game A || key 278 || 0116&lt;br /&gt;
|- &lt;br /&gt;
|Game B || key 279 || 0117&lt;br /&gt;
|-&lt;br /&gt;
|Game Y || key 280 || 0118&lt;br /&gt;
|-&lt;br /&gt;
|Game X || key 281 || 0119&lt;br /&gt;
|-&lt;br /&gt;
|Shoulder L || key 303 || 012f&lt;br /&gt;
|-&lt;br /&gt;
|Shoulder R || key 305 || 0131&lt;br /&gt;
|-&lt;br /&gt;
|Select || key 306 || 0132&lt;br /&gt;
|-&lt;br /&gt;
|Start || key 308 || 0134&lt;br /&gt;
|}&lt;br /&gt;
Sources: [[DOSBox#Assigning_action_keys_to_A.2FB.2FX.2FY|1]], [http://www.gp32x.com/board/index.php?app=forums&amp;amp;module=forums&amp;amp;section=findpost&amp;amp;pid=949070 2], [http://www.gp32x.com/board/index.php?/topic/54073-the-one-nub-club/page__view__findpost__p__905644 3] [http://www.gp32x.com/board/index.php?/topic/55124-remapping-the-mouse-buttons-etc/page__view__findpost__p__896576 4] (note: the last two links give different keycodes for the gaming buttons. Possibly both numbers will work?){{FIXME|Check the keycode issue}}&lt;br /&gt;
&lt;br /&gt;
== Matrix ==&lt;br /&gt;
&lt;br /&gt;
The matrix layout is detailed on p.20 of the Hardware hacker's guide ([http://www.openpandora.org/downloads/PANDORA_Hackers_manual_v100.pdf here]). A more readable version appears below. A .svg version of the Pandora's keyboard layout (made by cosurgi) can be downloaded [http://www.mediafire.com/?8s157q5qj8dibjq here]. (broken link) {{FIXME|This should be embedded within this wiki.  Also, that link is broken.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=250px&amp;gt;&lt;br /&gt;
Image:Final Keymat.jpg|the mat&lt;br /&gt;
image:Keypadmatrix.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remapping keys on the keyboard==&lt;br /&gt;
First, an apology - I'm writing this without knowing how to remap the keys on the [[keyboard]], so this is not really a tutorial. It is currently just a collection point for information on the subject.&lt;br /&gt;
&lt;br /&gt;
===Reference===&lt;br /&gt;
Forum Threads&lt;br /&gt;
* [[http://www.gp32x.com/board/index.php?/topic/55124-remapping-the-mouse-buttons-etc/ Remapping The Mouse Buttons, Etc?]]&lt;br /&gt;
* [[http://www.gp32x.com/board/index.php?/topic/54077-changing-the-function-of-buttoms/ Changing The Function Of Buttoms]]&lt;br /&gt;
* [[http://www.gp32x.com/board/index.php?/topic/54324-remap-gaming-buttons-within-xfce Remap Gaming Buttons Within Xfce]]&lt;br /&gt;
&lt;br /&gt;
The os should allow the standard keypad and modifier keys to be defined to generate any key. So if you want shift '1' to be anything other than 'section', it is possible. somehow :( &lt;br /&gt;
&lt;br /&gt;
===Linking events to Keys===&lt;br /&gt;
There is a Pandora event map daemon, which reacts to the lid close, Pandora button and power button.&lt;br /&gt;
It can be configured using the &amp;lt;pre&amp;gt;/etc/pandora/conf/eventmap&amp;lt;/pre&amp;gt; file. How  to reference additional special keys is TBD. A thread showing an example is [[http://www.gp32x.com/board/index.php?/topic/54944-xfce-style-changing-with-brightness-buttons-hack/ here]]&lt;br /&gt;
It is also possible to configure xfce to capture events (forum thread is not locatable today)&lt;br /&gt;
&lt;br /&gt;
===Using shoulder buttons for mouse===&lt;br /&gt;
{{hint|Seems only to be reported working permanently on HF4 but see NOTE below}}&lt;br /&gt;
As described in this [http://www.gp32x.com/board/index.php?/topic/55124-remapping-the-mouse-buttons-etc/page__view__findpost__p__896576 post]&lt;br /&gt;
# Find the keycodes which you want to modify. Run '''xev''' (this needs to be installed from angstrom repo) from the terminal, and record the numbers.&lt;br /&gt;
# Edit the '''.pndXmodmap''' file in your home directory, modify or add (in the correct numerical order for ease) lines like this (for the shoulder buttons)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
keycode 62 = Pointer_Button1 NoSymbol Pointer_Button1 &lt;br /&gt;
keycode 105 = Pointer_Button3 NoSymbol Pointer_Button3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# If you want to use the 'a' and 'b' buttons, the codes are 110 and 115 respectively.&lt;br /&gt;
# As a test, open the XFCE Accessibility settings and enable mouse keys.&lt;br /&gt;
# To make this permanent, download a compiled version of [http://urjaman.dyndns.info/xkbset xkbset], copy to /usr/bin and chmod a+x /usr/bin/xkbset&lt;br /&gt;
# Create a script (file) with this as content&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;#!/bin/sh&lt;br /&gt;
xkbset m&lt;br /&gt;
xkbset exp =m&amp;lt;/source&amp;gt;&lt;br /&gt;
# Now open a terminal where the file is saved, and give it executable permissions:&lt;br /&gt;
#:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;chmod +x nameofyourfile.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
#Now install it:&lt;br /&gt;
#:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo cp nameofyourfile.sh /usr/bin/nameofyourfile&amp;lt;/source&amp;gt;&lt;br /&gt;
# Add this script to XFCE autostarted stuff (Session and Startup-&amp;gt;Application Autostart)&lt;br /&gt;
NOTE&lt;br /&gt;
# For HF5 you only need add these two commands to .xinitrc (located in your home directory)&lt;br /&gt;
&amp;lt;pre&amp;gt;xkbset m&lt;br /&gt;
xkbset exp m&amp;lt;/pre&amp;gt;&lt;br /&gt;
note the missing =(equals) sign&lt;br /&gt;
&lt;br /&gt;
===Swapping Caps Lock and Tab===&lt;br /&gt;
As a command line junkie, I was pretty frustrated with where Tab is. I decided to remap it to where Caps Lock is (Fn + Shift). I added the following to .pndXmodmap (in your home directory):&lt;br /&gt;
&amp;lt;pre&amp;gt;keysym Tab = Caps_Lock&lt;br /&gt;
remove Lock = Caps_Lock&lt;br /&gt;
keycode 66 = Tab NoSymbol Tab&lt;br /&gt;
add Lock = Caps_Lock&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you add this, just run &amp;quot;xmodmap ~/.pndXmodmap&amp;quot; to reload the keymappings&lt;br /&gt;
&lt;br /&gt;
== Keyboard layout changer tool  ==&lt;br /&gt;
&lt;br /&gt;
The '''keyboard layout changer''' provides a means to easily change keyboard layout. Possible uses are for typing in a different language on your Pandora, for using an external keyboard, or simply for making small key modifications.&lt;br /&gt;
&lt;br /&gt;
=Usage guide=&lt;br /&gt;
#Download the PND to your Pandora from either  [http://stuffs.slaeshjag.org/pnd/kblayout.pnd Slaeshjag's site] or from the [http://repo.openpandora.org/?page=detail&amp;amp;app=change-keymap-0.1-slaeshjag Repo] (see [[User_manual#Installing_a_PND_file_.28an_application.29|here]] for instructions on where to place PNDs)&lt;br /&gt;
#Run the PND; it's called &amp;quot;Keyboard Layout&amp;quot; and is in the &amp;quot;Settings&amp;quot; category&lt;br /&gt;
#You will now see a choice of keyboard layouts. Choose one, and your layout will change!&amp;lt;br/&amp;gt;(if the program doesn't run, find the &amp;lt;code&amp;gt;/tmp/pndrun_kblayout.out&amp;lt;/code&amp;gt; file and post its contents in the [http://boards.openpandora.org/index.php?/topic/2428-keyboard-layout-changer/ official forum thread], so that the author can see what went wrong)&lt;br /&gt;
&lt;br /&gt;
==Keyboard layouts==&lt;br /&gt;
&lt;br /&gt;
[http://repo.openpandora.org/?page=detail&amp;amp;app=change-keymap-0.1-slaeshjag Keyboard layout] is an app by slashjag which helps you change layout in a graphical interface.&lt;br /&gt;
&lt;br /&gt;
=== Make your own ===&lt;br /&gt;
&lt;br /&gt;
*Go to the &amp;lt;code&amp;gt;/media/yourSDcard/pandora/appdata/kblayout/keymaps&amp;lt;/code&amp;gt; directory. Inside, you will see a bunch of files. Open any one with a text editor, and you'll see something like this:&lt;br /&gt;
&lt;br /&gt;
 ./setxkbmap -layout us&lt;br /&gt;
 xmodmap ~/.pndXmodmap&lt;br /&gt;
&lt;br /&gt;
What this means is that it's using the &amp;quot;us&amp;quot; layout with the modifications specified in the &amp;quot;.pndXmodmap&amp;quot; file (the Pandora needs these modifications because its keyboard isn't the same as a standard one).&lt;br /&gt;
&lt;br /&gt;
So there are two basic things you could change: you could replace &amp;quot;us&amp;quot; with a different base layout, or you could replace &amp;quot;~/.pndXmodmap&amp;quot; with a different file.&lt;br /&gt;
&lt;br /&gt;
===Base layouts===&lt;br /&gt;
The default layout is &amp;quot;us&amp;quot;. The full list of base layouts included with the Pandora is listed in the file &amp;lt;code&amp;gt;/usr/share/X11/xkb/keymap/xfree86&amp;lt;/code&amp;gt;. Here's the full list:&lt;br /&gt;
{{HideableNotes|&amp;lt;pre&amp;gt;&lt;br /&gt;
us&lt;br /&gt;
ar&lt;br /&gt;
be&lt;br /&gt;
bg&lt;br /&gt;
br&lt;br /&gt;
cz&lt;br /&gt;
de&lt;br /&gt;
ch_de&lt;br /&gt;
ch_fr&lt;br /&gt;
dk&lt;br /&gt;
dvorak&lt;br /&gt;
en_US&lt;br /&gt;
es&lt;br /&gt;
fr&lt;br /&gt;
fr-latin9&lt;br /&gt;
fr_CA&lt;br /&gt;
gb&lt;br /&gt;
hr&lt;br /&gt;
it&lt;br /&gt;
jp106&lt;br /&gt;
lt&lt;br /&gt;
lt_std&lt;br /&gt;
lv&lt;br /&gt;
mk&lt;br /&gt;
mt&lt;br /&gt;
no&lt;br /&gt;
pl&lt;br /&gt;
pt&lt;br /&gt;
ro&lt;br /&gt;
ro_microsoft&lt;br /&gt;
ru&lt;br /&gt;
se_FI&lt;br /&gt;
se_SE&lt;br /&gt;
sl&lt;br /&gt;
sl_SI&lt;br /&gt;
sk&lt;br /&gt;
syr&lt;br /&gt;
th&lt;br /&gt;
th_tis&lt;br /&gt;
th_pat&lt;br /&gt;
tr&lt;br /&gt;
uk&lt;br /&gt;
us_flexpro&lt;br /&gt;
us_intl&lt;br /&gt;
us_microsoft&lt;br /&gt;
uz&lt;br /&gt;
cz_qwerty&lt;br /&gt;
de_CH&lt;br /&gt;
fr_CH&lt;br /&gt;
mt_us&lt;br /&gt;
sk_qwerty&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you just want to use one of these base layouts with no modifications, make a new file in the &amp;lt;code&amp;gt;/media/yourSDcard/pandora/appdata/kblayout/keymaps&amp;lt;/code&amp;gt; directory, name it anything, open it in a text editor and place the following text inside, replacing &amp;quot;xx&amp;quot; with any of the codes in the above list:&lt;br /&gt;
 ./setxkbmap -layout xx&lt;br /&gt;
Save the file. Then just start Keyboard Layout Changer, and you'll be able to select it.&lt;br /&gt;
&lt;br /&gt;
===xmodmap===&lt;br /&gt;
This type of file modifies whatever base layout is selected. One of these comes by default with your Pandora OS. You can find the &amp;lt;code&amp;gt;.pndXmodmap&amp;lt;/code&amp;gt; file in the &amp;lt;code&amp;gt;/home/username&amp;lt;/code&amp;gt; directory. It might be hidden, so press Ctrl+H to make it visible. If you open it with a text editor, you'll see this:&lt;br /&gt;
&lt;br /&gt;
{{HideableNotes|&amp;lt;pre&amp;gt;keycode   9 = Escape NoSymbol Escape&lt;br /&gt;
keycode  10 = 1 section 1 section&lt;br /&gt;
keycode  11 = 2 braceleft 2 braceleft&lt;br /&gt;
keycode  12 = 3 braceright 3 braceright&lt;br /&gt;
keycode  13 = 4 asciitilde 4 asciitilde&lt;br /&gt;
keycode  14 = 5 percent 5 percent&lt;br /&gt;
keycode  15 = 6 asciicircum 6 asciicircum&lt;br /&gt;
keycode  16 = 7 ampersand 7 ampersand&lt;br /&gt;
keycode  17 = 8 asterisk 8 asterisk&lt;br /&gt;
keycode  18 = 9 bracketleft 9 bracketleft&lt;br /&gt;
keycode  19 = 0 bracketright 0 bracketright&lt;br /&gt;
keycode  22 = BackSpace Delete BackSpace Delete&lt;br /&gt;
keycode  24 = q Q q Q&lt;br /&gt;
keycode  25 = w W w W&lt;br /&gt;
keycode  26 = e E e E&lt;br /&gt;
keycode  27 = r R r R&lt;br /&gt;
keycode  28 = t T t T&lt;br /&gt;
keycode  29 = y Y y Y&lt;br /&gt;
keycode  30 = u U u U&lt;br /&gt;
keycode  31 = i I i I&lt;br /&gt;
keycode  32 = o O o O&lt;br /&gt;
keycode  33 = p P p P&lt;br /&gt;
keycode  34 = parenleft NoSymbol parenleft&lt;br /&gt;
keycode  35 = parenright NoSymbol parenright&lt;br /&gt;
keycode  36 = Return Multi_key Return&lt;br /&gt;
keycode  37 = Control_L NoSymbol Control_L&lt;br /&gt;
keycode  38 = a A a A&lt;br /&gt;
keycode  39 = s S s S&lt;br /&gt;
keycode  40 = d D d D&lt;br /&gt;
keycode  41 = f F f F&lt;br /&gt;
keycode  42 = g G g G&lt;br /&gt;
keycode  43 = h H h H&lt;br /&gt;
keycode  44 = j J j J&lt;br /&gt;
keycode  45 = k K k K&lt;br /&gt;
keycode  46 = l L l L&lt;br /&gt;
keycode  47 = semicolon NoSymbol semicolon&lt;br /&gt;
keycode  48 = apostrophe NoSymbol apostrophe&lt;br /&gt;
keycode  49 = grave NoSymbol grave&lt;br /&gt;
keycode  50 = Shift_L NoSymbol Shift_L&lt;br /&gt;
keycode  52 = z Z z Z&lt;br /&gt;
keycode  53 = x X x X&lt;br /&gt;
keycode  54 = c C c C&lt;br /&gt;
keycode  55 = v V v V&lt;br /&gt;
keycode  56 = b B b B&lt;br /&gt;
keycode  57 = n N n N&lt;br /&gt;
keycode  58 = m M m M&lt;br /&gt;
keycode  59 = comma less comma less&lt;br /&gt;
keycode  60 = period greater period greater&lt;br /&gt;
keycode  61 = slash NoSymbol slash&lt;br /&gt;
keycode  62 = Shift_R NoSymbol Shift_R&lt;br /&gt;
keycode  64 = Alt_L NoSymbol Alt_L&lt;br /&gt;
keycode  65 = space NoSymbol space&lt;br /&gt;
keycode  66 = Caps_Lock NoSymbol Caps_Lock&lt;br /&gt;
keycode  67 = F1 NoSymbol F1&lt;br /&gt;
keycode  68 = F2 NoSymbol F2&lt;br /&gt;
keycode  69 = F3 NoSymbol F3&lt;br /&gt;
keycode  70 = F4 NoSymbol F4&lt;br /&gt;
keycode  71 = F5 NoSymbol F5&lt;br /&gt;
keycode  72 = F6 NoSymbol F6&lt;br /&gt;
keycode  73 = F7 NoSymbol F7&lt;br /&gt;
keycode  74 = F8 NoSymbol F8&lt;br /&gt;
keycode  75 = F9 NoSymbol F9&lt;br /&gt;
keycode  76 = F10 NoSymbol F10&lt;br /&gt;
keycode  82 = minus NoSymbol minus NoSymbol&lt;br /&gt;
keycode  83 = Home quotedbl Home quotedbl&lt;br /&gt;
keycode  86 = plus NoSymbol plus NoSymbol&lt;br /&gt;
keycode  87 = Prior Multi_key Prior Multi_key&lt;br /&gt;
keycode  88 = End XF86_Switch_VT_2 End XF86_Switch_VT_2&lt;br /&gt;
keycode  89 = Next XF86_Switch_VT_1 Next XF86_Switch_VT_1&lt;br /&gt;
keycode  95 = F11 NoSymbol F11&lt;br /&gt;
keycode  96 = F12 NoSymbol F12&lt;br /&gt;
keycode 118 = Insert NoSymbol Insert&lt;br /&gt;
keycode 132 = yen NoSymbol yen&lt;br /&gt;
keycode 187 = parenleft NoSymbol parenleft&lt;br /&gt;
keycode 188 = parenright NoSymbol parenright&lt;br /&gt;
keycode 191 = acute NoSymbol acute&lt;br /&gt;
keycode 192 = bar NoSymbol bar&lt;br /&gt;
keycode 193 = underscore NoSymbol underscore&lt;br /&gt;
keycode 194 = numbersign NoSymbol numbersign&lt;br /&gt;
keycode 195 = exclam NoSymbol exclam&lt;br /&gt;
keycode 196 = sterling NoSymbol sterling&lt;br /&gt;
keycode 197 = quotedbl NoSymbol quotedbl&lt;br /&gt;
keycode 198 = at NoSymbol at&lt;br /&gt;
keycode 199 = colon NoSymbol colon&lt;br /&gt;
keycode 200 = dollar NoSymbol dollar&lt;br /&gt;
keycode 201 = EuroSign NoSymbol EuroSign&lt;br /&gt;
keycode 222 = question NoSymbol question&lt;br /&gt;
keycode 235 = Tab NoSymbol Tab&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Ok, now let's break this down a little. &amp;lt;code&amp;gt;keycode  38 = a A a A&amp;lt;/code&amp;gt; - the first two letters after the = sign are what you'll get if you press the button marked A with and without holding &amp;quot;shift&amp;quot;. The next two are with and without shift modifier together with a second modifier, but since there's no second modifier on the Pandora, this is redundant really. What about Fn, you may ask, isn't that a second modifier? The Fn-key acts on a lower level, and is not seen as a separate key. Instead, there are separate keycode entries for all Fn keys (the ones marked in blue on your Pandora). &amp;quot;NoSymbol&amp;quot; means that the combination doesn't produce a character. You can find a full list of symbols (or &amp;quot;keysyms&amp;quot;) that you can use [http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap over here].&lt;br /&gt;
&lt;br /&gt;
You can edit the .pndXmodmap file itself if you want to. That'll change the default keyboard layout you have at startup.&lt;br /&gt;
&lt;br /&gt;
But you can also make secondary custom keyboard layouts. &lt;br /&gt;
&lt;br /&gt;
For example, here's how to make a selectable custom Russian keyboard layout:&lt;br /&gt;
&lt;br /&gt;
====Making a custom Russian keyboard layout====&lt;br /&gt;
Make two new files inside &amp;lt;code&amp;gt;/media/yourSDcard/pandora/appdata/kblayout/keymaps&amp;lt;/code&amp;gt;. One called &amp;quot;RU-translit&amp;quot; (the name doesn't matter), one called &amp;quot;.rumodmap&amp;quot; (the dot at the start of the name is to make it not show up in the Keyboard Layout Changer menu as a keymap; that's the function of the ''first'' file you made). Put this text in the RU-translit file:&lt;br /&gt;
 ./setxkbmap -layout us&lt;br /&gt;
 xmodmap keymaps/.rumodmap&lt;br /&gt;
&lt;br /&gt;
Put this text in the .rumodmap file:&lt;br /&gt;
&lt;br /&gt;
{{HideableNotes|&amp;lt;pre&amp;gt;keycode   9 = Escape NoSymbol Escape&lt;br /&gt;
keycode  10 = 1 section 1 section&lt;br /&gt;
keycode  11 = 2 braceleft 2 braceleft&lt;br /&gt;
keycode  12 = 3 braceright 3 braceright&lt;br /&gt;
keycode  13 = 4 asciitilde 4 asciitilde&lt;br /&gt;
keycode  14 = 5 percent 5 percent&lt;br /&gt;
keycode  15 = 6 asciicircum 6 asciicircum&lt;br /&gt;
keycode  16 = 7 ampersand 7 ampersand&lt;br /&gt;
keycode  17 = 8 asterisk 8 asterisk&lt;br /&gt;
keycode  18 = 9 bracketleft 9 bracketleft&lt;br /&gt;
keycode  19 = 0 bracketright 0 bracketright&lt;br /&gt;
keycode  22 = BackSpace Delete BackSpace Delete&lt;br /&gt;
keycode  24 = Cyrillic_ya Cyrillic_YA Cyrillic_ya Cyrillic_YA&lt;br /&gt;
keycode  25 = Cyrillic_zhe Cyrillic_ZHE Cyrillic_zhe Cyrillic_ZHE&lt;br /&gt;
keycode  26 = Cyrillic_ie Cyrillic_IE Cyrillic_ie Cyrillic_IE&lt;br /&gt;
keycode  27 = Cyrillic_er Cyrillic_ER Cyrillic_er Cyrillic_ER&lt;br /&gt;
keycode  28 = Cyrillic_te Cyrillic_TE Cyrillic_te Cyrillic_TE&lt;br /&gt;
keycode  29 = Cyrillic_yeru Cyrillic_YERU Cyrillic_yeru Cyrillic_YERU&lt;br /&gt;
keycode  30 = Cyrillic_u Cyrillic_U Cyrillic_u Cyrillic_U&lt;br /&gt;
keycode  31 = Cyrillic_i Cyrillic_I Cyrillic_i Cyrillic_I&lt;br /&gt;
keycode  32 = Cyrillic_o Cyrillic_O Cyrillic_o Cyrillic_O&lt;br /&gt;
keycode  33 = Cyrillic_pe Cyrillic_PE Cyrillic_pe Cyrillic_PE&lt;br /&gt;
keycode  34 = parenleft NoSymbol parenleft&lt;br /&gt;
keycode  35 = parenright NoSymbol parenright&lt;br /&gt;
keycode  36 = Return Multi_key Return&lt;br /&gt;
keycode  37 = Control_L NoSymbol Control_L&lt;br /&gt;
keycode  38 = Cyrillic_a  Cyrillic_A Cyrillic_a  Cyrillic_A&lt;br /&gt;
keycode  39 = Cyrillic_es Cyrillic_ES Cyrillic_es Cyrillic_ES&lt;br /&gt;
keycode  40 = Cyrillic_de Cyrillic_DE Cyrillic_de Cyrillic_DE&lt;br /&gt;
keycode  41 = Cyrillic_ef Cyrillic_EF Cyrillic_ef Cyrillic_EF&lt;br /&gt;
keycode  42 = Cyrillic_ghe Cyrillic_GHE Cyrillic_ghe Cyrillic_GHE&lt;br /&gt;
keycode  43 = Cyrillic_che Cyrillic_CHE Cyrillic_che Cyrillic_CHE&lt;br /&gt;
keycode  44 = Cyrillic_shorti Cyrillic_SHORTI Cyrillic_shorti Cyrillic_SHORTI&lt;br /&gt;
keycode  45 = Cyrillic_ka Cyrillic_KA Cyrillic_ka Cyrillic_KA&lt;br /&gt;
keycode  46 = Cyrillic_el Cyrillic_EL Cyrillic_el Cyrillic_EL&lt;br /&gt;
keycode  47 = semicolon NoSymbol semicolon&lt;br /&gt;
keycode  48 = apostrophe NoSymbol apostrophe&lt;br /&gt;
keycode  49 = grave NoSymbol grave&lt;br /&gt;
keycode  50 = Shift_L NoSymbol Shift_L&lt;br /&gt;
keycode  52 = Cyrillic_ze Cyrillic_ZE Cyrillic_ze Cyrillic_ZE&lt;br /&gt;
keycode  53 = Cyrillic_ha Cyrillic_HA Cyrillic_ha Cyrillic_HA&lt;br /&gt;
keycode  54 = Cyrillic_tse Cyrillic_TSE Cyrillic_tse Cyrillic_TSE&lt;br /&gt;
keycode  55 = Cyrillic_ve Cyrillic_VE Cyrillic_ve Cyrillic_VE&lt;br /&gt;
keycode  56 = Cyrillic_be Cyrillic_BE Cyrillic_be Cyrillic_BE&lt;br /&gt;
keycode  57 = Cyrillic_en Cyrillic_EN Cyrillic_en Cyrillic_EN&lt;br /&gt;
keycode  58 = Cyrillic_em Cyrillic_EM Cyrillic_em Cyrillic_EM&lt;br /&gt;
keycode  59 = comma less comma less&lt;br /&gt;
keycode  60 = period greater period greater&lt;br /&gt;
keycode  61 = slash NoSymbol slash&lt;br /&gt;
keycode  62 = Shift_R NoSymbol Shift_R&lt;br /&gt;
keycode  64 = Alt_L NoSymbol Alt_L&lt;br /&gt;
keycode  65 = space NoSymbol space&lt;br /&gt;
keycode  66 = Caps_Lock NoSymbol Caps_Lock&lt;br /&gt;
keycode  67 = Cyrillic_yu Cyrillic_YU Cyrillic_yu Cyrillic_YU&lt;br /&gt;
keycode  68 = Cyrillic_e Cyrillic_E Cyrillic_e Cyrillic_E&lt;br /&gt;
keycode  69 = Cyrillic_softsign Cyrillic_SOFTSIGN Cyrillic_softsign Cyrillic_SOFTSIGN&lt;br /&gt;
keycode  70 = Cyrillic_sha Cyrillic_SHA Cyrillic_sha Cyrillic_SHA&lt;br /&gt;
keycode  71 = Cyrillic_shcha Cyrillic_SHCHA Cyrillic_shcha Cyrillic_SHCHA&lt;br /&gt;
keycode  72 = Cyrillic_io Cyrillic_IO Cyrillic_io Cyrillic_IO&lt;br /&gt;
keycode  73 = Cyrillic_hardsign Cyrillic_HARDSIGN Cyrillic_hardsign Cyrillic_HARDSIGN&lt;br /&gt;
keycode  74 = F8 NoSymbol F8&lt;br /&gt;
keycode  75 = F9 NoSymbol F9&lt;br /&gt;
keycode  76 = F10 NoSymbol F10&lt;br /&gt;
keycode  82 = minus Prior minus Prior&lt;br /&gt;
keycode  83 = Home quotedbl Home quotedbl&lt;br /&gt;
keycode  86 = plus NoSymbol plus NoSymbol&lt;br /&gt;
keycode  87 = Prior Multi_key Prior Multi_key&lt;br /&gt;
keycode  88 = End XF86_Switch_VT_2 End XF86_Switch_VT_2&lt;br /&gt;
keycode  89 = Next XF86_Switch_VT_1 Next XF86_Switch_VT_1&lt;br /&gt;
keycode  95 = F11 NoSymbol F11&lt;br /&gt;
keycode  96 = F12 NoSymbol F12&lt;br /&gt;
keycode 118 = Delete Insert Delete&lt;br /&gt;
keycode 132 = yen NoSymbol yen&lt;br /&gt;
keycode 187 = parenleft NoSymbol parenleft&lt;br /&gt;
keycode 188 = parenright NoSymbol parenright&lt;br /&gt;
keycode 191 = acute NoSymbol acute&lt;br /&gt;
keycode 192 = bar NoSymbol bar&lt;br /&gt;
keycode 193 = underscore NoSymbol underscore&lt;br /&gt;
keycode 194 = numbersign NoSymbol numbersign&lt;br /&gt;
keycode 195 = exclam NoSymbol exclam&lt;br /&gt;
keycode 196 = sterling NoSymbol sterling&lt;br /&gt;
keycode 197 = quotedbl NoSymbol quotedbl&lt;br /&gt;
keycode 198 = at NoSymbol at&lt;br /&gt;
keycode 199 = colon NoSymbol colon&lt;br /&gt;
keycode 200 = dollar NoSymbol dollar&lt;br /&gt;
keycode 201 = EuroSign NoSymbol EuroSign&lt;br /&gt;
keycode 222 = question NoSymbol question&lt;br /&gt;
keycode 235 = Tab NoSymbol Tab&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Once that's done, you can open the Keyboard Layout Changer, choose &amp;quot;RU-translit&amp;quot;, and your keyboard layout will change to a layout similar to [http://i.imgur.com/O96Pu.gif this one], with extra letters replacing F1-F7 (note: for those 7 letters, you can only use the Shift on the Pandora's front face, not the left shoulder button). To change back, open Keyboard Layout Changer again and select &amp;quot;default&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the same way, you can create any other sorts of custom layouts. The easiest way to create a new modmap file is to copy+paste the contents of &amp;lt;code&amp;gt;/home/username/.pndXmodmap&amp;lt;/code&amp;gt; into a new file in the &amp;lt;code&amp;gt;/media/yourSDcard/pandora/appdata/kblayout/keymaps&amp;lt;/code&amp;gt; directory and make adjustments to whatever you want to change.&lt;br /&gt;
&lt;br /&gt;
==How many keypresses can it detect at once?==&lt;br /&gt;
It can detect two &amp;quot;regular&amp;quot; keys being pressed at once[http://www.gp32x.com/board/index.php?s=&amp;amp;showtopic=44326&amp;amp;view=findpost&amp;amp;p=651104].  However, this restriction does not apply to the game controls, or the central &amp;quot;Menu&amp;quot; keys.&lt;br /&gt;
&lt;br /&gt;
* The keyboard is listed on p.20 of the hackers manual&lt;br /&gt;
&lt;br /&gt;
== Dpad ==&lt;br /&gt;
[[File:dpad.jpg|thumbnail|right|D-pad]]&lt;br /&gt;
8way D-pad designed by DaveC.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
== ABXY ==&lt;br /&gt;
The abxy-cluster provides quick and easy access to ingame options. It is also used for hotkeys in [http://repo.openpandora.org/?page=detail&amp;amp;app=pndmanager-bzar PND-manager]]&lt;br /&gt;
[[File:abxy.jpg|thumbnail|right|ABXY]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Keyboard]]&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Edlee</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Boot_setup&amp;diff=29174</id>
		<title>Boot setup</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Boot_setup&amp;diff=29174"/>
		<updated>2013-12-18T23:34:46Z</updated>

		<summary type="html">&lt;p&gt;Edlee: /* Setting up mutliple-partition SD cards for booting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The uBoot bootloader normally boots the OS from NAND, but it can be inhibited by pressing R while starting up to for example pick SD-card booting. This can also be set up with text-files, making it the default behaviour.&lt;br /&gt;
&lt;br /&gt;
==Set up your boot.txt==&lt;br /&gt;
&lt;br /&gt;
Create a new file called boot.txt (or autoboot.txt if you want to boot automatically) and copy and paste the text below. Copy that file to the root of the root of the SD card.&lt;br /&gt;
&lt;br /&gt;
{{warning&lt;br /&gt;
|If you edit the file on Windows, use an advanced text editor like [http://notepad-plus-plus.org/ Notepad++] and be sure to convert to UNIX format (in NP++: Edit -&amp;gt; EOL Conversion -&amp;gt; UNIX format). If you have DOS linebreaks, ext2load will fail with an error like &amp;quot;file not found&amp;quot; as it appends an hidden character to the uImage file name.&lt;br /&gt;
}}boot.txt (from the [http://openpandora.org/firmware/README.txt official firmware site])&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootargs root=/dev/mmcblk0p1 rw rootwait vram=6272K omapfb.vram=0:3000K mmc_core.removable=0&lt;br /&gt;
ext2load mmc 0 0x80300000 /boot/uImage&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: If you chose ext3 instead of ext2 for the partition containing the kernel, the second line still starts with ext2load. There is no ext3load.&lt;br /&gt;
&lt;br /&gt;
Note: depending on firmware version kernels might be at several, sometimes multiple locations, so you have to choose one:&lt;br /&gt;
* /boot/uImage-3 - the default 3.2 kernel (recommended)&lt;br /&gt;
* /lib/boot/uImage - alternative location of 3.2 kernel on certain older firmwares&lt;br /&gt;
* /boot/uImage - mostly a symlink to the latest kernel on recent firmwares&lt;br /&gt;
&lt;br /&gt;
Be aware though that this boot.txt assumes you have formatted your card with ext2 and loads the kernel off the SD card. It is technically possible to boot the kernel from NAND but still run the rest of the file system from your SD card with following boot.txt&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootargs root=/dev/mmcblk0p1 rw rootwait vram=6272K omapfb.vram=0:3000K mmc_core.removable=0&lt;br /&gt;
ubi part boot &amp;amp;&amp;amp; ubifsmount boot &amp;amp;&amp;amp; ubifsload ${loadaddr} uImage &amp;amp;&amp;amp; bootm ${loadaddr} &amp;amp;&amp;amp; boot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However this is not recommended because kernel modules on SD card will likely be not compatible with kernel on NAND.&lt;br /&gt;
&lt;br /&gt;
Both boot.txt's assume you are booting from the left SD card slot, first partition. You can change &amp;quot;mmcblk0p1&amp;quot; to &amp;quot;mmcblk1p1&amp;quot; if you want to boot from the right slot (but boot.txt must still be on a card on the left slot).&lt;br /&gt;
&lt;br /&gt;
===Setting up multiple-partition SD cards for booting===&lt;br /&gt;
&lt;br /&gt;
It is possible to have several partitions on the SD card and boot from one of them.&lt;br /&gt;
E.g. if you have three partitions on the card like this:&lt;br /&gt;
*Partition 1: FAT&lt;br /&gt;
*Partition 2: ext2 (where the rootfs should be placed)&lt;br /&gt;
*Partition 3: swap&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How it's done:&lt;br /&gt;
&lt;br /&gt;
1. Put uBoot's boot control files &amp;quot;boot.txt&amp;quot; and/or &amp;quot;autoboot.txt&amp;quot; into the root of the '''first partition''' of the card (FAT partition in this example) &lt;br /&gt;
&lt;br /&gt;
2. Make &amp;quot;boot.txt&amp;quot; and &amp;quot;autoboot.txt&amp;quot; point U-Boot to the '''partition, which holds the root file system''' of your Linux system. This would be parition 2 in this example (ext2 FS).&lt;br /&gt;
This is done '''using the &amp;quot;root&amp;quot; parameter of setenv'''.&lt;br /&gt;
&lt;br /&gt;
3. Make &amp;quot;boot.txt&amp;quot; and &amp;quot;autoboot.txt&amp;quot; point U-Boot to the correct '''location to boot your kernel from'''.&lt;br /&gt;
This kernel location can be any FAT or ext2/3/4 partition on the SD card.&lt;br /&gt;
The uBoot commands '''&amp;quot;fatload&amp;quot; and &amp;quot;ext2load&amp;quot; with their parameter &amp;quot;mmc x:y&amp;quot;''' are repsonsible for loading the kernel. Choose the command, which addresses the file system the kernel is located on and make sure to correctly adapt the values x and y.&lt;br /&gt;
&lt;br /&gt;
This common example boots the kernel from the FAT partition (then this is a &amp;quot;boot partition&amp;quot;), and uses the ext2 file system as root FS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootargs root=/dev/mmcblk0p2 rw rootwait vram=6272K omapfb.vram=0:3000K mmc_core.removable=0&lt;br /&gt;
fatload mmc 0:1 0x80300000 uimage&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you put the kernel into the root file system's /boot directory, the second line would be different:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootargs root=/dev/mmcblk0p2 rw rootwait vram=6272K omapfb.vram=0:3000K mmc_core.removable=0&lt;br /&gt;
ext2load mmc 0:2 0x80300000 /boot/uImage&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: '''&lt;br /&gt;
&lt;br /&gt;
For both the &amp;quot;root=&amp;quot; kernel argument and the &amp;quot;mmc x:y&amp;quot; argument of the fatload/ext2load commands, slot numbering begins at 0 (0 is left SD slot, 1 is right SD slot) and partition numbering begins at 1!&lt;br /&gt;
&lt;br /&gt;
'''Recommendation:'''&lt;br /&gt;
&lt;br /&gt;
Put the kernel into another partition than the root FS is located.&lt;br /&gt;
Reason: In case the root FS partition is flagged &amp;quot;inconsistent&amp;quot; after a system crash or sudden SD card removal, uBoot won't be able to boot from that partition anymore. But the file system cleanup routines can only be run, once the kernel has been booted. Hence it's safer to put the kernel on a different partition.&lt;br /&gt;
&lt;br /&gt;
==Boot the system==&lt;br /&gt;
&lt;br /&gt;
As you power up the Pandora, hold the shoulder button R. A menu should appear, allowing you to boot from the SD card. (this step isn't necessary if you chose to create an autoboot.txt instead of boot.txt). Remember that this will be an un-configured image, taking a little while longer to boot, and giving the first-run dialogue.&lt;br /&gt;
&lt;br /&gt;
==Access the NAND==&lt;br /&gt;
Once you're booted into the system from SD, you may want access to the NAND rootfs. The following will let you do that.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /mnt/nand&lt;br /&gt;
sudo ubiattach /dev/ubi_ctrl -m 4&lt;br /&gt;
sudo mount -t ubifs ubi0:rootfs /mnt/nand&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other information==&lt;br /&gt;
An alternative approach to using an SD card to increase the space accessible to the system is [[Extend_Utils#OS_Extends | OS Extend]]. This allows the root filesystem to exist on more than one physical device.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*[http://openpandora.org/firmware/ Official firmware page]&lt;br /&gt;
*[http://repo.openpandora.org/?page=detail&amp;amp;app=sd-install-2011-03-10 The GUI-driven SD installer by David Boucher]&lt;br /&gt;
&lt;br /&gt;
=Copy the files to your SD card=&lt;br /&gt;
Navigate (cd) to the directory with the .tar.bz2 file you just downloaded (or made) and do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo tar -xvjf &amp;lt;tarfile&amp;gt;.tar.bz2 -C &amp;lt;SD card&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're doing this on your Pandora, &amp;lt;SD card&amp;gt; is something like /media/mmcblk0p1 (first SD card slot on Pandora). On Ubuntu it would be something like /media/disk if it has no label. You can also try using GUI tools for this, but I didn't have very good luck with them.&lt;br /&gt;
&lt;br /&gt;
===OR copy your firmware from the NAND to the SD card===&lt;br /&gt;
&lt;br /&gt;
The following will ask for your password. All the operations need root permissions so I thought it would be wasteful to sprinkle sudo to everything.&lt;br /&gt;
We will bind mount the root fs to an alternative location (&amp;quot;/mp&amp;quot;), under which other filesystems mounted under root (like the kernel virtual filesystems /proc and /sys, and your SD card.) wont be visible. This allows us to take a live copy of the NAND contents to the SD filesystem.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su&lt;br /&gt;
mkdir /mp&lt;br /&gt;
mount --bind / /mp&lt;br /&gt;
cp -va /mp/* /media/&amp;lt;SD card&amp;gt;&lt;br /&gt;
umount /mp&lt;br /&gt;
rmdir /mp&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== serial port ==&lt;br /&gt;
In an unlikely event that you can get serial output from EXT port, be aware that serial device has changed several times (due to the driver and port configuration changes in the kernel):&lt;br /&gt;
* openpandora.org 2.6.27: ttyS0&lt;br /&gt;
* mainline upto 2.6.36: ttyS2&lt;br /&gt;
* mainline/openpandora.org 2.6.37 and up: ttyO2&lt;br /&gt;
This is relevant for console= bootarg.&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Booting]]&lt;br /&gt;
[[Category:Storage card]]&lt;br /&gt;
[[Category:Operating system]]&lt;/div&gt;</summary>
		<author><name>Edlee</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Introduction_to_PNDs&amp;diff=29168</id>
		<title>Introduction to PNDs</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Introduction_to_PNDs&amp;diff=29168"/>
		<updated>2013-12-15T09:16:18Z</updated>

		<summary type="html">&lt;p&gt;Edlee: /* How Do I Make .PNDs? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{IntroNote|For developers: [[Libpnd hub]]}}&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar:&amp;lt;br&amp;gt;&lt;br /&gt;
When you insert an SD card into one of the two slots, the (Linux-based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
== How do I run a PND-application? ==&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files on your SD card and insert the SD card into either slot of your Pandora.&lt;br /&gt;
&lt;br /&gt;
Using the file browser, you can double-click on the pnd-file to run it.  However, more normally pnd files are put in special folders so they get picked up by the Pandora's OS and are made easier to find and run.&lt;br /&gt;
&lt;br /&gt;
== Where do .PNDs Go? ==&lt;br /&gt;
[[Image:PandoraSD.png|thumb|alt=SD card folder structure|This is what the folder structure on your SD card should look like. The drive letter and card name will vary; they're not important.]]&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Minimenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Folder!!Note&lt;br /&gt;
|-&lt;br /&gt;
|/pandora/desktop||pnd files show up on the desktop background&lt;br /&gt;
|-&lt;br /&gt;
|/pandora/menu||show up in the Applications menu or in minimenu(under the categories suggested by the developer)&lt;br /&gt;
|-&lt;br /&gt;
|/pandora/apps||show up in all places; the desktop, the apps menu and in Minimenu&lt;br /&gt;
|-&lt;br /&gt;
|/pandora/mmenu||show up only in minimenu, ignored by other GUIs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The libpnd config files are in /etc/pandora/conf in the [[NAND]]. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
NOTE: You can actually put subdirectories into those locations above, should you wish to organize your pnd-files somehow within those larger categories.&lt;br /&gt;
&lt;br /&gt;
== Where DON'T .PND files go? ==&lt;br /&gt;
&lt;br /&gt;
* .pnd files are looked for in the directories mentioned above; that list can be tailored if you wish to edit config files.&lt;br /&gt;
* .pnd files are not looked for in the / (root) of the SD cards.. this is _on purpose_; consider, if your SD card is 32GB, or if you're using a 2TB USB drive even -- it could have tens of thousands of files on it; having the Pandora scan the entire device for pnd files would take forever. Instead, we made a well defined set of directories the system will use - /pandora for everything, with 'appdata' and 'menu' and 'desktop' and other special purpose directories.&lt;br /&gt;
&lt;br /&gt;
== Where does my data go? How do I make files visible to the applications? ==&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in '''/pandora/appdata/appname-id''' as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
example: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
==== Example: Hatari ====&lt;br /&gt;
&lt;br /&gt;
Hatari (Atari ST emulator) by default is set to look in &amp;quot;./disks&amp;quot; for the disk images (ROMs) to use. What this means is within the pnd-file (where no disks are supplied), and in the appdata directory. With Hatari, you can browse anywhere from the UI and pick a disk anywhere on your SD cards, but by default it'll look into the ./disks directory.&lt;br /&gt;
&lt;br /&gt;
So you might put Hatari into the menu (/pandora/menu/Hatari131.pnd), or into the desktop (/pandora/desktop/Hatari131.pnd), or somewhere else. Regardless, the appdata will be (with the version I'm building now), /pandora/appdata/hatari.skeezix and thus you would put your .ST or .MSA disk images into /pandora/appdata/hatari.skeezix/disks to make them visible to the emulator. However, given it features its own UI, you can put them into /roms/atarist or /disks or whatever, and use them from there.&lt;br /&gt;
&lt;br /&gt;
=== Using a start-up script ===&lt;br /&gt;
In an ideal world, your application will be completely self-contained and can be run directly without any kind of set-up. It is however often necessary to tweak settings or request input from the user before starting your application. This is easily achieved by having the [[PND]] specify a shell script as its executable, which then in turn runs the application. The general structure of such a script is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Do stuff here...&lt;br /&gt;
&lt;br /&gt;
./my_app&lt;br /&gt;
&lt;br /&gt;
# Clean-up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The first line identifies the file as a shell script, run using &amp;quot;/bin/sh&amp;quot; as the shell. The other lines beginning with a &amp;quot;#&amp;quot; are comments. Before the application is started, parameters can be gathered and/or set. The application itself then gets run by the &amp;quot;./my_app&amp;quot; line, which means &amp;quot;execute the file ''my_app'' in the current directory&amp;quot;. When the application exits, it may be necessary to restore previous settings, delete temporary files, or perform some other kinds of cleaning up.&lt;br /&gt;
&lt;br /&gt;
=== Avoiding NAND writes by setting $HOME ===&lt;br /&gt;
Many applications write configuration data to the user's home directory by default. This is not desirable on the Pandora as this directory resides on the [[NAND]] filesystem. It is however often possible to fool an application into writing to a different directory by setting the $HOME environment variable.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export HOME=`pwd`&lt;br /&gt;
export HOME=$(pwd)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Providing a default configuration ===&lt;br /&gt;
If your application uses a configuration file, you'll usually want to include this in the PND. However, if you simply leave this file in the root of the PND, it will effectively be read-only, preventing the application or user from writing to it. A simple solution is to provide a default configuration file with a different name, and copy this the first time the application is run. The file will then be created under ''appdata'', and can therefore easily be edited.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Method 1: check if file exists, otherwise copy default.&lt;br /&gt;
if [ ! -f app.conf ] ; then&lt;br /&gt;
    cp default.conf app.conf&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Method 2: Same as above, less typing.&lt;br /&gt;
[ -f app.conf ] || cp default.conf app.conf&lt;br /&gt;
&lt;br /&gt;
# Method 3: using a non-destructive copy.&lt;br /&gt;
cp --no-clobber default.conf app.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Nub Configuration ====&lt;br /&gt;
This is a little (but not much!) lengthier - see the page on [[PND nub modes]].&lt;br /&gt;
&lt;br /&gt;
=== Making writable directories ===&lt;br /&gt;
If your application requires that directories be writable for the application, don't put them in the PND, but create them at run-time:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Bad! This will cause an error after the first run, as the directory will already exist.&lt;br /&gt;
mkdir saved_data&lt;br /&gt;
&lt;br /&gt;
# Better to use &amp;quot;-p&amp;quot; which won't complain about existing directories.&lt;br /&gt;
mkdir -p saved_data&lt;br /&gt;
&lt;br /&gt;
# Added bonus: this allows you to create whole trees in one go.&lt;br /&gt;
mkdir -p saved_data/foo saved_data/bar/with/deep/sub/dirs&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Loading shared libraries ===&lt;br /&gt;
If your application requires shared libraries which aren't part of the standard firmware, they can be included in the PND along with the executable. In order for the system to be able to find the libraries, it must be told which directories to search. This can be done by setting the LD_LIBRARY_PATH environment variable. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export LD_LIBRARY_PATH=`pwd`       # Load libraries in the root directory of the PND.&lt;br /&gt;
export LD_LIBRARY_PATH=`pwd`/libs  # Load libraries in the &amp;quot;libs&amp;quot; subdirectory of the PND.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Getting a file/directory from the user ===&lt;br /&gt;
Its often necessary to ask the user for the location of a file or directory. This may be because your application requires files which aren't included in the PND itself, or simply because you application doesn't have a built in file picker. The commands below will prompt the user for a file, then run &amp;quot;my_app&amp;quot; with that file as an argument. Note the use of different sorts of quotes which is important for proper operation and handling spaces in file names.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
FILE=&amp;quot;`zenity --file-selection --title='Select a File'`&amp;quot;&lt;br /&gt;
./my_app &amp;quot;$FILE&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Saving a file/directory name ===&lt;br /&gt;
If your application always asks for a file at start-up, it's handy to remember the location for next time. This can be done by writing the name of the directory to a file in appdata, and reading it back next time the application is run.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
SAVEDIR=./dir.saved    # Name of the file we'll save the directory name to&lt;br /&gt;
&lt;br /&gt;
# Did we save a directory last time? If so, read it into a variable.&lt;br /&gt;
DIR=`cat $SAVEDIR 2&amp;gt; /dev/null`&lt;br /&gt;
&lt;br /&gt;
# Remember where we are right now, as we'll need to come back later.&lt;br /&gt;
PNDDIR=`pwd`&lt;br /&gt;
&lt;br /&gt;
# Does the directory still exist?&lt;br /&gt;
if [ -d &amp;quot;$DIR&amp;quot; ] ; then&lt;br /&gt;
    # Yes, go to that directory before Zenity is started.&lt;br /&gt;
    cd &amp;quot;$DIR&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    # No, try to go to /media (where the SD cards are mounted)&lt;br /&gt;
    # or if that fails, go to &amp;quot;/&amp;quot; as a last resort.&lt;br /&gt;
    cd /media 2&amp;gt; /dev/null || cd /&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Get a file name form the user. Our current directory is now that which&lt;br /&gt;
# was saved, so that's where Zenity will start.&lt;br /&gt;
FILE=`zenity --file-selection --title=&amp;quot;Select a file&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
# If the file selector failed, or the user hit cancel, exit now.&lt;br /&gt;
[ $? -eq 0 ] || exit 1;&lt;br /&gt;
&lt;br /&gt;
# Go back to the PND's mount point.&lt;br /&gt;
cd $PNDDIR&lt;br /&gt;
&lt;br /&gt;
# Save the file's directory for next time.&lt;br /&gt;
dirname &amp;quot;$FILE&amp;quot; &amp;gt; $SAVEDIR&lt;br /&gt;
&lt;br /&gt;
# Run our app with the file as an argument.&lt;br /&gt;
./my_app &amp;quot;$FILE&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking a file's contents ===&lt;br /&gt;
Maybe your application requires some file which cannot be distributed with the PND, either for legal reasons or due to size limitations. A prime example of this is BIOS files used for emulators. Simply copying the file to the current directory will be enough to save it to your program's appdata, but it can also be useful to check the contents of the file are indeed what your application expects.&lt;br /&gt;
&lt;br /&gt;
One way of doing this is to check the file's contents using a hash. A hash is a mathematical formula which can be used to create a &amp;quot;fingerprint&amp;quot; of a file. Two identical files will always generate the same hash value, so knowing this one value is enough to check if two files match. The MD5 hash is a popular choice, and can be easily generated for a given file like so:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ md5sum bios.img&lt;br /&gt;
cfcfd01f1b0dfa97f07cb286b2942dc2  bios.img&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this output to a text file named ''bios.md5'' and put it in your PND root directory. The following commands can then be used in your start-up script to copy a file specified by the user, and check it's hash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
BIOS=bios.img       # The name of our BIOS file&lt;br /&gt;
&lt;br /&gt;
# Check if the BIOS file already exists.&lt;br /&gt;
if [ ! -f ./$BIOS ] ; then&lt;br /&gt;
    # Not found, so get a file name from the user.&lt;br /&gt;
    cp &amp;quot;`zenity --file-selection --title=&amp;quot;Select your $BIOS file&amp;quot;`&amp;quot; $BIOS&lt;br /&gt;
    if [ $? != 0 ] ; then&lt;br /&gt;
        # User hit cancel, bail out.&lt;br /&gt;
        zenity --error --text=&amp;quot;Sorry, emulator cannot run without a BIOS file.&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
    # Check the MD5 hash of the given file against our known-good value.&lt;br /&gt;
    # If the match fails, ask the user if they'd like to try it anyway.&lt;br /&gt;
    md5sum -c bios.md5 || zenity --question \&lt;br /&gt;
        --text=&amp;quot;BIOS does not appear to be the correct version. Use it anyway?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if [ $? != 0 ] ; then&lt;br /&gt;
        # File did not match hash, and the user opted not to try it anyway,&lt;br /&gt;
        # so remove the copied file and bail out.&lt;br /&gt;
        rm -f $BIOS&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Run our emulator with the BIOS file as an argument.&lt;br /&gt;
./my_emu &amp;quot;$BIOS&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced topics =&lt;br /&gt;
&lt;br /&gt;
== I want to override the .PND icon, name, or other settings, how is this done?  ==&lt;br /&gt;
&lt;br /&gt;
The easiest way right now is via the &amp;quot;override&amp;quot; (or &amp;quot;overlay&amp;quot;) system -- .ovr files.&lt;br /&gt;
&lt;br /&gt;
An [[.ovr]] is just a text file you create, with the same name as the pnd-file and in the same location, but with a different file extension. Piece of cake.&lt;br /&gt;
&lt;br /&gt;
If your pnd-file is Hatari.pnd, and you're putting it into /pandora/desktop, then you might create an ovr file for it as: /pandora/desktop/Hatari.ovr&lt;br /&gt;
If you wish to provide your own icon, create it with the same location and filename, but as a .png file: /pandora/desktop/Hatari.png&lt;br /&gt;
&lt;br /&gt;
.ovr files are automatically supported by the system so should work across all pnd-application aware applications and desktops. .png icon overrides have to be handled by the menus, but are already handled by minimenu and anything using the .desktop system (such as [[XFCE]] full desktop or other standard desktop environments.)&lt;br /&gt;
&lt;br /&gt;
An ovr-file simply looks like this:&lt;br /&gt;
* The ovr file may (at this time) override the icon title, the CPU clock speed to set on launch, the main category, and the first subcategory for the main category. Additional fields will become overridable.&lt;br /&gt;
* The category list uses the existing desktop standard. See [http://standards.freedesktop.org/menu-spec/latest/apa.html here] for a list of categories and subcategories supported. &lt;br /&gt;
* Minimenu honors up to 3 lines of 'notes', pulled from the .ovr file. (Make sure they are in the right subapp group). note-1, note-2, note-3, see example below. The notes in minimenu are shown at the bottom of the detail text panel. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
[Application-0]&lt;br /&gt;
title                   HatariHack0&lt;br /&gt;
maincategory            Audio&lt;br /&gt;
maincategorysub1        Emulator&lt;br /&gt;
[Application-1]&lt;br /&gt;
title                   HatariHack1&lt;br /&gt;
clockspeed              200&lt;br /&gt;
note-1                  My text for note line 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the Application-0 and Application-1 -- any given .pnd file may include multiple applications, so you need to assign your overrides to the correct &amp;quot;sub application&amp;quot;. It can be tricky to figure out which subapp you wish to override, but there are some tricks. minimenu, for example, shows the subapp-number in the detail panel. When looking at a .desktop filename, you'll notice #0.desktop .. some number after the # is the subapp-number.&lt;br /&gt;
&lt;br /&gt;
== How Do I Make .PNDs? ==&lt;br /&gt;
&lt;br /&gt;
{{IntroNote | The following is a work in progress, the instructions in here may or may not work for you. It was taken from PND quickstart.}}&lt;br /&gt;
&lt;br /&gt;
The steps to produce a pnd file are as follows:&lt;br /&gt;
&lt;br /&gt;
* create a directory to represent the application on SD card; i.e.: ./mame-app&lt;br /&gt;
&lt;br /&gt;
* create a PXML.xml file and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand&lt;br /&gt;
&lt;br /&gt;
* drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.) &amp;lt;- note, with a PXML.xml and executable, your Pandora can now find and run your app without even bundling it into a .pnd!&lt;br /&gt;
&lt;br /&gt;
* invoke /usr/pandora/scripts/pnd_make.sh (or on Windows, various commands in the command-line) to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)&lt;br /&gt;
&lt;br /&gt;
* you're done, distribute it as you see fit&lt;br /&gt;
&lt;br /&gt;
=== (alternate instructions) ===&lt;br /&gt;
&lt;br /&gt;
For these instructions, you will first need to grab the example file, [http://www.shiranui.in/pndexample.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
* Edit ./pnds.sh. I use that script to handle multiple apps at once. Each line represents a command line for an app / game to turn the directory into a PND. If I change the app / game, I simply uncomment the line in pnds.sh so that I can easily create or update multiple PNDs by simply running one single script.&lt;br /&gt;
* Run ./pnds.sh&lt;br /&gt;
* Upload&lt;br /&gt;
&lt;br /&gt;
Don't forget to check the license conditions for anything you re-distribute.&lt;br /&gt;
&lt;br /&gt;
== PXML.xml file? ==&lt;br /&gt;
&lt;br /&gt;
The PXML.xml file is the pnd file's metadata file and specifies things like:&lt;br /&gt;
* A description of the software&lt;br /&gt;
* A link to the icon filename&lt;br /&gt;
* What version it is&lt;br /&gt;
* The author, and their website&lt;br /&gt;
* Whether it's a beta or release version&lt;br /&gt;
* The menu categories the pnd file should appear in&lt;br /&gt;
* The license the code is distributed under&lt;br /&gt;
* Preview pictures, for display in minimenu or on the [[http://repo.openpandora.org/ repo]]&lt;br /&gt;
&lt;br /&gt;
You can use genpxml.sh to generate a template PXML.xml file for you (in /usr/pandora/scripts/), but&lt;br /&gt;
perhaps simplest way to make your first PXML.xml file is to look at an example one from a real pnd file, from the repo (where PXML.xml file are guaranteed to be valid).  The PXML.xml file will be inside the pnd file's root folder, and you can look at it using a text editor.&lt;br /&gt;
&lt;br /&gt;
== How Do I Look Inside a .PND? ==&lt;br /&gt;
&lt;br /&gt;
To open a PND, the easiest way is probably to use the [http://boards.openpandora.org/index.php?/topic/3756-pndtools/ PNDTools] or [http://boards.openpandora.org/index.php?/topic/3805-pnd-manager/ PNDManager] programs, which can browse and create PNDs. They're Windows-only, currently. &lt;br /&gt;
&lt;br /&gt;
You could also install 7zip on your home PC, change the .pnd's file extension to .sfs, and 7zip should be able to open it. (This is a simple way to look into a .pnd on Ubuntu: &amp;lt;code&amp;gt;unsquashfs FILE.pnd&amp;lt;/code&amp;gt; needs squashfs-tools installed) [http://boards.openpandora.org/index.php?/topic/3594-pnd-criticism/page__view__findpost__p__62546] On the Pandora, you can run a PND and look at what's inside [[Basic Linux Guide|/mnt/tmp]]. To do this in a terminal (on PC or Pandora), see [http://www.gp32x.com/board/index.php?/topic/58937-how-to-mount-a-pnd-and-see-the-gooey-bits-inside/ this tutorial].&lt;br /&gt;
&lt;br /&gt;
The [[PND Cookbook]] contains recipes for common PND tasks, like setting up your application's environment and configuration, locating and copying files, etc.&lt;br /&gt;
&lt;br /&gt;
== All these commands are hard.  Give me a GUI tool to do it ==&lt;br /&gt;
&lt;br /&gt;
Okay:&lt;br /&gt;
&lt;br /&gt;
*'''PNDbuilder''' by freedomdown. [http://www.gp32x.com/board/index.php?/topic/58587-pndbuilder/ Discussion]. [http://www.freedomdown.ca/storage/pndb.pnd Download v1.1 for Pandora].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I make .PNDs on Windows? ==&lt;br /&gt;
&lt;br /&gt;
=== Command-line ===&lt;br /&gt;
&lt;br /&gt;
For this command-line tutorial, I will assume you have already created a PXML.xml file.&lt;br /&gt;
&lt;br /&gt;
==== Preparations ====&lt;br /&gt;
Get yourself mkisofs tools; for example, grab from here: http://www.student.tugraz.at/thomas.plank/ -- get cdrtools-2.01-win32-bin.zip and DLL version 1.5.25, and extract to somewhere. That lets you run 'mkisofs' to spit out .iso files&lt;br /&gt;
&lt;br /&gt;
''If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/''&lt;br /&gt;
&lt;br /&gt;
==== Generate the actual PND-file ====&lt;br /&gt;
&lt;br /&gt;
Make yourself the iso; this step produces the iso, but to turn the iso into a pnd you need a couple last steps. You could also use some fancy iso-building tool.&lt;br /&gt;
&amp;lt;pre&amp;gt;mkisofs -o foo.iso -R /path/to/folder/myapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Append PXML.xml to the .iso (yes, the PXML.xml is included in the iso, but we also want to append it for performance reasons.) &lt;br /&gt;
&amp;lt;pre&amp;gt;copy foo.iso+PXML.xml foo.step2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)&lt;br /&gt;
&amp;lt;pre&amp;gt;copy foo.step2+myicon.png foo.pnd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clean up: &lt;br /&gt;
&amp;lt;pre&amp;gt;del foo.step2 foo.iso&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Profit!&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
&lt;br /&gt;
You have a few choices here: &lt;br /&gt;
*'''PNDTools''' by foxblock. Discussion: [http://boards.openpandora.org/index.php?/topic/3756-pndtools/ OP], [http://www.gp32x.com/board/index.php?/topic/60060-pndtools/ GP32X]. Can browse and create PNDs. Two (simple and advanced) editors for PXML creation. &lt;br /&gt;
*'''PNDBuilder''' by StreaK. [http://www.gp32x.com/board/index.php?/topic/59862-openpandora-pnd-builder-for-windows-linux/ Discussion] [http://www.gp32x.com/board/index.php?/topic/47088-pnd-builder-for-windows/ (old)]. Can create PNDs and edit PXML files. &lt;br /&gt;
*'''PNDManager''' by Speaker Ender. [http://boards.openpandora.org/index.php?/topic/3805-pnd-manager/ Discussion].&lt;br /&gt;
*'''PNDbuilder''' by freedomdown. [http://www.gp32x.com/board/index.php?/topic/58587-pndbuilder/ Discussion].&lt;br /&gt;
&lt;br /&gt;
== Mac OSX ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
: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.&lt;br /&gt;
: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.&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
: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.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the device that the PND is stored on.&lt;br /&gt;
&lt;br /&gt;
===What desktop environments do pnd files work with?===&lt;br /&gt;
:As described below, the pnd-files will cause the system to spit out standard &amp;quot;.desktop&amp;quot; files for each application contained. The Pandora firmware includes several desktop environments (ie: menus) that understand those files (or operate with pnd-files directly.) The &amp;quot;.desktop&amp;quot; files are a standard however, so you are free to install other desktop environments and they should work fine out of the box with pnd-files, without any alteration whatsoever,&lt;br /&gt;
&lt;br /&gt;
===Can a PND-file be unpacked and used?===&lt;br /&gt;
:A pnd-file may be unpacked into what is called a &amp;quot;PXML-application directory&amp;quot; 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.&lt;br /&gt;
:This is an advanced topic, noted here for completeness.&lt;br /&gt;
&lt;br /&gt;
===Can the PND-file system be added to other Linux distributions?===&lt;br /&gt;
:It is very easy to add the PND system to other Linux distributions, be they Pandora oriented or not. As of 2010 the Pandora APIs are are a little Pandora-specific, but effort will be made to split off the PND-file support and Pandora-specific support into separate systems, so that non-Pandora Linux distributions can even more easily adopt the PND-file system should they wish to. Certainly however, if you're building a new distribution to run on the Pandora, it is absolutely trivial to include PND-file support (and other Pandora originated technologies), so please do, to help for a consistent user experience.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
: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. See the folder listing below. By default, both SD slots (and other mountable media) on the Pandora will be monitored for PND-files, though everything is configurable for advanced users. &lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
This guide describes how to mount a PND file, so you can browse the files within (to find documentation, or otherwise eat its brain and gain its knowledge.)&lt;br /&gt;
&lt;br /&gt;
''For now, the information is being compiled in [[http://www.gp32x.com/board/index.php?/topic/58937-how-to-mount-a-pnd-and-see-the-gooey-bits-inside this thread]] where I am fine tuning it with some expert help. When all the facts are straight, I will replicate the information here. -Gruso''&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
: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:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - Deprecated to some extent, this directory is used to be _both_ menu and desktop, without having to copy the pnd-file into /menu and /desktop (avoiding duplication)&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop. This path should not be touched, and is included to make an easy avenue for the Pandora firmware developers to include essential tools for the user, when bundled as pnd-files. (As of this writing early 2010, such tools are built into the firmware without being pnd-files, but the option exists still.)&lt;br /&gt;
&lt;br /&gt;
==Advanced Information==&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured?===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying icon that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===How does the PND discovery mechanism work?===&lt;br /&gt;
:There is an open source API for working with pnd-files and PXML-application directories (among other tasks); this API can be used by developers wishing to take advantage of the pnd auto-discovery system, such as when developing a new menu system say.&lt;br /&gt;
:There is a special process called &amp;quot;pndnotifyd&amp;quot; that uses this API to watch the PND search paths for file changes. Once it finds a new PND file, it uses the PXML.xml file to generate one or more &amp;quot;*.desktop&amp;quot; files for the PND. (A .desktop file is a open standard way of describing an application and how to execute it, and is supported across most popular desktop environments.)&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files?===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts?===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;br /&gt;
&lt;br /&gt;
===How can I open a PND file to see what's inside?===&lt;br /&gt;
The simplest way is probably to use [http://boards.openpandora.org/index.php?/topic/3756-pndtools/ PNDTools] or [http://boards.openpandora.org/index.php?/topic/3805-pnd-manager/ PNDManager], which currently only work in Windows. You can also use them to edit PNDs and create them.&lt;br /&gt;
&lt;br /&gt;
===How do I set up a script to run before/after a specific PND runs?===&lt;br /&gt;
&amp;lt;sup&amp;gt;(Using [http://sebt3.openpandora.org/pnd/pnd_run_installer.pnd pnd_run.sh] or as of Zaxxon HF6 Alpha 1)&amp;lt;/sup&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The pandora will look in the program's appdata folder for a bash script named &amp;lt;b&amp;gt;PND_pre_script.sh&amp;lt;/b&amp;gt; to run before the PND is run, and &amp;lt;b&amp;gt;PND_post_script.sh&amp;lt;/b&amp;gt; to run on the PND's closing. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;All information pulled from [http://www.pandorawiki.org/PND_nub_modes] and may be subject to change due to updates.&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:PND]]&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>Edlee</name></author>
		
	</entry>
</feed>