Sei sulla pagina 1di 16

Home Sign Up!

Explore Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Ride Science Sports Tech

Wikipedia in your pocket


by PKM on April 19, 2008

Table of Contents

intro: Wikipedia in your pocket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 1: Required materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 2: Find the CF card device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 3: Partition and format the CF card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 4: Set up the filesystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 5: Install Kludged Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 6: Install your Wikipedia dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 7: Put it together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 8: Set up Dillo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 9: Using Dillo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 10: Optional: Text browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 11: You're done! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 12: in which the author solicits contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Make Magazine Special Offer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

http://www.instructables.com/id/Wikipedia-in-your-pocket/
intro: Wikipedia in your pocket
aka. The Hitchhiker's Guide to the Galaxy, v1.0 :)

This Instructable will set out how to construct what I believe to be a unique implementation of Wikipedia in an offline, portable device. It involves installing a stripped-
down distribution of Linux on a Psion 5mx handheld, and installing a static HTML version of Wikipedia for use with one of two browsers. Most importantly, you do not
have to be a Linux wizard to achieve this. I will assume a basic familiarity with computers, but you do not need experience with the intricacies of filing systems, compiling
source code and the stuff that traditionally puts people off using Linux. Following the steps in this Instructable should let you create your own HHGTTG- I will explain what
I am doing but also try to give as explicit instructions as possible.

(For this reason, seasoned linux hackers can take the "skip this step" instructions provided at the top of the steps involving partitioning the CF card and unpacking
archives to it)

Also, I apologise deeply for how dry this Instructable is. I have tried hard to make the bulk of it readable without skimping on detail or being overly prolix, but explaining
how to partition a removable volume and unpack .tgz archives to it is difficult to make amusing. Sorry.

Lastly, but by no means least, I could not have done this without the efforts of:

the people who ported Linux to the ARM,


the OpenPsion (née PsiLinux) community for porting Linux to the Psion,
Adrian Wells for Kludged Linux, and of course
all the good folks at Wikipedia.

My hack pales into insignificance compared to any of these achievements. (This lengthy grovel is mostly lest anyone accuse me of taking credit for the work of others. I
emailed Adrian on the 22-04-2008 to ask if he objected to me reproducing his works here, but had no response)

Image Notes
1. Wise advice.

step 1: Required materials


The major sticking point for this Instructable is that you require a working Psion 5mx. These are comparatively rare, but by no means unobtainable- a quick ebay search
revealed 16 on the first page of a search for "psion 5mx". They are not cheap, usually running to around £70, but you may well find one for less, or even free if a friend
has one they no longer use.
The other parts can be easily obtained more cheaply- I spent about £15 for all the parts except for the Psion, which was a gift.

You will need: (with approximate cost)

- A working Psion 5mx PDA. Around £70 (ebay), or possibly free if you search enough attics.
- A Compactflash card of at least 1GB- I recommend a 4GB card. £11 (ebay)
- A Compactflash card adapter for your PC, either USB or PCMCIA. £4 (ebay)
- A PC running Linux. If you don't have it installed, I would suggest burning a live CD or making a bootable USB drive for a distribution such as Puppy.
- The archives with which to install Kludged Linux on your Psion. These may be found at Adrian's site here, at the bottom of the page under "download". If his site should
disappear, let me know and I will provide my copies for download
- Static HTML dump of Wikipedia.
Text-only dump from 2003 (large file download)
CD distribution of 4,500 good articles with thumbnail images (warning, 750MB file download)
There is a static dump of the entire English language Wikipedia as of June 2008 here: http://static.wikipedia.org/downloads/2008-06/en/
- A flask of weak lemon drink

Image Notes
1. If you don't have access to a computer with Linux installed, a live CD such as Puppy will do fine. It does need fdisk, however.
http://www.instructables.com/id/Wikipedia-in-your-pocket/
2. USB or PCMCIA CF card reader. 5GBP on ebay.
3. Towel for added frood points.
4. Not pictured- flask of weak lemon drink.
5. Working Psion 5mx- find one where you can. This does not work on the 3 series.
6. CF card- must be at least 1GB to be useful, I recommend 4GB or more. About 11GBP on ebay
7. Also not shown, the Kludged Linux archives and offline Wikipedia dump, because they exist in some false pixelated metaphysical computer plane and cannot be
touched and tasted and felt and smelt and seen.

step 2: Find the CF card device


Before you start, it goes without saying that you should back up any important information that may be on the Psion. It is also possible (although unlikely) to format your
computer's hard disk during this step, but this should not be a worry if you take sufficient care during the formatting stage. Also, if you are using Puppy it shouldn't even
mount your hard disk unless you explicitly tell it to.

For Linux wizards- to skip this step, determine the device ID (eg /dev/hde or /dev/sdb) of your CF card, ready to partition in the next step

Open a console, and determine what device the CF card is mounted as. You can do this by typing:
cd /dev
ls -l > ~/devices1

Then plug the CF card adapter into your PC, and type:
ls -l > ~/devices2
cd ~
diff devices1 devices2

