Posts tagged tricks
HowTo: Install Ovi Store apps from the command line on the N900
Jan 14th
Disclaimer: If you are not comfortable with the command line, do not try this.
If you have installed an app from the Ovi Store web portal, you would have noticed that the process is not fast. Clicking the Download link opens the Application-Manager which takes anywhere from 30-40 seconds to prepare the system before actually starting the download. For those who don’t like to wait, the apt-get command is a great alternative to speed up things and also allow installing multiple apps (at least the ones that are free) in one go.
Prerequisites
There are two things required before starting the download. Setting up the Ovi Repo and creating an Archive folder. You need to do this only once.
Ovi Repo
If you have never used the Ovi Store, you would need to have the repo installed first. Downloading an app from the store automatically adds the repo the first time but you need an Ovi account. So if you want the apps but don’t like signing in, you can add the repo manually:
Name: Ovi
Web: https://downloads.maemo.nokia.com/fremantle/ovi/
Dist: ./
Archive Folder:
In order to save space on the root partition, create a download directory for the downloaded packages. Instructions here
Installation
For installation, all you need is the application’s package name. The apt-cache command can be used to find it. The following command will search and list all packages with the word ‘offscr’ in it:
# apt-cache search offscr
This will display the 31 nifty apps by Offscr currently available. This also searches descriptions.
Next, install the desired package using apt-get (as root of course):
# apt-get -o dir::cache=/home/user/MyDocs/apt-archive-cache install offscr-discs offscr-backgammon offscr-watch
This will start the installation process for all 3 apps which will take about the same time it takes for one install from the website. Enjoy!
Popularity: 24%
HowTo: Fix the annoying ‘Unable to connect via USB. Device storage in use’ error on the N900 without rebooting
Dec 28th
If you connect the N900 to a computer via USB frequently, you will sooner or later encounter this error where the N900 will refuse to be used as external media.

This is because a program (or programs) is accessing files in the /home/user/MyDocs folder. To fix the problem, the program(s) in question needs to be found and stopped. To find the program(s), open a root terminal and type
lsof | grep MyDocs
This will display the programs accessing the MyDocs folder something similar to this:
Nokia-N900-42-11:~# lsof | grep MyDocs
sh 3474 user cwd DIR 179,1 65536 4326 /home/user/MyDocs/tmp
The second column displays the process-ID of the program (in RED above). Now, terminate the program with this command (repeat for multiple programs):
kill 3474
Now, run the lsof command again (press UP arrow to go back) and make sure the program is not displayed. If it is still running, execute this:
kill -9 3474
Reconnect the USB cable and you should now be able to use the N900 as external media.
Popularity: 25%
HowTo: Launch a terminal app from a shortcut on Nokia N900 (Part 2)
Dec 19th
This tutorial will show you how to add an icon to the topx shortcut in Part 1.
- Find/create a PNG image of dimension 48×48. (google this)
- Name the file topx.png
- Save file to /usr/share/icons/hicolor/48×48/hildon/ (you will need root access)
- Modify the topx.desktop file to include the following line. The right side should be the name of file without the .png
Icon=topx
The topx.desktop now looks like this:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=topx
Exec=/usr/bin/osso-xterm top
Icon=topx
X-Osso-Type=application/x-executable
Save topx.desktop and reboot to see the icon for the shortcut in the Application Menu. If the icon does not show up, install a couple of apps from the Application Manager. This should update the icon-cache and display it.

Popularity: 32%
Python for Newbies – Tutorial – Part Two
Dec 9th
This is part two of the Python for Newbies tutorial . Part One can be found here. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license:
http://creativecommons.org/licenses/by-sa/3.0/
http://creativecommons.org/licenses/by-sa/3.0/legalcode
Functions
Functions are simply a set of commands or statements grouped together as a unit with a name that can be called on by other parts of the program (or even by other programs) to accomplish a certain task. Since the statements inside a function do not have to be rewritten every time the steps they perform are needed, our programs are smaller and easier to maintain. We have already used several functions that are built in to the Python core. For example, we have used the del function to delete items from Python lists and dictionaries, the tuple function to convert a string into a tuple, several math functions, and others. However, we are now going to learn how to create our own functions. Functions are simple, but there are a few new associated concepts that you will have to understand. Read the rest of this entry »
Popularity: 41%
Python for Newbies – Tutorial
Dec 9th
This is a Python tutorial that tries to touch on most areas of the Python language, but attempts to be very simple so that people who have never done any sort of programming can grasp it. Special attention will be given to its use as a Maemo OS development platform. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license:
http://creativecommons.org/licenses/by-sa/3.0/
http://creativecommons.org/licenses/by-sa/3.0/legalcode
The versions of Python and other libraries targeted by the tutorial will be initially the ones available on Maemo 5 at the time of the N900 release. That means Python 2.5.4. As Maemo starts moving to more recent versions of Python we will attempt to keep this tutorial in sync.
If you have any other comments or suggestions please let me know. We have a Google Wave available for those that would like to contribute to the content.
Due to its length, we have divided the tutorial in two parts (maybe three by the time we are done). There are a few sections still missing at the end of the tutorial. We hope to add them in the near future. But, again, if someone would like to help, let us know.
Table of Contents
Part One
- What is Python?
- Why Python?
- Installing Python
- How Python works
- The building blocks of a Python program
- How to program in Python
- Functions
- Modules
- Working with files
- Classes and Objects
- Errors and Error Handling
- Other common built-in functions
- Time
Part Two
Read the rest of this entry »
Popularity: 100%
Python for Newbies – TutorialHowTo: Launch a terminal app from a shortcut on Nokia N900
Dec 6th
On the N900, it is possible to run a terminal program like ‘top’ directly from the Desktop/Shortcut. The following example creates a shortcut to launch the system monitior program ‘top’.
1. Use a text-editor like vi or Leafpad to create a file with the following text:
[Desktop Entry] Encoding=UTF-8 Version=0.1 Type=Application Terminal=true Name=topx Exec=/usr/bin/osso-xterm top Icon= X-Window-Icon= X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable
2. Save the file as topx.desktop.
3. As root, copy the file to the ‘/usr/share/applications/hildon/’ directory. This will create an ugly blue application icon in the Application list called ‘topx’.

Launching ‘topx’ will execute ‘top’ directly in xterm. You may now put a shortcut on the desktop for quick access. The not-so-great part of this desktop-shortcut is that it displays the default icon.
Popularity: 41%
Recent Comments