Overview: iPod-Linux sash & viP guided tour

Click on the first screen image to begin the tour.

DSC04146

rm 2005-04-06

iPod Linux boots right into the podzilla GUI application. Here scroll down to the File Browser. Press enter (in Linux the "Play/Pause" button is used as the enter key).
DSC04147
In the File Browser scroll down to the directory "bin", then press the "Select" (Action) key to enter this directory. Note that the Browser remembers your last working directory. If you do not find the "bin" directory you are probably not at root ("/"). In this case just "select" the first entry ".." in order to navigate to the upper dir, and so on until you are at "/". Then scroll to "bin" and enter it.
DSC04148
In "bin" you find all the executable programs of the iPod Linux system.
Scroll down to the program "sh". This is the "sash" shell. Call this program by selecting it (pressing the "Action" key).
DSC04149
Now we are at the shell, ready to communicate directly with our Linux system.
Note we are initially in directory "/sbin". (Maybe we should set a proper HOME env variable in the /etc/rc boot script?)
DSC04150
As a first step we want to change to the root directory. We have to enter "cd ..".
When you turn the scroll wheel all available characters are shown at the current cursor position: lower case letters, upper case letters, numbers, and some other ascii characters. Be careful and stop just when the needed lower case "c" shows up. Then press the "Next" key once, as shown.
DSC04151
This accepts the chosen letter and advances the cursor to the next position, showing a second "c". (Thus the default for the next char is always the same as the last char entered.) By carefully scrolling a very small amount change this "c" into a "d", then press "Next" again. Change the second "d" into a space (the space is located just before lower case "a") and press "Next". Now change the second space into a dot "." which you will find just before the space. Press "Next". This time the second dot is good - we need it. Now press enter (the "Play/Pause" button). - If you made a mistake, you can erase the last char(s) by pressing the "Previous" button once or several times.
DSC04152
iPod Linux comes without a home directory. In order to "feel at home" we make us a home directory. I think this is the right place for playing with files and dirs, leaving the rest of the system unclobbered.
Enter the command "mkdir home" and press enter.
DSC04153
Next, change into this newly created directory by entering "cd home".
You can enter the command "ls" now to verify the contents of the new dir is empty.
(Not so on this screenshot: I had created some files and a subdir in a previous session not shown here.)
DSC04154
Now we will create and edit a new file called "mytxt".
So enter the command "viP mytxt".
viP (note the capital P) is the text editor of the iPod Linux.
If you know vi or vim you will be soon at home. Otherwise I recommend you read the vi tutorial (for example here: http://math.la.asu.edu/vi_tutorial/vi3.html) first to get an idea of the modes and commands of the vi family of editors. Of course viP has a rather limited command set and has to come by with iPod's very limited input capabilities... so the list of differences between vi and viP may be much longer than the list of similarities...
DSC04155
viP starts up in "insert" mode. So you can just start to enter text in the same way you entered text in the sash shell, i.e. by using the scroll wheel to choose a character, the "Next" key to accept that char, the "Prev" key to erase the last char. Enter a "newline" by pressing the enter ("Play/Pause") button.
DSC04156
Entering this short text is already tedious work, but then... the fun is that it really can be done. ;-)
(When tab-completion jumps in just press "Next" repeatedly until the completion goes out of the way. Or accept the completion by pressing enter.)
DSC04157
We now want to add some spaces before the word "is" in the second line. How do we get the cursor to this position? We have to leave the "insert" mode and enter the "move" mode. We change into command mode by pressing the "Menu" button. The cursor is now in the last line, awaiting a vi command. But we do not type it, we press "Menu" again. This time we get a scrollable list of commands in the last line. Scroll to ":move" and press enter. The cursor jumps back into the text area, but we are in "move" mode.
DSC04158
In the "move" mode you can either scroll horizontally inside one line, or vertically to change lines. You can swith between these two submodes by pressing the "Action" key.
In this way first move to the second line, then to the first char of that line (the "i" of "is").
DSC04159
By pressing "Menu" twice we change to command mode and scroll to the ":insert" command. Select this command by pressing enter and insert some spaces.
(When tab-completion jumps in just press "Next" repeatedly until the completion goes out of the way.)
DSC04160
Now we again change into command mode by pressing "Menu" twice and select the ":save" command (by scrolling then pressing enter).
DSC04161
This time we stay in command mode.
In order to leave the editor select the ":quit" command.
DSC04162
The shell command "ls" shows the new file "mytxt" (and in my case the objects I created earlier).
In this screenshot I mistyped the command at first try, typing "l" instead of "ls", so the usual error message appears.
If you want to edit the already existing file "mytxt" just enter "viP mytxt" again. Do your changes, then leave the editor just as before.
DSC04163
As another example for interacting with the Linux system via the shell, I called the program "uptime", which displays the time since booting iPod Linux: in this case, 28 minutes.
DSC04164
As a final example this is the slightly scrambled output of the command "ps", listing the currently running Linux processes.

You can leave the sash shell any time by entering "exit", or even easier, by pressing the "Menu" button.

All screenshots where taken with the iPod Linux release as installed by the Mac OS X program "iPod-Linux Installer 0.3" on 2005-03-21, running on a 3rd gen iPod.

12496 visitors since april 13th 2005

page created april 6 2005
last major update april 13 2005

back to rm

back to iPod Linux