You will see a line or two beginning with > with no matching line beginning with <. The cryptic few letters are what we are looking for. See image 1
Type
cd /dev
ls xxx
where xxx are the letters you found earlier- these are likely to be hde, sda, sdb or similar. Now plug the CF card into the reader and type
ls xxx*
You should see, in addition to the one you saw earlier (eg "sdb") another entry with a number after it, eg "sdb1". This represents the partition on the CF card, whereas the
entry with no numbers (sdb) represents the card itself. See image 2

Image Notes
1. The device name will likely be three letters with a d (for drive) in the middle. Image Notes
Ignore the numbers for now, we'll cover those later. 1. Unplug flash card before this step
2. Plug in flash card between these steps. 2. This is the device representing the flash card (actually the card and the card
reader count as one device)
3. Plug in the card before doing this step
4. These represent the partitions on the CF card. You will likely only have one, I
took these screenshots out of order.
5. I can't be a true Linux geek- my computer doesn't have a japanese girl's
name :)

step 3: Partition and format the CF card


To skip this step: create primary partition 1 as an 8MB, bootable MSDOS (type 4) partition, and primary partition 2 as non-bootable Linux (type 83) taking up
the rest of the card

For this step you will require admin privileges on the Linux machine. The easiest way to do this is type su and the root password, but if you're overly concerned or don't
have root access you can type sudo for the important commands and give your user password.

Type fdisk /dev/XXX where XXX is the device identifier we found earlier. From now on I will refer to it as XXX.

Type p to print the partition table- if an entry such as this appears, type d to delete it. Type p to check there are no remaining partitions- if there are, type d again to
remove any remaining ones. See image 1

Now type n for a new partition, p for primary, 1 for partition 1, 1 to start it at the beginning of the disk, 8M to make it 8MB in size
a then 1 to make it bootable
t then 4 to make it a type 4 (DOS) partition. Type p again to check your current partition table. See image 2

Now type n for a new partition, p for primary, 2 for partition 2, 9 (or the lowest number available) to start it after the end of the DOS partition, 1023 (or the highest number
available) to make it fill the remaining space
http://www.instructables.com/id/Wikipedia-in-your-pocket/
t then 83 to make it type 83 (Linux)
p again to make sure your partition table looks like picture ####.

w to write your changes to the card, then q to quit.

Now if you type ls /dev/XXX* again you should see XXX for the CF card, XXX1 for the DOS partition and XXX2 for the Linux partition. If this happens- congratulations,
you've done the most difficult part of this Instructable. Drink deeply from your flask of weak lemon drink to congratulate yourself on your victory of the machine.

Image Notes
1. Incomprehensible rubbage we don't need to be overly concerned about
2. The important part- we need to delete this partition and replace it with a
small DOS one and a larger Linux one

Image Notes
1. Delete the partition on the card
2. Create a new, 8MB primary partition 1
3. The filesystem type is wrong- fix this in the next step

Image Notes
1. New primary partition 2...
2. ... starting where the last one left off...
3. ... filling up the remaining space.
4. Make it type 83 Linux, it doesn't want to be bootable.
5. These space numbers may be different for your card, especially if it isn't 4GB,
but the rest should look pretty much the same (except device letters if yours are
different from mine)
Image Notes
1. Who'd have thunk there were this many types of file system? We are only
interested in 4 and 83.
2. Make partition 1 bootable, then set the file system type...

http://www.instructables.com/id/Wikipedia-in-your-pocket/
step 4: Set up the filesystem
To skip this step, create a DOS filesystem on partition 1, and an EXT2 on partition 2. Put a file on the DOS partition, then plug the card into your Psion and
start it up to make sure it is happy with the partitioned CF card

Type mkfs.msdos /dev/XXX1 and then mkfs.ext2 /dev/XXX2 . Now you are ready to make sure your Psion is happy with the CF card.

Type cd /mnt
mkdir psiondos
mount -t vfat /dev/XXX1
/mnt/psiondos
cd /mnt/psiondos
touch hello.txt
to mount the card on your PC, and create a file on the DOS partition, then
cd /
umount /dev/XXX1
to unmount the card.

Now plug the card into your Psion and turn it on. Use the button in the bottom left of the screen to navigate to the D drive- you should see your file hello.txt in the file
manager. If you do, then the Psion is happy with your card and you can proceed to install Linux on it. If not, either there was a problem with creating the filesystem in the
previous steps or your Psion does not recognise the card- try repeating the previous steps, getting a friendly Linux wizard to set up the file system for you, or (as a last
resort) try with a different CF card to see if you can find one that works.

Image Notes
1. The D drive represents the CF card
2. You won't have this at this stage, I took the photos out of order so this is part of the Linux installation
3. More Linux installation stuff
4. I give my test files silly names to avoid mistaking them for system files. Dave is a popular choice- I've never found an operating system component called Dave.

step 5: Install Kludged Linux


To skip this step, untar the Kludged Linux archive ksf_.tgz to the Linux partition, and the contents of the files directory in the files.zip archive to the DOS
partition

Plug the CF card back into your PC, and repeat the
mount -t vfat /dev/XXX1 /mount/psiondos step.

Now type
cd /mnt
mkdir psionlinux
mount -t ext2 /dev/XXX2 /mnt/psionlinux
to mount the second partition.

