View source for FSO ringtones

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Template used on this page:

Return to FSO ringtones.

Personal tools
Key pages on:

(Other distributions)

The milestone 3 way

FSO milestone 3 introduces some configuration files for Zhone. It is now possible to define as many ringtone profiles as we want. Each profile is a YAML configuration file located in :


The default profile is defined in the default.yaml file :

ring-tone: "Arkanoid_PSID.sid"
ring-volume: 10

To change this default ringtone :

  1. copy the sound file into /usr/share/sounds/
  2. edit the "ringtone" field to match your sound filename.


Not sure I'm doing this the Right Way, but I had to patch /usr/share/python-support/fso-frameworkd/framework/subsystems/oeventsd/ this way :

---	2008-09-21 14:38:03.000000000 +0200
+++	2008-09-13 00:49:37.000000000 +0200
@@ -143,7 +143,7 @@
         phone_prefs = prefs.GetService( "phone" )
         ring_tone = phone_prefs.GetValue( "ring-tone" )
         ring_volume = phone_prefs.GetValue( "ring-volume" )
-        sound_path = os.path.join( installprefix, "share/sounds/", ring_tone )
+        sound_path = os.path.join( installprefix, "usr/share/sounds/", ring_tone )
         if self.cmd == "play":
    "Start ringing : tone=%s, volume=%s", ring_tone, ring_volume )
@@ -180,7 +180,7 @@
         phone_prefs = prefs.GetService( "phone" )
         tone = phone_prefs.GetValue( "message-tone" )
         volume = phone_prefs.GetValue( "message-volume" )
-        sound_path = os.path.join( installprefix, "share/sounds/", tone )
+        sound_path = os.path.join( installprefix, "usr/share/sounds/", tone )
         if self.cmd == "play":
    "Start ringing : tone=%s, volume=%s", tone, volume )

Note about that : there seems to be a patch for debian somewhere on the way to the repos : that mangles the installprefix instead. Same spirit, maybe a little cleaner than yours.

The milestone 2 way

The ringtone in milestone 2 is stored here:


Fun fact : according to the gstreamer documentation, .sid files are in fact small Commodore 64 programs that are executed on an emulated 6502 CPU and a MOS 6581 sound chip.

Now to change it is a little bit of fun.

first change directory to


and open the file

  1. this will be /var/lib/python-support/python2.5/framework/subsystems/oeventd/ if you are using FSO under Debian

Search for PlaySound. Edit the 2 lines to point to your wav or mp3 file.

There does seem to be a lag of a few vibrations before the sound starts but that might desirable. (I didn't compare against the original code). The code to specifically handle formats, (oggs for example) can be a little complicated and makes things messy. Since, it seems like this code is changing in FSO, I'm leaving it for the moment.


mv receiver.pyo /home/root 
  1. receiver.pyo will be receiver.pyc in FSO under Debian
 >>> import py_compile
 >>> py_compile.compile("")
 >>> quit()
  1. You may not have the py_compile module. You can install them like this:
opkg install python-compile
/etc/init.d/fso-frameworkd restart && /etc/init.d/zhone-session stop && sleep 2 && /etc/init.d/zhone-session start
  1. I've only run the above restart commands in Debian so I'm not sure if they are the same in the default FSO image
  2. the default zhone-session file doesn't have a working restart command, hence the stop->sleep 2->start

zhone for FSO seems to be launched by Xsession.d so maybe try:

/etc/init.d/xserver-nodm restart

Now you can link /usr/share/sounds/ringtone to any mp3 (or other sound file if you took the second option) and that will be your ringtone