Now you need to unzip the contents of the files.zip archive, and copy the contents of the files directory into /mnt/psiondos. One way to do this is
cd ~
unzip /path/files.zip (where /path/files.zip is the path to where the zip archive is saved)
cd files
cp -r * /mnt/psiondos

Now you need to unpack the Kludged Linux distribution to the Linux partition. Type
cd /mnt/psionlinux
tar -xzvf /path/ksf_.tgz (where /path/ksf_.tgz is the path to the Kludged Linux archive, eg , eg ~/downloads/ksf100807.tgz)

This will take a few minutes, so drink your flask of weak lemon drink while pondering life's imponderables.

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Image Notes
1. Not much to show in pictures here, so have some weak lemon drink to tide you over until step 6

step 6: Install your Wikipedia dump


To skip this step, unpack your dump of Wikipedia to somewhere sensible on the Linux partition, for instance /usr/Wiki

How you do this step will depend on which Wikipedia dump you are using. I will show the process for the CD distribution.

You can just unpack the archive straight to the CF card, but in my experience there may be some teething troubles with the installation of Linux which require clearing
and rewriting to the CF card, so in the long run it is more sensible to unpack to your hard disk and copy the completed dump to the CF card.

Create a directory for your dump to be unpacked into, for instance by typing
cd ~
mkdir wikidump

Unpack the archive into this directory:


cd wikidump
unzip /path/school-wikipedia-small.zip

This will take a while, depending on the size of your dump and speed of your computer. I suggest you take this opportunity to refill your flask of weak lemon drink, adding
flavour enhancers such as ginger, lime juice or vodka to suit your taste. Once the archive has finished unpacking, find the directories you require- for the CD distribution
these are wp andimages. Copy these to the Linux partition in the /usr directory:
cp images wp /mnt/psionlinux/usr/

This will take a long time- upwards of 10 minutes for the CD dump which is around a gigabyte in size. Take your flask of weak lemon drink to the brow of the nearest hill
and gaze towards the horizon, imagining the untold numbers of things you will do with your new Wikipedia-in-your-pocket, such as travelling the country hustling pub
quizzes. Return from your dreamlike reverie and return to the computer to see your dump finish copying to the CF card. From the CD version you will also need to copy
the index.htm file from the root of the archive:
cp index.htm /mnt/psionlinux/usr/

You are now ready to put the card in the Psion and get going!

(Note: I used both the Terodump and the CD version, because the Terodump has a broad coverage of short text articles, whereas the CD version has more up-to-date,
detailed articles with images about important topics, so the two together have both breadth and depth. Space constraints on your CF card may limit your choice of
Wikipedia dump, in which case you will need to choose the version that best reflects your desired usage.

If you are installing two different versions, I suggest putting each in its own directory, for instance /usr/terowiki and /usr/cdwiki). What you copy across will depend on the
wikipedia dump you are using- from a Terodump you basically want the "wikipedia" directory and everything in it, and maybe the "index.html".

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Image Notes
1. Bonus points for drinking your weak lemon drink at an altitude greater than 2,000m above sea level
2. A nice spot to ponder while your CF card is filling.

step 7: Put it together


You are now ready to start using the Psion. Unmount the CF card:
umount /dev/XXX1
umount /dev/XXX2

Unplug the CF card and plug it into the slot on your Psion. Turn on the Psion, navigate to the D drive, and double click on arlo.exe to run it.

The Psion should present you with a boot menu- you can press 0 to boot up or wait 5 seconds for it to continue. You will then see a penguin logo and a lot of text scrolling
past as Linux starts up. The boot sequence may complain of error in the filesystem- unless these are serious enough for the boot sequence to stop, they can usually be
ignored. You will eventually see a boot prompt saying
Debian GNU/Linux 3.1 tty1
(Root password is "root")

Psion login:

Type root as username and password, and you will reach a command prompt (root@Psion: ~#). See image 1.

Congratulations- you now have a very small and quite underpowered Linux palmtop. Drink a toast to your success with the remainder of your weak lemon drink. However,
the command prompt is not a very useful place to be if you want to browse Wikipedia. Type xinit to start the X window system. You should see the screen turn blank for a
moment, then a stippled pattern with a black X in the middle of it. If the screen remains blank for more than about 10 seconds, go to the bottom of this step to find the "No
X startup" fix.

After the stipple background shows for a few seconds you should see a taskbar at the bottom of the screen- this consists of a CPU usage meter (useful for telling whether
the Psion is thinking hard or not), a Menu button that holds the applications, and a clock (that will probably be wrong- ignore this).

See image 2

The parts below are for information purposes- if you are happy at this point in the install you can continue to the next step.

To turn it off:
To quit X, press Ctrl-Menu-Backspace to return to the command prompt. To turn off the Psion (for instance to change batteries or add additional content to the CF card),
type shutdown -r now at the console, and press Menu-Esc after the Psion beeps, while the screen is blank or displaying the boot menu but before the penguin appears.
You can now safely remove the CF card and batteries- when you want to use the Psion again, replace these and turn it on, and it will boot up Linux. Note that you do not
have to shutdown the Psion to turn it off- just press Menu-Esc to make it sleep, and press Esc or tap the screen to wake it back up. It is only necessary to shut it down to
replace batteries or the CF card.

To go back to "being a Psion":


To return to the Psion's EPOC operating system (but why would you want to when you have Linux?), turn the Psion off as above. Remove the CF card, and turn the
Psion on. It will give three falling beeps, and return to the PSION Series 5 startup screen. To return to Linux, you will need to navigate back to arlo.exe on the D drive and
run it.

No X startup?
I have found that occasionally, especially if the Psion complains of errors in the file system, it will refuse to start the X window system. If the xinitmmand just shows a
blank screen, press Menu-1 to get back to the console. If it says "Touchscreen not found" or something similar, shut down the Psion as described above and restart it-
this fixed the probem every time it occurred for me. Also, since running e2fsk on the linux file system while teh CF card was mounted on my PC has stopped the Psion
complaining of file system errors, and the "Touchscreen not found" bug has not reoccured. YMM, as always, V

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Image Notes Image Notes
1. Inability to type on the tiiiny keyboard coupled with impatience and a slow 1. Yes, it's the reflection of my fingers on the shutter button. Yes, I'm hanging my
processor. head in shame at this very moment.
2. We have a Linux prompt! 2. Applications. Dillo is the most important, although there is also a mean game of
Hangman
3. Menu button
4. Left to right: hide taskbar button, CPU activity graph (very useful) and clock
(less so).

step 8: Set up Dillo


Tap the menu button, and select Net -> Dillo from the menu that pops up. From this point onwards you will need patience, many GUI processes take quite a while running
on the slow Psion processor.

Dillo is just a lightweight web browser, so can be used like any otther (type an address in the address bar, click on links to activate etc.). To be useful on the Psion
screen, however, it requires a few tweaks.the V menu and select "Options...". This will take around 30 seconds to load, with little indication that it is happening other than
the CPU graph, but you will eventually reach an options screen. Tap the "Font" tab and set the font factor to around 1.4 depending on how large you want text to be (2
gives very large, clear text, 1.2 gives smaller text but allows more to fit on screen).

If you can handle another lengthy-ish wait, tap the Color tab and the Link color block. After another pause you will see a color selection screen- I suggest setting the value
slider to a low value to make links more visible on the LCD.

Finally, under the Network tab you will find the start page and home page addresses- I suggest setting both of these to the path of the index page of your Wikipedia
dump, as it will appear on the psion's file system, prefixed with file:// because it is not a web address (For example file://usr/index.htm)

Once you are happy with the settings, click the Save button, quit Dillo and restart it from the menu. It should start up to your Wikipedia dump index page.

Image Notes
1. Magnification factor of text on screen. Set to somewhere between 1.2 and 1.8 to trade legibiltiy against amount of text on screen.
2. I didn't have the patience to wait for screenshots of these two, but the setup is fairly straightforward.
3. More finger reflections- taking photos of LCDs is too difficult without shiny studio lighting.

step 9: Using Dillo


Dillo is easy to use to browse Wikipedia with- the scrollbar on the right-hand side, home button at top left and links within pages are all you are likely to need. The touch
screen defaults to delivering a left-click. Pressing Ctrl-1, Ctrl-2 or Ctrl-3 will set it to deliver left, middle or right clicks accordingly, so pressing Ctrl-2 before clicking on a
link will open the link ina new tab. (I don't recommend this, for the record, because the Psion is slow enough with one tab open!). Remember that these are persistent
modifiers, so after changing it every click will be a middle- or right-click until you set it back to left click with Ctrl-1.

/ or Ctrl-F can be used to search for text within a page, although if Dillo is running in full-screen mode the search term text box will not be shown. More on how to use Dillo
can be found at their homepage here at www.dillo.org.

Now you can go to the index page, search for, for instance, lemons, to find out all about your favourite hobbyist's beverage.

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Image Notes
1. Pictures are displayed- photos look fairly poor, but diagrams and maps can come out OK
2. Tap links to follow, nothing surprisng there
3. The scrollbar is about 3 or 4mm across- you will want something reasonably pointy to use on the touch screen. I use a plastic mechanical pencil tip gently.
4. Full screen button removes the toolbar, search bar etc. for more viewing area- very handy when you only have 240 vertical pixels! This shot is in full screen mode.

step 10: Optional: Text browser


Dillo is very easy to use and gives the option to view pictures, but suffers from slowness and the fact that the text is graphically rendered so not as sharp as the text in
character mode. If you would prefer a text-mode browser for faster browsing, sharper text and general hairy-chested text-mode Linux wizard points, Kludged Linux
includes the dpgk utility to install .deb packages. Links is a text-mode browser with a very low memory footprint and few dependencies, making it ideal to install on the
Psion. The deb package can be found on the debian old stable package repository. To install links:

Download the ARM architecture links package to your PC from one of the mirror links on this page
Shutdown the Psion (shutdown -r now at the console, then press Menu-Esc after the beep before it boots up again) and remove the CF card to plug into your PC
Mount the CF card (mount -t ext2 /dev/XXX2 /mnt/psionlinux)
Copy the file to the CF card (cp /path/links_blah.deb /mnt/psionlinux/usr/)
Unmount the CF card (umount /dev/XXX1), plug it back into the Psion, turn it on and wait for it to reboot.
Now, after logging in, type
'cd /usr
dpkg -i links_blah.deb (tab completion helps out here, you can just type "dpkg -i links" and press tab to let the prompt complete the command for you
links index.html (or whatever the path to your index page is) will start links at the chosen page. Again, sorry there are no screenshots but IIRC this process doesn't give
you much feedback if everything works OK, so there's not much to show.

Links takes a little getting used to, especially as it scrolls page by page rather than line by line. The important commands in Links are:
space- down a page
b- up a page
down arrow- next link
up arrow- previous link
right arrow- follow highlighted link
left arrow- back
esc- open menu (while in menu, arrow keys navigate as expected)

Again, more about how to use Links at their website.

Image Notes Image Notes


1. Links appear in bold; the currently selected link is highlighted in black apart from 1. Using / to find text highlights all instances of that text
the first letter.
2. Text mode has a much nicer font than the rendered text in Dillo, one of the
reasons I like using Links.
3. The target of the currently selected link.
4. I set links to monochrome mode, because the contrast ratio of the screen isn't
great without greying out links. This is a personal preference, however- your
eyesight may vary :)

Image Notes
1. Mmmm, delicious knowledge.

http://www.instructables.com/id/Wikipedia-in-your-pocket/
step 11: You're done!
Congratulations- you now have an object of beauty, utility and massive geek bragging rights. Show it off to appreciative audiences of hackers and Douglas Adams fans.
Take it to a pub quiz and be ejected. Be the guy who has the answer to obscure and irrelevant questions.

And most importantly..

Don't panic!

step 12: in which the author solicits contributions


Firstly, thanks to everyone for your positive comments! It means a lot to hear people "sass" my work :)

Secondly, it has come to my attention that a fair few people have different hardware they would like to try this on, but can't get their hands on a 5mx.

Using a Psion makes it difficult.

The original Psion operating system was no good because it didn't have the ability to display HTML files, which ultimately are what Wikipedia is made of, so installing
Linux was necessary to get this feature. There are plenty of modern PDAs and smartphones that already have a browser, some even running Linux out of the box, that
would make great bases for a similar project.

If your PDA or smartphone has a browser, all you have to do is get a large memory card that your device can read from, and unpack a static wikipedia dump
to it.

If you have a Nokia 9300, you don't need to install Linux- it already has a browser with the Symbian OS it's running, so all you should have to do is plug in a memory card
with the wiki dump on it.

If you have your own device and are thinking of doing something similar, I would love to see photos or screenshots of it running- if you're happy for me to do
so I will add them to this Instructable and credit you

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Image Notes
1. Now that's what I call a 'tache.

Related Instructables
Advertisements
Make Magazine Special Offer

Comments
50 comments Add Comment view all 148 comments

natcrazz says: Oct 22, 2008. 2:58 PM REPLY


What other devices can I use for this? Is it anything that will run linux? Would it work on a blackberry? I'm not very experienced with this type of work with
computers.

PKM says: Oct 23, 2008. 3:23 AM REPLY


My instructions are largely geared towards doing this with linux on the Psion. It will work with any device that has a browser and enough internal or
external storage for the wikipedia dump. If you have a device that already fits those requirements, you just need to unpack the wikipedia dump onto the
memory card (see steps 2, 3, 4 and 6).

I have resisted the temptation to get a Blackberry so I'm not sure how it would work on one of those, but I don't think they have web browsers so it
probably wouldn't. If you have a Blackberry and it does, feel free to correct me.

kelseymh says: Oct 15, 2008. 12:44 AM REPLY


Very nicely done. The platform-specific level of detail is quite appropriate to Instructables (there are nore than enough newbies at any given time to justify the
over-explanations). At the same time, the capture and installation of a static Wikipedia is sufficiently platform-independent that a non-newbie ought to be able
to adapt your I'ble to their platform with no trouble at all. 4.5 stars :-)

http://www.instructables.com/id/Wikipedia-in-your-pocket/
Ward_Nox says: May 12, 2008. 8:53 PM REPLY
wikipedia really is like the guide if think about it its a e-book writen by millions of people

Nesagwa says: May 13, 2008. 9:24 AM REPLY


There are more similarities. Much like in the novel, Wikipedia is moderated by the worst possible people in the universe and most people dont like them.

Ward_Nox says: Oct 15, 2008. 12:14 AM REPLY


yea Douglas Adams probably would have let them call it the hitchhikers guide to earth if he'd been alive to ask when it started

killerjackalope says: May 15, 2008. 3:57 PM REPLY


Almost as bad as youtube users...

upriverpaddler says: Jun 13, 2008. 2:56 PM REPLY


I have an HP 660lx that could run Jlime. I'm googling my butt off to do something similar. I came across this for you Psion users.

http://www.pscience5.net/PGG.htm

jornada660 says: Oct 11, 2008. 7:04 AM REPLY


How to install jlime - linux on hp palmtop 660lx

http://fz.hobby-site.org/hp660lx/jlime-stable/

http://fz.hobby-site.org/hp660lx/jlime-winter/

Regards

abadfart says: Oct 9, 2008. 2:53 PM REPLY


how much did you spend?

PKM says: Oct 9, 2008. 4:10 PM REPLY


As the first step says, the parts I needed to actually buy only cost me £15. I was lucky to get the Psion free- they are the major expense, usually £70-£80
or even more on ebay. (For US$ multiply by about 2 then subtract a things-are-cheaper-in-the-states fudge factor).

Klappstuhl says: Oct 5, 2008. 1:42 PM REPLY


Compliments on your incredible Instructable! I'm so going to do something similiar to the Plastic Logic Reader once it comes out!

PKM says: Oct 5, 2008. 2:51 PM REPLY


Thanks! The PLR certainly looks like a nice bit of kit, and if it has a non-crazy price and reads open format (HTML, PDF) then it might be the ebook
reader I've been looking for. I've steered clear of the Kindle because although technically you can read plain text and get them to convert your rich
documents, it still smells a bit too much like vendor lock-in for my free-software sense of "fair play".

superquack11 says: Sep 26, 2008. 6:12 PM REPLY


ha ha cool hitch hikers guide to the galaxy

MostlyHarmless says: Sep 9, 2008. 8:33 PM REPLY


Kudos to PKM on the instructable, if it weren't for the requirement of a Psion 5mx I'd be doing it right now.
For anybody wondering about Wikipedia's Database Dumps and related information
http://en.wikipedia.org/wiki/Wikipedia:Database_download

keastes says: Sep 23, 2008. 9:13 AM REPLY


not quite sure how it was managed to get the dump on a card if I could figure that out I could port it to palm (antique m505 owned and used as an ebook
reader nice repurpose no?)one thought that occurred to me: import to ereader (or one of its ilk) and use that

PKM says: Sep 23, 2008. 10:28 AM REPLY


Getting the dump onto the card was done in the rather impenetrable steps 2, 3, 4 and 6. The dump comes as a huge zip file full of HTML files, which
are unzipped onto the card. I did it all using command line because I figured the instructions would apply to the most people in that way, but you can
probably find graphical tools to do most of those steps.

You are right, this is reinventing the wheel somewhat as people have already put wikipedia dumps in ebook format for a number of popular readers.
Googling around for "wikipedia ebook (your ebook reader name here)" should find it if someone has for your particular format. Bear in mind that the
http://www.instructables.com/id/Wikipedia-in-your-pocket/
machine you use needs several gigabytes of storage, though, so you will need a large memory card that fits your m505.

juicebarjoseph says: Sep 9, 2008. 8:01 AM REPLY


I recently found something similar for the DS which I'm currently in the process of downloading.

link: http://www.dcemu.co.uk/vbulletin/showthread.php?t=144827

PKM says: Sep 9, 2008. 8:36 AM REPLY


Interesting! DSs seem to be a little more widespread than 5mxs (slight understatement) but how much storage space do they have? Surely the wiki
markup can't be that much smaller than the HTML of the pages?

Anyway, if you download this and get it working, I'd love to see screencaps and I'll add them to the Instructable if you like.

keastes says: Sep 18, 2008. 2:22 PM REPLY


NDS roms are 64 MB you can buy rewriteable cards and readers somewhere....

juicebarjoseph says: Sep 9, 2008. 8:58 AM REPLY


Apparently it'll all fit on a 4 Gb micro SD card... I don't have one yet, so am trying it on an emulator... hopefully if it works, I'm gonna enlist the help of
a friend of mine who does computer science and cybernetics to build a crawler to get an updated version of wikipedia without all the user pages, talk
pages and article stubs, which should hopefully cut down on file size... just got a 2 day download left :S

PKM says: Sep 9, 2008. 9:20 AM REPLY


I thought of that when I was first planning this- Wikipedia explicitly forbid crawling the entire site. For one thing, at one page per second it would
take you weeks to download the whole thing, but anyway I believe they make a dump available that doesn't include talk pages etc- check out the
wikipedia offline downloads page.

juicebarjoseph says: Sep 9, 2008. 9:55 AM REPLY


I would try downloading the dump and compressing it myself into a file readable by the software, but that sort of thing is way beyond my
scope. The 'guide' to do it is at this link:
http://forum.palib.info/index.php?PHPSESSID=eeb49af14cbd4f9920accbc59b2484a0&topic=5616.msg38330#msg38330
but the while thing makes no sense to me at all.

scorcher says: Sep 11, 2008. 5:30 AM REPLY


nice instructable but....you had to use that pic now didnt you!?

Istarian says: Sep 6, 2008. 8:58 AM REPLY


I'm sure this has been asked before, but the comments are quite endless. I can't seem to download the latest wikipedia dump. For some reason I get a file
named like the dump, but it is only 7KB rather than the whole 14G (note that it takes less than a second to get that file). I have had no problem in the past
downloading up to several GB at a time. Is there a way around this? I am using Firefox 2 but I do have IE 7 as well. Also, do you think this a size of file
download issue or some other problem?

PKM says: Sep 6, 2008. 9:44 AM REPLY


First question (apologies if you aren't a noob and this seems obvious to you), were you clicking on the link to get to the index page, then downloading the
tar.7z file, ratehr than right-clicking on my link and selecting save as?

Secondly, if you were actually downloading


http://static.wikipedia.org/downloads/2008-06/en/wikipedia-en-html.tar.7z
then I'm not sure. I just tried it and I got the first few megabytes, FF told me I had 1 day and 9 hours to wait so I guess it had the complete file. Are you
behind a firewall, proxy or other restrictive layer that might prevent your download? It's worth trying to open the file you get- it might be an HTML file
saying "To stop you using all our bandwidth, you aren't allowed to download this file- talk to your network administrator" or words to that effect. Similarly if
you are using a connection with a restrictive bandwidth cap, AOHell or something similar- I can't speak for any of those.

If none of these apply to you, I can only suggest you try to find the file through Wikimedia in case they have moved it somewhere recently and I'm finding
the UK mirror service copy or something weird like that.

lifelong-newbie says: Sep 4, 2008. 1:52 PM REPLY


Found my self double taking at the title of step 9. But then again i'm wrong in the head.

PKM says: Sep 4, 2008. 3:35 PM REPLY


I just read that and went "What was step 9? .... No, I totally see how that happened."

Maybe I'm wrong in the head as well.

who am I kidding "maybe" I've known that for ages

http://www.instructables.com/id/Wikipedia-in-your-pocket/
lifelong-newbie says: Sep 5, 2008. 12:46 PM REPLY
There's no organisation for us though. Wrong in the head anonymous?

puffyfluff says: Aug 11, 2008. 8:15 PM REPLY


Yeah! I just finished extracting it! Now to get the psion...

perlpower says: Jul 28, 2008. 8:55 PM REPLY


Current Wikipedia Dump:
http://static.wikipedia.org/downloads/2008-06/en/
It's 14GB though

puffyfluff says: Aug 11, 2008. 8:15 PM REPLY


I used a friends' broadband internet to download it. It only took five hours.

alinome.net says: Jul 26, 2008. 9:57 AM REPLY


Congrats for the good article. I'm a Psion 5mx user since 2002 and I'm fully satisfied with it. The EPOC OS is great. Last weeks I've been tinkering with
installing GNU/Linux in one of these machines (I own several), an old plan of mine. It's great seeing a Debian running on an old good 5mx!

But I was astonished by these words in the article:

"The original Psion operating system was no good because it didn't have the ability to display HTML files, which ultimately are what Wikipedia is made of, so
installing Linux was necessary to get this feature."

I'm afraid the author never used a Psion 5mx. The true is that there are two web browsers for Psion (I use them a lot):

1) All Psion 5mx are bundled with a web browser called... Web. It's in the PsiWin CD. You have to install it. It's not the fastest browser on Earth and has
many limitations, but works fine. The last version is 2.00 (1999).

2) There's an Opera browser for EPOC! It's version 5.14. It's much faster and powerful than Web and more advanced than the current versions of Dillo. You
can get it at Opera's public FTP.

Both browsers are very easy to install.

Thanks again for the interesting instructable.

Cheers,

--
http://alinome.net

PKM says: Jul 26, 2008. 3:28 PM REPLY


Hi alinome,

I have used a "vanilla" Psion, but I had no idea the Psion came bundled with a browser! I was given mine by a friend without any of the cables, CD and
other accessories so I only saw what was on the machine "out of the box". I don't count the Opera for EPOC as it's an external add-on piece of software,
but it seems I'm guilty of not doing my homework sufficiently. I will amend the Instructable when I get a chance (I'm on holiday at the moment)

I'm quite annoyed because I managed to break the screen on my Psion, so I'm wondering whether to get a replacement one and plug the CF card
straight into it, or try the v2.0 with something like a Nokia internet tablet.

alinome.net says: Jul 27, 2008. 10:50 AM REPLY


Hi, your instructable is very good and it encouraged me to install Debian in one of these marvellous machines, but your wrong premise made me
suposse you are a Linux fan who got a 5mx and immediately decided to install Debian in it, but never used the computer.

I'm a Debian user since the 90's, but I couldn't do without my Psion, its many good apps and some programs I wrote for it. I use a German Psion 5mx
Pro with a Spanish EPOC. I love to write, to program and to travel by bike. That's why this machine is still unbeatable for my needs. I hope I will use
both EPOC and Debian in my Psion soon.

I don't understand what you mean with "I don't count the Opera for EPOC as it's an external add-on piece of software"... Do you mean you would use
only the apps bundled with the Psion? There are many good third party apps for Psion; now almost all of them are free (as in free beer)
abandonware, and many are --free (as in free speech) :-) Why not to use them? Also Dillo and the whole Debian are "external add-on pieces of
software"...

I suggest you to update the article to include and compare all the alternatives:
EPOC + Web
EPOC + Opera
Debian + Dillo
Debian + Lynx

And there are more:


Debian + ELinks (my favourite browser)
Debian + Links
Debian + Links2
Debian + w3m
http://www.instructables.com/id/Wikipedia-in-your-pocket/
but those console browsers are not bundled with the Adrian's distro. I will explore how to install them, especially ELinks.

Anyhow I think Opera is the best option for your goal, in all aspects.

Sorry for your broken screen. I suffered it too some time ago. That's why the last years I bought spare Psions on eBay. They are very cheap and I still
do prefer a Psion than any modern tablet or PDA. Only 350 g, a good keyboard and 20-30 working hours with two AA standard rechargable cells are
unbeatable features. Happily I don't need color or videos or music... :-) But I miss Ethernet, USB... :-(

Cheers,

--
http://alinome.net

ajwells says: Jul 22, 2008. 11:03 AM REPLY


I,m very happy someone has found my Kludged linux useful. I also appologise for missing the E mail PKM sent me asking for permission to reproduce my
work. I do not object at all that he has done this. I have recently produced an updated Kludged linux, based on Debian linux 4.0 (Etch), This has only a text
browser included, ans so for anyone following this instructable I shall keep the version of kludged linux used here available on the downloads page on my
web site. If anyone is interested in linux, kludged and a psion provide a great cheap portable way to learn this wonderful operating system.
My best regards to all
Adrian Wells

DaNerd11 says: Jul 9, 2008. 8:25 PM REPLY


have you read all the hitchhikers books?

PKM says: Jul 10, 2008. 4:23 AM REPLY


Yes, except if you count Salmon Of Doubt. I've read the first five. I think it's fair to say they were a slight inspiration for some bits of the Instructable ;)

DaNerd11 says: Jul 10, 2008. 7:13 AM REPLY


lol, yeah, im on life, the universe and everything. they are good books but they are so confuzzling! and also, question, how can the question to the
universe be 9*5 (or is it 9*6? i forget) and the answer be 42?

wrs715 says: Jul 12, 2008. 5:18 AM REPLY


The question is "What do you get when you multiply six by nine?". The answer, as we count, is of course "56". If you work in Base 13 (think "13
fingers instead of the ten we are familiar with"), though, it's actually "42". I understand that Douglas Adams didn't intend any math tricks, though.

(I've read the first four about 15 times each and the last only five. I've read "Salmon of Doubt" too.)

DaNerd11 says: Jul 12, 2008. 7:36 AM REPLY


....... base 13???? lol, no idea but ok, ill take ur word for it.

wrs715 says: Jul 12, 2008. 7:02 PM REPLY


Sure. This is how it goes:

We count in what Mathematicians call "Base 10". We have ten digits in our number system, 0 through 9. When we write a number, the
right-most value is the number of "ones" (or 100 ), the next (moving to the left) is the number of "tens" (or 101 ) , then "hundreds" (or 102 ),
and so-on.

When we deal with other number systems, the theory works the same way. In octal (a commonly used number system on old mainframe
computers), also known as "Base 8", the right-most digit is the number of "ones" (8 0 ), the next digit (again, moving left) the number of
"eights" (8 1 ), then "sixty-fours" (8 2 ), etc.

Consider the number that got us into this mess, "42".

We look at it and assume a "regular" way of counting, which for us is Base 10. There are 2 ones and 4 tens.

With Base 13, the rightmost value is the number of ones (that's the "2") and the next to the left is the "thirteens", the "4".

We can convert this to "regular" numbers easily enough, once we get what's going on: 4 thirteens plus 2 ones (4x13 + 2x1) is 52+2, or 54.

If it helps, I'm just strange enough that I do algebra when I'm bored. :)

DaNerd11 says: Jul 12, 2008. 7:18 PM REPLY


lol, i got that after u explained what bases are, im pretty good with math for an 8th grader.

http://www.instructables.com/id/Wikipedia-in-your-pocket/
PKM says: Jul 13, 2008. 6:02 AM REPLY
Tom Lehrer (in the song New Math, I highly recommend it although it's a little outdated now) describes base 8 as

"Don't worry, base 8 is just like base 10, if you're missing two fingers."

wrs715: my old maths teacher used to give the people who finished their work early strange, obscure bits of maths that were off
the syllabus but still interesting. One of the ones I remember was strange bases- first the usual (10, 16, 8, 2), then some abstruse
ones (base 5, 9 and 11 IIRC), then the very weird base 0.5 (only good for fractions between 0 and 2 :P) and the possibly more
weird base minus 2.

Numbers 0 to 10 in base -2 go:


0
1
-10
111
100
101
-1110
11011
-1000
-1011
-1010

If you want some head bending, try that.

DaNerd11 says: Jul 13, 2008. 9:01 AM REPLY


lol, k, did u like major or minor in math?

PKM says: Jul 13, 2008. 3:35 PM REPLY


We don't do major/minor the same way in the UK, but I have a Bachelor's in Computer Science which is fairly maths-
heavy.

DaNerd11 says: Jul 13, 2008. 4:59 PM REPLY


nice, im want to major in mechanical engineering which is also math heavy.

wrs715 says: Jul 12, 2008. 5:20 AM REPLY


I can't multiply this morning. 6x9 is 54, not 56. It still works out, though. :)

PKM says: Jul 10, 2008. 3:40 PM REPLY


If we knew that, the universe would reset and the question would become harder :)

DaNerd11 says: Jul 10, 2008. 10:05 PM REPLY


interesting................... lol

view all 148 comments

http://www.instructables.com/id/Wikipedia-in-your-pocket/

Potrebbero piacerti anche