<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=193.14.97.241</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=193.14.97.241"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/193.14.97.241"/>
	<updated>2026-04-22T07:07:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10316</id>
		<title>Fcron</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10316"/>
		<updated>2010-06-09T13:10:53Z</updated>

		<summary type="html">&lt;p&gt;193.14.97.241: /* Gradually increase the volume */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://fcron.free.fr fcron] is standard Linux scheduler used to schedule any command at any time. So this means that it doesn&#039;t have any limits and you can schedule just about anything. It is run as daemon in the background so you don&#039;t need to worry about it. You set it up with a config file which contains schedule.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;cron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: cron is older than fcron and doesn&#039;t sleep between events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;anacron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: anacron is used to schedule daily jobs, fcron can schedule to minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/packages/view/ses/ &#039;&#039;&#039;ses&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Why not: ses is buggy, buggy and buggy. It doesn&#039;t even uninstall properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showthread.php?t=46594 &#039;&#039;&#039;Alarmed&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Alarmed uses the Nokia&#039;s (non-standard) &amp;quot;alarmd&amp;quot; daemon which is already part of Maemo 5 and uses Python/Qt for GUI. You can use custom commands and set single and/or recurring events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Current issues=&lt;br /&gt;
&lt;br /&gt;
# Current version for Maemo is not the latest available &#039;&#039;(although the difference is minor)&#039;&#039;.&lt;br /&gt;
# When you edit fcrontab it wants to execute vi from /scratchbox &#039;&#039;(editor variable has to be defined manually each time fcrontab is run)&#039;&#039;.&lt;br /&gt;
# Some stuff has to be done manually after the installation &#039;&#039;(with proper packaging the whole &amp;quot;Installation&amp;quot; chapter from this wiki would be unnecessary)&#039;&#039;.&lt;br /&gt;
# It needs to be added to official maemo.org repositories so it can be used by anyone &#039;&#039;(it is currently availible in user ruskie&#039;s repository)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But these are not major things and as you can see it can be used already - current solutions and workarounds are in &#039;&#039;(brackets)&#039;&#039;. Otherwise it&#039;s stable, does not have important bugs and does not affect battery life at all. It&#039;s a mature software which just needs some manual work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
Everything should be done from [[root access|root terminal]]. First you need to download the .deb from [https://repo.codemages.net/opt/fcron_3.0.1-2_armel_opt.deb ruskie&#039;s repository]. Put it somewhere on the device and execute the following commands, one by one:&lt;br /&gt;
&lt;br /&gt;
 dpkg -i /path/to/deb/fcron_3.0.1-2_armel_opt.deb&lt;br /&gt;
 useradd fcron&lt;br /&gt;
 chown root:fcron /etc/fcron.*&lt;br /&gt;
 chmod 644 /etc/fcron.*&lt;br /&gt;
 chown -R fcron:fcron /var/spool/fcron&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
&lt;br /&gt;
Now fcron has to be set to start on boot. This is done by creating a proper [[startup script]]. If you don&#039;t already have a custom one, then you need to create an empty file in /etc/event.d/ folder named as you like (&amp;quot;fcron&amp;quot; for example). Put this into the file:&lt;br /&gt;
&lt;br /&gt;
 start on started hildon-desktop&lt;br /&gt;
 stop on starting shutdown&lt;br /&gt;
 console none&lt;br /&gt;
 service&lt;br /&gt;
 script&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
 end script&lt;br /&gt;
&lt;br /&gt;
And save it. This makes fcron run at startup.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
fcrontab is a program which parses config file so fcron daemon can use it. It is used to modify schedule. First edit fcron&#039;s global configuration file, which is located at /etc/fcron.conf. The last configuration entry (line) must be changed to:&lt;br /&gt;
&lt;br /&gt;
 editor = /usr/bin/vi&lt;br /&gt;
&lt;br /&gt;
This will use vi as fcrontab editor. You can use another editor. If this doesn&#039;t work, you can manually define editor every time before fcrontab is run. The command is run from the root terminal:&lt;br /&gt;
&lt;br /&gt;
 export EDITOR=vi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, fcrontab must be executed in edit mode:&lt;br /&gt;
&lt;br /&gt;
 fcrontab -e&lt;br /&gt;
&lt;br /&gt;
The config file opens and it is empty first time we open it. Now we will enter commands we would like to schedule. An example config file looks like:&lt;br /&gt;
&lt;br /&gt;
 !nolog(true)&lt;br /&gt;
 &lt;br /&gt;
 # COMMENT&lt;br /&gt;
 0 9 * * 1-5 run-standalone.sh /path/to/script/silent_profile.sh&lt;br /&gt;
 &amp;lt;more scheduled scripts&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 !bootrun(true)&lt;br /&gt;
 0 0 1 * * /path/to/script/reset_gprs_data_counter.sh&lt;br /&gt;
 &amp;lt;a backup script also suits here if you have one&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!nolog(true)&#039;&#039; is the first line and specifies that successful executions aren&#039;t logged (we really don&#039;t need or want that). Also, if we use a script with dbus call, &#039;&#039;run-standalone.sh&#039;&#039; must be in front of it. It sets up environment variables correctly for sending dbus calls as root. &#039;&#039;!bootrun(true)&#039;&#039; specifies that commands after this line are executed at next boot if system wasn&#039;t on when they should be executed. This is useful only for clearing the GPRS counter or backup scripts, for example if you switch the phone off every night the GPRS counter will still be reset every first of the month when you turn the phone on in the morning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first five fields are separated by a space:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MINUTE&#039;&#039;&#039; space &#039;&#039;&#039;HOUR&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_MONTH&#039;&#039;&#039; space &#039;&#039;&#039;MONTH&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_WEEK&#039;&#039;&#039; space &#039;&#039;&#039;/path/script.sh&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To interpret the two example lines: GPRS data counter is reset every 1st of the month at 00:00. Silent profile is set every Monday to Friday at 9:00. Possible values for fields are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minute&#039;&#039;&#039;: 0-59&lt;br /&gt;
* &#039;&#039;&#039;Hour&#039;&#039;&#039;: 0-23&lt;br /&gt;
* &#039;&#039;&#039;Day of month&#039;&#039;&#039;: 1-31&lt;br /&gt;
* &#039;&#039;&#039;Month&#039;&#039;&#039;: 1-12&lt;br /&gt;
* &#039;&#039;&#039;Day of week&#039;&#039;&#039;: 0-7 (0 and 7 are both Sunday)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Asterisk (*) means &amp;quot;any&amp;quot;, or to put it differently: it means that this value does not define when the command is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After saving the edited config file, fcrontab will install it automatically and it will work from that moment on. Also don&#039;t forget that commenting out lines is useful for temporarily disabling a command. Just put an # in front of the line.&lt;br /&gt;
&lt;br /&gt;
=Scripts=&lt;br /&gt;
&lt;br /&gt;
So we have fcron now executing scripts at defined time. But we still need to provide scripts that are executed. Here is a collection of them, but you can easily make new ones based on the example scripts here and [[Phone control]] wiki page. Don&#039;t forget to add them here though. And keep in mind that they have to be marked executable (chmod +x script.sh) to work. The second dbus call in some scripts is a notification and can me modified, removed or added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Profiles===&lt;br /&gt;
&lt;br /&gt;
====Silent====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to Silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to General&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Radio mode===&lt;br /&gt;
&lt;br /&gt;
====2G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 2G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====3G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 3G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dual====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to Dual&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Networking===&lt;br /&gt;
&lt;br /&gt;
====Disconnect internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Internet connection is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect to any saved internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disconnect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is connected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 ifconfig wlan0 down&lt;br /&gt;
 rmmod wl12xx&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi disabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Enable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 modprobe wl12xx&lt;br /&gt;
 wl1251-cal&lt;br /&gt;
 stop wlancond&lt;br /&gt;
 start wlancond&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi enabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Securing device===&lt;br /&gt;
&lt;br /&gt;
====Lock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Unlock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reset GPRS data counter===&lt;br /&gt;
&lt;br /&gt;
This script is now PR1.2 compliant and does not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Update e-mail===&lt;br /&gt;
&lt;br /&gt;
This script has already necessary run-standalone.sh prefixes so the whole script does not need to be run through run-standalone.sh in fcrontab.&lt;br /&gt;
&lt;br /&gt;
It checks whether the phone is connected to the internet and if it is not, connect is done, send and receive is performed and then script waits about minute and a half (Modest e-mail client which N900 uses is slow in this aspect) and if the phone is connected to a Wi-Fi, it stays connected and if it is not (is connected to GPRS), it disconnects.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ `route | awk &#039;/au/ {print $1}&#039;` = default ]; then&lt;br /&gt;
 exit&lt;br /&gt;
 else&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Updating e-mail...&amp;quot;&lt;br /&gt;
 run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
 sleep 10&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
 sleep 100&lt;br /&gt;
   if [ `ifconfig gprs0 | awk -F &amp;quot; &amp;quot; &#039;/s0/ {print $2}&#039;` = Link ]; then&lt;br /&gt;
   run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
   fi&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;E-mail updated&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Backup===&lt;br /&gt;
&lt;br /&gt;
The scripts used for backing up can be found on [[Manual backup and restore]] wiki page. They overlap with scripts needed here, so they should be collected there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reboot===&lt;br /&gt;
&lt;br /&gt;
Just put it directly in fcrontab:&lt;br /&gt;
&lt;br /&gt;
 0 0 * * * reboot&lt;br /&gt;
&lt;br /&gt;
Warning 1: Never put it after &#039;&#039;!bootrun(true)&#039;&#039; line in fcrontab! It could result in an endless reboot loop.&lt;br /&gt;
&lt;br /&gt;
Warning 2: Think twice before making a wrong time entry in fcrontab! The example here should suffice for most (it reboots device every midnight). Change the two zeroes in other numbers if you want, but don&#039;t put asterisks or ranges in those two fields!&lt;br /&gt;
&lt;br /&gt;
Also remember that PIN has to be entered after a reboot. There is another way with sending reboot call via D-Bus which doesn&#039;t request to reenter PIN, but that is a forced reboot (no filesystem synchronization, etc.) and thus not the proper way of doing it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tweakr profiles===&lt;br /&gt;
&lt;br /&gt;
This script is not tested yet. Also you must replace both &amp;quot;tweakrprofile&amp;quot; instances with the name of your profile (which should not be general or silent and should not be capitalized).&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DBUSSET=&amp;quot;dbus-send --print-reply --dest=&#039;com.nokia.profiled&#039; /com/nokia/profiled com.nokia.profiled.set_value string:general string:\&#039;%s\&#039; string:\&#039;%s\&#039;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 gconftool-2 -s /system/tweakr/current-preset --type=string &amp;quot;tweakrprofile&amp;quot;&lt;br /&gt;
 gconftool-2 -a /system/tweakr/tweakrprofile|sed &#039;s/^ //&#039;|sed &#039;s/ = /=/&#039;|awk -F&#039;=&#039; &amp;quot;{cmd=sprintf(\&amp;quot;${DBUSSET}\&amp;quot;, \$1, \$2);system(cmd)}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Auto 2G with Wi-Fi===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # auto2g by J.LeFebvre&lt;br /&gt;
 #&lt;br /&gt;
 # Automatically sets 2G cellular mode when a valid Wi-Fi connection is running&lt;br /&gt;
 # This helps conserve battery life&lt;br /&gt;
 #&lt;br /&gt;
 # If an automatic connection to 3G is required when not on Wi-Fi then uncomment the two dbus commands under &amp;quot;set to 3G&amp;quot; line&lt;br /&gt;
 #&lt;br /&gt;
 if `/sbin/ifconfig wlan0 2&amp;gt;/dev/null | grep -q RUNNING`; then&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 2&#039;`; then&lt;br /&gt;
       if (/bin/ping -c 1 www.google.com &amp;gt; /dev/null); then&lt;br /&gt;
          # set to 2G&lt;br /&gt;
          dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
          dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;2G (GSM) cellular mode set&#039;&lt;br /&gt;
       fi&lt;br /&gt;
    fi;&lt;br /&gt;
 else&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 1&#039;`; then&lt;br /&gt;
       # set to 3G&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;3G cellular mode set&#039;&lt;br /&gt;
       echo &#039;&#039; &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
===Gradually increase the volume===&lt;br /&gt;
For an example, you can use this if you softly want to wake up to music.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # Gradually increase the volume, by raffe &lt;br /&gt;
 for i in 0 10 20 30 40 50 60 70 80 90 100&lt;br /&gt;
 do&lt;br /&gt;
   dbus-send --session --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:&#039;volume&#039; variant:uint32:$i&lt;br /&gt;
   /bin/sleep 5&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>193.14.97.241</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10317</id>
		<title>Fcron</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10317"/>
		<updated>2010-06-09T13:09:13Z</updated>

		<summary type="html">&lt;p&gt;193.14.97.241: /* Gradually increase the volume */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://fcron.free.fr fcron] is standard Linux scheduler used to schedule any command at any time. So this means that it doesn&#039;t have any limits and you can schedule just about anything. It is run as daemon in the background so you don&#039;t need to worry about it. You set it up with a config file which contains schedule.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;cron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: cron is older than fcron and doesn&#039;t sleep between events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;anacron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: anacron is used to schedule daily jobs, fcron can schedule to minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/packages/view/ses/ &#039;&#039;&#039;ses&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Why not: ses is buggy, buggy and buggy. It doesn&#039;t even uninstall properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showthread.php?t=46594 &#039;&#039;&#039;Alarmed&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Alarmed uses the Nokia&#039;s (non-standard) &amp;quot;alarmd&amp;quot; daemon which is already part of Maemo 5 and uses Python/Qt for GUI. You can use custom commands and set single and/or recurring events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Current issues=&lt;br /&gt;
&lt;br /&gt;
# Current version for Maemo is not the latest available &#039;&#039;(although the difference is minor)&#039;&#039;.&lt;br /&gt;
# When you edit fcrontab it wants to execute vi from /scratchbox &#039;&#039;(editor variable has to be defined manually each time fcrontab is run)&#039;&#039;.&lt;br /&gt;
# Some stuff has to be done manually after the installation &#039;&#039;(with proper packaging the whole &amp;quot;Installation&amp;quot; chapter from this wiki would be unnecessary)&#039;&#039;.&lt;br /&gt;
# It needs to be added to official maemo.org repositories so it can be used by anyone &#039;&#039;(it is currently availible in user ruskie&#039;s repository)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But these are not major things and as you can see it can be used already - current solutions and workarounds are in &#039;&#039;(brackets)&#039;&#039;. Otherwise it&#039;s stable, does not have important bugs and does not affect battery life at all. It&#039;s a mature software which just needs some manual work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
Everything should be done from [[root access|root terminal]]. First you need to download the .deb from [https://repo.codemages.net/opt/fcron_3.0.1-2_armel_opt.deb ruskie&#039;s repository]. Put it somewhere on the device and execute the following commands, one by one:&lt;br /&gt;
&lt;br /&gt;
 dpkg -i /path/to/deb/fcron_3.0.1-2_armel_opt.deb&lt;br /&gt;
 useradd fcron&lt;br /&gt;
 chown root:fcron /etc/fcron.*&lt;br /&gt;
 chmod 644 /etc/fcron.*&lt;br /&gt;
 chown -R fcron:fcron /var/spool/fcron&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
&lt;br /&gt;
Now fcron has to be set to start on boot. This is done by creating a proper [[startup script]]. If you don&#039;t already have a custom one, then you need to create an empty file in /etc/event.d/ folder named as you like (&amp;quot;fcron&amp;quot; for example). Put this into the file:&lt;br /&gt;
&lt;br /&gt;
 start on started hildon-desktop&lt;br /&gt;
 stop on starting shutdown&lt;br /&gt;
 console none&lt;br /&gt;
 service&lt;br /&gt;
 script&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
 end script&lt;br /&gt;
&lt;br /&gt;
And save it. This makes fcron run at startup.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
fcrontab is a program which parses config file so fcron daemon can use it. It is used to modify schedule. First edit fcron&#039;s global configuration file, which is located at /etc/fcron.conf. The last configuration entry (line) must be changed to:&lt;br /&gt;
&lt;br /&gt;
 editor = /usr/bin/vi&lt;br /&gt;
&lt;br /&gt;
This will use vi as fcrontab editor. You can use another editor. If this doesn&#039;t work, you can manually define editor every time before fcrontab is run. The command is run from the root terminal:&lt;br /&gt;
&lt;br /&gt;
 export EDITOR=vi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, fcrontab must be executed in edit mode:&lt;br /&gt;
&lt;br /&gt;
 fcrontab -e&lt;br /&gt;
&lt;br /&gt;
The config file opens and it is empty first time we open it. Now we will enter commands we would like to schedule. An example config file looks like:&lt;br /&gt;
&lt;br /&gt;
 !nolog(true)&lt;br /&gt;
 &lt;br /&gt;
 # COMMENT&lt;br /&gt;
 0 9 * * 1-5 run-standalone.sh /path/to/script/silent_profile.sh&lt;br /&gt;
 &amp;lt;more scheduled scripts&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 !bootrun(true)&lt;br /&gt;
 0 0 1 * * /path/to/script/reset_gprs_data_counter.sh&lt;br /&gt;
 &amp;lt;a backup script also suits here if you have one&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!nolog(true)&#039;&#039; is the first line and specifies that successful executions aren&#039;t logged (we really don&#039;t need or want that). Also, if we use a script with dbus call, &#039;&#039;run-standalone.sh&#039;&#039; must be in front of it. It sets up environment variables correctly for sending dbus calls as root. &#039;&#039;!bootrun(true)&#039;&#039; specifies that commands after this line are executed at next boot if system wasn&#039;t on when they should be executed. This is useful only for clearing the GPRS counter or backup scripts, for example if you switch the phone off every night the GPRS counter will still be reset every first of the month when you turn the phone on in the morning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first five fields are separated by a space:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MINUTE&#039;&#039;&#039; space &#039;&#039;&#039;HOUR&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_MONTH&#039;&#039;&#039; space &#039;&#039;&#039;MONTH&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_WEEK&#039;&#039;&#039; space &#039;&#039;&#039;/path/script.sh&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To interpret the two example lines: GPRS data counter is reset every 1st of the month at 00:00. Silent profile is set every Monday to Friday at 9:00. Possible values for fields are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minute&#039;&#039;&#039;: 0-59&lt;br /&gt;
* &#039;&#039;&#039;Hour&#039;&#039;&#039;: 0-23&lt;br /&gt;
* &#039;&#039;&#039;Day of month&#039;&#039;&#039;: 1-31&lt;br /&gt;
* &#039;&#039;&#039;Month&#039;&#039;&#039;: 1-12&lt;br /&gt;
* &#039;&#039;&#039;Day of week&#039;&#039;&#039;: 0-7 (0 and 7 are both Sunday)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Asterisk (*) means &amp;quot;any&amp;quot;, or to put it differently: it means that this value does not define when the command is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After saving the edited config file, fcrontab will install it automatically and it will work from that moment on. Also don&#039;t forget that commenting out lines is useful for temporarily disabling a command. Just put an # in front of the line.&lt;br /&gt;
&lt;br /&gt;
=Scripts=&lt;br /&gt;
&lt;br /&gt;
So we have fcron now executing scripts at defined time. But we still need to provide scripts that are executed. Here is a collection of them, but you can easily make new ones based on the example scripts here and [[Phone control]] wiki page. Don&#039;t forget to add them here though. And keep in mind that they have to be marked executable (chmod +x script.sh) to work. The second dbus call in some scripts is a notification and can me modified, removed or added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Profiles===&lt;br /&gt;
&lt;br /&gt;
====Silent====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to Silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to General&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Radio mode===&lt;br /&gt;
&lt;br /&gt;
====2G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 2G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====3G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 3G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dual====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to Dual&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Networking===&lt;br /&gt;
&lt;br /&gt;
====Disconnect internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Internet connection is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect to any saved internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disconnect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is connected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 ifconfig wlan0 down&lt;br /&gt;
 rmmod wl12xx&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi disabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Enable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 modprobe wl12xx&lt;br /&gt;
 wl1251-cal&lt;br /&gt;
 stop wlancond&lt;br /&gt;
 start wlancond&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi enabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Securing device===&lt;br /&gt;
&lt;br /&gt;
====Lock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Unlock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reset GPRS data counter===&lt;br /&gt;
&lt;br /&gt;
This script is now PR1.2 compliant and does not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Update e-mail===&lt;br /&gt;
&lt;br /&gt;
This script has already necessary run-standalone.sh prefixes so the whole script does not need to be run through run-standalone.sh in fcrontab.&lt;br /&gt;
&lt;br /&gt;
It checks whether the phone is connected to the internet and if it is not, connect is done, send and receive is performed and then script waits about minute and a half (Modest e-mail client which N900 uses is slow in this aspect) and if the phone is connected to a Wi-Fi, it stays connected and if it is not (is connected to GPRS), it disconnects.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ `route | awk &#039;/au/ {print $1}&#039;` = default ]; then&lt;br /&gt;
 exit&lt;br /&gt;
 else&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Updating e-mail...&amp;quot;&lt;br /&gt;
 run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
 sleep 10&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
 sleep 100&lt;br /&gt;
   if [ `ifconfig gprs0 | awk -F &amp;quot; &amp;quot; &#039;/s0/ {print $2}&#039;` = Link ]; then&lt;br /&gt;
   run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
   fi&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;E-mail updated&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Backup===&lt;br /&gt;
&lt;br /&gt;
The scripts used for backing up can be found on [[Manual backup and restore]] wiki page. They overlap with scripts needed here, so they should be collected there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reboot===&lt;br /&gt;
&lt;br /&gt;
Just put it directly in fcrontab:&lt;br /&gt;
&lt;br /&gt;
 0 0 * * * reboot&lt;br /&gt;
&lt;br /&gt;
Warning 1: Never put it after &#039;&#039;!bootrun(true)&#039;&#039; line in fcrontab! It could result in an endless reboot loop.&lt;br /&gt;
&lt;br /&gt;
Warning 2: Think twice before making a wrong time entry in fcrontab! The example here should suffice for most (it reboots device every midnight). Change the two zeroes in other numbers if you want, but don&#039;t put asterisks or ranges in those two fields!&lt;br /&gt;
&lt;br /&gt;
Also remember that PIN has to be entered after a reboot. There is another way with sending reboot call via D-Bus which doesn&#039;t request to reenter PIN, but that is a forced reboot (no filesystem synchronization, etc.) and thus not the proper way of doing it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tweakr profiles===&lt;br /&gt;
&lt;br /&gt;
This script is not tested yet. Also you must replace both &amp;quot;tweakrprofile&amp;quot; instances with the name of your profile (which should not be general or silent and should not be capitalized).&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DBUSSET=&amp;quot;dbus-send --print-reply --dest=&#039;com.nokia.profiled&#039; /com/nokia/profiled com.nokia.profiled.set_value string:general string:\&#039;%s\&#039; string:\&#039;%s\&#039;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 gconftool-2 -s /system/tweakr/current-preset --type=string &amp;quot;tweakrprofile&amp;quot;&lt;br /&gt;
 gconftool-2 -a /system/tweakr/tweakrprofile|sed &#039;s/^ //&#039;|sed &#039;s/ = /=/&#039;|awk -F&#039;=&#039; &amp;quot;{cmd=sprintf(\&amp;quot;${DBUSSET}\&amp;quot;, \$1, \$2);system(cmd)}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Auto 2G with Wi-Fi===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # auto2g by J.LeFebvre&lt;br /&gt;
 #&lt;br /&gt;
 # Automatically sets 2G cellular mode when a valid Wi-Fi connection is running&lt;br /&gt;
 # This helps conserve battery life&lt;br /&gt;
 #&lt;br /&gt;
 # If an automatic connection to 3G is required when not on Wi-Fi then uncomment the two dbus commands under &amp;quot;set to 3G&amp;quot; line&lt;br /&gt;
 #&lt;br /&gt;
 if `/sbin/ifconfig wlan0 2&amp;gt;/dev/null | grep -q RUNNING`; then&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 2&#039;`; then&lt;br /&gt;
       if (/bin/ping -c 1 www.google.com &amp;gt; /dev/null); then&lt;br /&gt;
          # set to 2G&lt;br /&gt;
          dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
          dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;2G (GSM) cellular mode set&#039;&lt;br /&gt;
       fi&lt;br /&gt;
    fi;&lt;br /&gt;
 else&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 1&#039;`; then&lt;br /&gt;
       # set to 3G&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;3G cellular mode set&#039;&lt;br /&gt;
       echo &#039;&#039; &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
===Gradually increase the volume===&lt;br /&gt;
For an example, you can use this if you softly want to wake up to music.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in 0 10 20 30 40 50 60 70 80 90 100&lt;br /&gt;
 do&lt;br /&gt;
   dbus-send --session --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:&#039;volume&#039; variant:uint32:$i&lt;br /&gt;
   /bin/sleep 5&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>193.14.97.241</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10318</id>
		<title>Fcron</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Fcron&amp;diff=10318"/>
		<updated>2010-06-09T13:08:43Z</updated>

		<summary type="html">&lt;p&gt;193.14.97.241: /* Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://fcron.free.fr fcron] is standard Linux scheduler used to schedule any command at any time. So this means that it doesn&#039;t have any limits and you can schedule just about anything. It is run as daemon in the background so you don&#039;t need to worry about it. You set it up with a config file which contains schedule.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;cron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: cron is older than fcron and doesn&#039;t sleep between events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;anacron&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Why not: anacron is used to schedule daily jobs, fcron can schedule to minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/packages/view/ses/ &#039;&#039;&#039;ses&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Why not: ses is buggy, buggy and buggy. It doesn&#039;t even uninstall properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showthread.php?t=46594 &#039;&#039;&#039;Alarmed&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Alarmed uses the Nokia&#039;s (non-standard) &amp;quot;alarmd&amp;quot; daemon which is already part of Maemo 5 and uses Python/Qt for GUI. You can use custom commands and set single and/or recurring events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Current issues=&lt;br /&gt;
&lt;br /&gt;
# Current version for Maemo is not the latest available &#039;&#039;(although the difference is minor)&#039;&#039;.&lt;br /&gt;
# When you edit fcrontab it wants to execute vi from /scratchbox &#039;&#039;(editor variable has to be defined manually each time fcrontab is run)&#039;&#039;.&lt;br /&gt;
# Some stuff has to be done manually after the installation &#039;&#039;(with proper packaging the whole &amp;quot;Installation&amp;quot; chapter from this wiki would be unnecessary)&#039;&#039;.&lt;br /&gt;
# It needs to be added to official maemo.org repositories so it can be used by anyone &#039;&#039;(it is currently availible in user ruskie&#039;s repository)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But these are not major things and as you can see it can be used already - current solutions and workarounds are in &#039;&#039;(brackets)&#039;&#039;. Otherwise it&#039;s stable, does not have important bugs and does not affect battery life at all. It&#039;s a mature software which just needs some manual work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
Everything should be done from [[root access|root terminal]]. First you need to download the .deb from [https://repo.codemages.net/opt/fcron_3.0.1-2_armel_opt.deb ruskie&#039;s repository]. Put it somewhere on the device and execute the following commands, one by one:&lt;br /&gt;
&lt;br /&gt;
 dpkg -i /path/to/deb/fcron_3.0.1-2_armel_opt.deb&lt;br /&gt;
 useradd fcron&lt;br /&gt;
 chown root:fcron /etc/fcron.*&lt;br /&gt;
 chmod 644 /etc/fcron.*&lt;br /&gt;
 chown -R fcron:fcron /var/spool/fcron&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
&lt;br /&gt;
Now fcron has to be set to start on boot. This is done by creating a proper [[startup script]]. If you don&#039;t already have a custom one, then you need to create an empty file in /etc/event.d/ folder named as you like (&amp;quot;fcron&amp;quot; for example). Put this into the file:&lt;br /&gt;
&lt;br /&gt;
 start on started hildon-desktop&lt;br /&gt;
 stop on starting shutdown&lt;br /&gt;
 console none&lt;br /&gt;
 service&lt;br /&gt;
 script&lt;br /&gt;
 /etc/init.d/fcron start&lt;br /&gt;
 end script&lt;br /&gt;
&lt;br /&gt;
And save it. This makes fcron run at startup.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
fcrontab is a program which parses config file so fcron daemon can use it. It is used to modify schedule. First edit fcron&#039;s global configuration file, which is located at /etc/fcron.conf. The last configuration entry (line) must be changed to:&lt;br /&gt;
&lt;br /&gt;
 editor = /usr/bin/vi&lt;br /&gt;
&lt;br /&gt;
This will use vi as fcrontab editor. You can use another editor. If this doesn&#039;t work, you can manually define editor every time before fcrontab is run. The command is run from the root terminal:&lt;br /&gt;
&lt;br /&gt;
 export EDITOR=vi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, fcrontab must be executed in edit mode:&lt;br /&gt;
&lt;br /&gt;
 fcrontab -e&lt;br /&gt;
&lt;br /&gt;
The config file opens and it is empty first time we open it. Now we will enter commands we would like to schedule. An example config file looks like:&lt;br /&gt;
&lt;br /&gt;
 !nolog(true)&lt;br /&gt;
 &lt;br /&gt;
 # COMMENT&lt;br /&gt;
 0 9 * * 1-5 run-standalone.sh /path/to/script/silent_profile.sh&lt;br /&gt;
 &amp;lt;more scheduled scripts&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 !bootrun(true)&lt;br /&gt;
 0 0 1 * * /path/to/script/reset_gprs_data_counter.sh&lt;br /&gt;
 &amp;lt;a backup script also suits here if you have one&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;!nolog(true)&#039;&#039; is the first line and specifies that successful executions aren&#039;t logged (we really don&#039;t need or want that). Also, if we use a script with dbus call, &#039;&#039;run-standalone.sh&#039;&#039; must be in front of it. It sets up environment variables correctly for sending dbus calls as root. &#039;&#039;!bootrun(true)&#039;&#039; specifies that commands after this line are executed at next boot if system wasn&#039;t on when they should be executed. This is useful only for clearing the GPRS counter or backup scripts, for example if you switch the phone off every night the GPRS counter will still be reset every first of the month when you turn the phone on in the morning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first five fields are separated by a space:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MINUTE&#039;&#039;&#039; space &#039;&#039;&#039;HOUR&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_MONTH&#039;&#039;&#039; space &#039;&#039;&#039;MONTH&#039;&#039;&#039; space &#039;&#039;&#039;DAY_OF_WEEK&#039;&#039;&#039; space &#039;&#039;&#039;/path/script.sh&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To interpret the two example lines: GPRS data counter is reset every 1st of the month at 00:00. Silent profile is set every Monday to Friday at 9:00. Possible values for fields are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minute&#039;&#039;&#039;: 0-59&lt;br /&gt;
* &#039;&#039;&#039;Hour&#039;&#039;&#039;: 0-23&lt;br /&gt;
* &#039;&#039;&#039;Day of month&#039;&#039;&#039;: 1-31&lt;br /&gt;
* &#039;&#039;&#039;Month&#039;&#039;&#039;: 1-12&lt;br /&gt;
* &#039;&#039;&#039;Day of week&#039;&#039;&#039;: 0-7 (0 and 7 are both Sunday)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Asterisk (*) means &amp;quot;any&amp;quot;, or to put it differently: it means that this value does not define when the command is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After saving the edited config file, fcrontab will install it automatically and it will work from that moment on. Also don&#039;t forget that commenting out lines is useful for temporarily disabling a command. Just put an # in front of the line.&lt;br /&gt;
&lt;br /&gt;
=Scripts=&lt;br /&gt;
&lt;br /&gt;
So we have fcron now executing scripts at defined time. But we still need to provide scripts that are executed. Here is a collection of them, but you can easily make new ones based on the example scripts here and [[Phone control]] wiki page. Don&#039;t forget to add them here though. And keep in mind that they have to be marked executable (chmod +x script.sh) to work. The second dbus call in some scripts is a notification and can me modified, removed or added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Profiles===&lt;br /&gt;
&lt;br /&gt;
====Silent====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to Silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Profile is set to General&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Radio mode===&lt;br /&gt;
&lt;br /&gt;
====2G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 2G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====3G====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to 3G&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dual====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Network mode is set to Dual&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Networking===&lt;br /&gt;
&lt;br /&gt;
====Disconnect internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Internet connection is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect to any saved internet connection====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disconnect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Connect mobile network====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Mobile network is connected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Disable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
 ifconfig wlan0 down&lt;br /&gt;
 rmmod wl12xx&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi disabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Enable Wi-Fi====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 modprobe wl12xx&lt;br /&gt;
 wl1251-cal&lt;br /&gt;
 stop wlancond&lt;br /&gt;
 start wlancond&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;Wi-Fi enabled&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Securing device===&lt;br /&gt;
&lt;br /&gt;
====Lock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Unlock====&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reset GPRS data counter===&lt;br /&gt;
&lt;br /&gt;
This script is now PR1.2 compliant and does not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Update e-mail===&lt;br /&gt;
&lt;br /&gt;
This script has already necessary run-standalone.sh prefixes so the whole script does not need to be run through run-standalone.sh in fcrontab.&lt;br /&gt;
&lt;br /&gt;
It checks whether the phone is connected to the internet and if it is not, connect is done, send and receive is performed and then script waits about minute and a half (Modest e-mail client which N900 uses is slow in this aspect) and if the phone is connected to a Wi-Fi, it stays connected and if it is not (is connected to GPRS), it disconnects.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ `route | awk &#039;/au/ {print $1}&#039;` = default ]; then&lt;br /&gt;
 exit&lt;br /&gt;
 else&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;Updating e-mail...&amp;quot;&lt;br /&gt;
 run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
 sleep 10&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
 sleep 100&lt;br /&gt;
   if [ `ifconfig gprs0 | awk -F &amp;quot; &amp;quot; &#039;/s0/ {print $2}&#039;` = Link ]; then&lt;br /&gt;
   run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
   fi&lt;br /&gt;
 run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;E-mail updated&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Backup===&lt;br /&gt;
&lt;br /&gt;
The scripts used for backing up can be found on [[Manual backup and restore]] wiki page. They overlap with scripts needed here, so they should be collected there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reboot===&lt;br /&gt;
&lt;br /&gt;
Just put it directly in fcrontab:&lt;br /&gt;
&lt;br /&gt;
 0 0 * * * reboot&lt;br /&gt;
&lt;br /&gt;
Warning 1: Never put it after &#039;&#039;!bootrun(true)&#039;&#039; line in fcrontab! It could result in an endless reboot loop.&lt;br /&gt;
&lt;br /&gt;
Warning 2: Think twice before making a wrong time entry in fcrontab! The example here should suffice for most (it reboots device every midnight). Change the two zeroes in other numbers if you want, but don&#039;t put asterisks or ranges in those two fields!&lt;br /&gt;
&lt;br /&gt;
Also remember that PIN has to be entered after a reboot. There is another way with sending reboot call via D-Bus which doesn&#039;t request to reenter PIN, but that is a forced reboot (no filesystem synchronization, etc.) and thus not the proper way of doing it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Tweakr profiles===&lt;br /&gt;
&lt;br /&gt;
This script is not tested yet. Also you must replace both &amp;quot;tweakrprofile&amp;quot; instances with the name of your profile (which should not be general or silent and should not be capitalized).&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DBUSSET=&amp;quot;dbus-send --print-reply --dest=&#039;com.nokia.profiled&#039; /com/nokia/profiled com.nokia.profiled.set_value string:general string:\&#039;%s\&#039; string:\&#039;%s\&#039;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 gconftool-2 -s /system/tweakr/current-preset --type=string &amp;quot;tweakrprofile&amp;quot;&lt;br /&gt;
 gconftool-2 -a /system/tweakr/tweakrprofile|sed &#039;s/^ //&#039;|sed &#039;s/ = /=/&#039;|awk -F&#039;=&#039; &amp;quot;{cmd=sprintf(\&amp;quot;${DBUSSET}\&amp;quot;, \$1, \$2);system(cmd)}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Auto 2G with Wi-Fi===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # auto2g by J.LeFebvre&lt;br /&gt;
 #&lt;br /&gt;
 # Automatically sets 2G cellular mode when a valid Wi-Fi connection is running&lt;br /&gt;
 # This helps conserve battery life&lt;br /&gt;
 #&lt;br /&gt;
 # If an automatic connection to 3G is required when not on Wi-Fi then uncomment the two dbus commands under &amp;quot;set to 3G&amp;quot; line&lt;br /&gt;
 #&lt;br /&gt;
 if `/sbin/ifconfig wlan0 2&amp;gt;/dev/null | grep -q RUNNING`; then&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 2&#039;`; then&lt;br /&gt;
       if (/bin/ping -c 1 www.google.com &amp;gt; /dev/null); then&lt;br /&gt;
          # set to 2G&lt;br /&gt;
          dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
          dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;2G (GSM) cellular mode set&#039;&lt;br /&gt;
       fi&lt;br /&gt;
    fi;&lt;br /&gt;
 else&lt;br /&gt;
    if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q &#039;byte 1&#039;`; then&lt;br /&gt;
       # set to 3G&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
       # dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&#039;3G cellular mode set&#039;&lt;br /&gt;
       echo &#039;&#039; &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
===Gradually increase the volume===&lt;br /&gt;
For an example, you can use this if you softly want to wake up to music.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 for i in 0 10 20 30 40 50 60 70 80 90 100&lt;br /&gt;
 do&lt;br /&gt;
&lt;br /&gt;
   dbus-send --session --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:&#039;volume&#039; variant:uint32:$i&lt;br /&gt;
&lt;br /&gt;
   /bin/sleep 5&lt;br /&gt;
&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>193.14.97.241</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31834</id>
		<title>Phone control</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31834"/>
		<updated>2010-06-09T11:09:31Z</updated>

		<summary type="html">&lt;p&gt;193.14.97.241: /* Change peak_schedule settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Recommended phone usage}}&lt;br /&gt;
&lt;br /&gt;
=D-Bus=&lt;br /&gt;
&lt;br /&gt;
These D-Bus commands can be run from terminal or as shell scripts. Useful for scheduling events with [[fcron]], executing from [[Desktop Command Execution Widget scripts|Desktop Command Execution Widget]] or [[Queen BeeCon Widget]], startup events, install scripts, etc. They should be run as:&lt;br /&gt;
&lt;br /&gt;
 run-standalone.sh SCRIPT.sh&lt;br /&gt;
 run-standalone.sh dbus-send COMMAND&lt;br /&gt;
&lt;br /&gt;
This is important to set up the environment correctly otherwise they may barf. If run as user &amp;quot;user&amp;quot; this is not needed.&lt;br /&gt;
&lt;br /&gt;
Also note that most commands don&#039;t need &amp;quot;--print-reply&amp;quot; option. Those that don&#039;t need it should be &#039;&#039;&#039;tested without it&#039;&#039;&#039; and this page should be edited.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Phone==&lt;br /&gt;
&lt;br /&gt;
===Open Phone application===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:&amp;quot;rtcom-call-ui&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Make a phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:&amp;quot;$NUMBER&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
Change $NUMBER to phone number you want to call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release&lt;br /&gt;
&lt;br /&gt;
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active - needs testing to verify behavior when more then 1 call active) or do nothing if no calls are active. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Answer current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.Answer&lt;br /&gt;
&lt;br /&gt;
This will answer/pickup the current (first) call. &lt;br /&gt;
&lt;br /&gt;
TODO: Early experiments show that this function throws &amp;lt;tt&amp;gt;com.nokia.csd.Call.Error.NotAllowed&amp;lt;/tt&amp;gt; exception. How to get around this?&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Equipment_Identity|IMEI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Subscriber_Identity|IMSI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get cellular signal strength===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_signal_strength&lt;br /&gt;
&lt;br /&gt;
First line is percentage, second is dBm, third unknown.&lt;br /&gt;
&lt;br /&gt;
===Get cellular registration status===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker on===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker off===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Start vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_deactivate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
==Profiles==&lt;br /&gt;
&lt;br /&gt;
===Set General===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set Silent===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Query current profile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List all profiles===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LED==&lt;br /&gt;
&lt;br /&gt;
===Activate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Deactivate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Messaging==&lt;br /&gt;
&lt;br /&gt;
===New e-mail===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:&amp;quot;mailto:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send and receive e-mail===&lt;br /&gt;
&lt;br /&gt;
It works, but it takes looong time (up to minute and a half) via GPRS (2.5, 3 or 3.5). Network and/or speed is not the problem, it just takes long via GPRS. It is much faster via Wi-Fi.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set presence===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:&amp;quot;I&#039;m here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Change peak_schedule settings===&lt;br /&gt;
&lt;br /&gt;
Check:&lt;br /&gt;
 run-standalone.sh gconftool-2 -R /apps/activesync&lt;br /&gt;
&lt;br /&gt;
Set (check if yours is named ActiveSyncAccount1):&lt;br /&gt;
 run-standalone.sh gconftool-2 --set /apps/activesync/ActiveSyncAccount1/schedule/peak_schedule --type=int 15&lt;br /&gt;
Where the last number is one of the following (as standard in GUI):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0&#039;&#039;&#039; = Always on&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-1&#039;&#039;&#039; = Manual&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15&#039;&#039;&#039; = Every 15 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30&#039;&#039;&#039; = Every 30 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;60&#039;&#039;&#039; = Every hour&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;240&#039;&#039;&#039; = Every 4 hours&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;720&#039;&#039;&#039; = Every 12 hours&lt;br /&gt;
&lt;br /&gt;
==Media player==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open file in media player===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:&amp;quot;file:///$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pause what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.stop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play what&#039;s currently selected===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.play&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play next mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.next&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play previous mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.previous&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
===Send notification (orange one line popup)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;NOTIFICATION&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send dialog notification (orange multi line popup requiring user interaction)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:&amp;quot;QUESTION?&amp;quot; uint32:0 string:&amp;quot;OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not sure what string &amp;quot;OK&amp;quot; does, but it is needed and can be anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Securing==&lt;br /&gt;
&lt;br /&gt;
===Lock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;locked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;unlocked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Networking==&lt;br /&gt;
&lt;br /&gt;
===Connect to specific saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;IAP_ID&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
IAP_ID is internet access point identifier and can be obtained with the following command:&lt;br /&gt;
&lt;br /&gt;
 gconftool -R /system/osso/connectivity/IAP&lt;br /&gt;
&lt;br /&gt;
Find lines which matches /system/osso/connectivity/IAP/&amp;lt;IAP_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For GPRS connections replace &amp;quot;@32@&amp;quot; with a space in IAP_ID string.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that phone has to be disconnected in order to connect via this call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to any saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disconnect internet===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect (show change connection UI)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;boolean:true&amp;quot; at the end, one-line notification saying &amp;quot;No saved connections available&amp;quot; appears. Maybe affects more than that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Radio mode==&lt;br /&gt;
&lt;br /&gt;
===2G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dual===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
&lt;br /&gt;
===Identify adapter path===&lt;br /&gt;
&lt;br /&gt;
You need to know adapter path in order to send D-Bus call to the right place. You can get it with entering this command into the terminal:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable===&lt;br /&gt;
&lt;br /&gt;
Using the adapter path value returned with previous command, for example &#039;&#039;/org/bluez/906/hci0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
This one automatically inserts adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
With auto-discovery of adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to specific device===&lt;br /&gt;
&lt;br /&gt;
 devmac=00:11:22:33:44:55&lt;br /&gt;
 service=AudioSink&lt;br /&gt;
 &lt;br /&gt;
 adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;)&lt;br /&gt;
 device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | sed -ne &#039;s/^.*object path //p&#039; -e &#039;s/&amp;quot;//g&#039;)&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect&lt;br /&gt;
&lt;br /&gt;
Change the AudoSink to any service and the devmac to the MAC of bluetooth device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Check for updates==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.hildon_application_manager /com/nokia/hildon_application_manager com.nokia.hildon_application_manager.check_for_updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Open link in browser==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:&amp;quot;google.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set volume==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:50&lt;br /&gt;
&lt;br /&gt;
The value can be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
==Reboot==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_reboot&lt;br /&gt;
This is same as rebooting from power key menu (needs uncommenting in certain XML file to appear) and has been identified as insecure way to reboot the device (no filesystem synchronization, etc.). Better command is to simply enter &amp;quot;reboot&amp;quot; in root terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shutdown==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_shutdown&lt;br /&gt;
See warning at reboot D-Bus call (needs testing).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show dashboard==&lt;br /&gt;
&lt;br /&gt;
 dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
===D-Bus Scripts===&lt;br /&gt;
&lt;br /&gt;
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Panucci (pause)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GConf=&lt;br /&gt;
&lt;br /&gt;
==Reset GPRS data counter==&lt;br /&gt;
&lt;br /&gt;
The commands are PR1.2 compliant and do not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command line=&lt;br /&gt;
&lt;br /&gt;
==Enable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GStreamer=&lt;br /&gt;
&lt;br /&gt;
==Shoot photo after 10 seconds==&lt;br /&gt;
&lt;br /&gt;
The camera application must be off for it to work. And of course the camera shutter must be open...&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video0 num-buffers=1 \! video/x-raw-yuv,width=2592,height=1968  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
To shoot from the front camera, change &#039;&#039;&#039;/dev/video0&#039;&#039;&#039; to &#039;&#039;&#039;/dev/video1&#039;&#039;&#039; and the proper resolution:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 \! video/x-raw-yuv,width=640,height=480  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
Other way:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
=Python=&lt;br /&gt;
&lt;br /&gt;
==Make a phone call==&lt;br /&gt;
&lt;br /&gt;
  import dbus&lt;br /&gt;
  def place_call(number):&lt;br /&gt;
    bus = dbus.SystemBus()&lt;br /&gt;
    csd_call = dbus.Interface(bus.get_object(&#039;com.nokia.csd&#039;,&lt;br /&gt;
                                             &#039;/com/nokia/csd/call&#039;),&lt;br /&gt;
                                             &#039;com.nokia.csd.Call&#039;)&lt;br /&gt;
    csd_call.CreateWith(str(number), dbus.UInt32(0))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Send SMS==&lt;br /&gt;
&lt;br /&gt;
From:&lt;br /&gt;
http://talk.maemo.org/showpost.php?p=548948&amp;amp;postcount=52&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python2.5&lt;br /&gt;
 &lt;br /&gt;
 import pexpect&lt;br /&gt;
 import time&lt;br /&gt;
 from subprocess import *&lt;br /&gt;
 &lt;br /&gt;
 child = pexpect.spawn(&#039;pnatd&#039;);&lt;br /&gt;
 child.send(&#039;at\r&#039;);&lt;br /&gt;
 time.sleep(0.25);&lt;br /&gt;
 child.send(&#039;at+cmgf=1\r&#039;);&lt;br /&gt;
 time.sleep(0.25);&lt;br /&gt;
 child.send(&#039;at+cmgs=&amp;quot;+XXXXXXX&amp;quot;\r&#039;);&lt;br /&gt;
 child.send(&#039;SMSTEXTSMSTEXTSMSTEXT&#039;);&lt;br /&gt;
 child.send(chr(26));&lt;br /&gt;
 child.send(chr(26));&lt;br /&gt;
 child.sendeof();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Send dialog notification (orange multi line popup requiring user interaction)==&lt;br /&gt;
&lt;br /&gt;
  import dbus&lt;br /&gt;
  def show_notification_dialog(message, mode=&amp;quot;single&amp;quot;):&lt;br /&gt;
    bus = dbus.SystemBus()&lt;br /&gt;
    iface = dbus.Interface(bus.get_object(&#039;org.freedesktop.Notifications&#039;,&lt;br /&gt;
                                          &#039;/org/freedesktop/Notifications&#039;),&lt;br /&gt;
                                          &#039;org.freedesktop.Notifications&#039;)&lt;br /&gt;
    if mode == &amp;quot;single&amp;quot;:&lt;br /&gt;
        iface.SystemNoteInfoprint(message)&lt;br /&gt;
    elif mode == &amp;quot;multiline&amp;quot;:&lt;br /&gt;
        iface.SystemNoteDialog(str(message), dbus.UInt32(0), &#039;Ok&#039;)&lt;br /&gt;
&lt;br /&gt;
This function allows you to show notification either with multiline (on maemo pre-5 it will show a dialog with an &amp;quot;Ok&amp;quot; button) or single line (tiny notifications hiding automatically).&lt;br /&gt;
&lt;br /&gt;
==Take a screenshot==&lt;br /&gt;
&lt;br /&gt;
 import gtk.gdk&lt;br /&gt;
 &lt;br /&gt;
 w = gtk.gdk.get_default_root_window()&lt;br /&gt;
 sz = w.get_size()&lt;br /&gt;
 print &amp;quot;The size of the window is %d x %d&amp;quot; % sz&lt;br /&gt;
 pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])&lt;br /&gt;
 pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])&lt;br /&gt;
 if (pb != None):&lt;br /&gt;
   pb.save(&amp;quot;screenshot.png&amp;quot;,&amp;quot;png&amp;quot;)&lt;br /&gt;
   print &amp;quot;Screenshot saved to screenshot.png.&amp;quot;&lt;br /&gt;
 else:&lt;br /&gt;
   print &amp;quot;Unable to get the screenshot.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Credits: took code from [http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux here], where there is also a QT way to do it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>193.14.97.241</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31835</id>
		<title>Phone control</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31835"/>
		<updated>2010-06-09T11:07:51Z</updated>

		<summary type="html">&lt;p&gt;193.14.97.241: /* Messaging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Recommended phone usage}}&lt;br /&gt;
&lt;br /&gt;
=D-Bus=&lt;br /&gt;
&lt;br /&gt;
These D-Bus commands can be run from terminal or as shell scripts. Useful for scheduling events with [[fcron]], executing from [[Desktop Command Execution Widget scripts|Desktop Command Execution Widget]] or [[Queen BeeCon Widget]], startup events, install scripts, etc. They should be run as:&lt;br /&gt;
&lt;br /&gt;
 run-standalone.sh SCRIPT.sh&lt;br /&gt;
 run-standalone.sh dbus-send COMMAND&lt;br /&gt;
&lt;br /&gt;
This is important to set up the environment correctly otherwise they may barf. If run as user &amp;quot;user&amp;quot; this is not needed.&lt;br /&gt;
&lt;br /&gt;
Also note that most commands don&#039;t need &amp;quot;--print-reply&amp;quot; option. Those that don&#039;t need it should be &#039;&#039;&#039;tested without it&#039;&#039;&#039; and this page should be edited.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Phone==&lt;br /&gt;
&lt;br /&gt;
===Open Phone application===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:&amp;quot;rtcom-call-ui&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Make a phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:&amp;quot;$NUMBER&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
Change $NUMBER to phone number you want to call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release&lt;br /&gt;
&lt;br /&gt;
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active - needs testing to verify behavior when more then 1 call active) or do nothing if no calls are active. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Answer current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.Answer&lt;br /&gt;
&lt;br /&gt;
This will answer/pickup the current (first) call. &lt;br /&gt;
&lt;br /&gt;
TODO: Early experiments show that this function throws &amp;lt;tt&amp;gt;com.nokia.csd.Call.Error.NotAllowed&amp;lt;/tt&amp;gt; exception. How to get around this?&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Equipment_Identity|IMEI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Subscriber_Identity|IMSI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get cellular signal strength===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_signal_strength&lt;br /&gt;
&lt;br /&gt;
First line is percentage, second is dBm, third unknown.&lt;br /&gt;
&lt;br /&gt;
===Get cellular registration status===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker on===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker off===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Start vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_deactivate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
==Profiles==&lt;br /&gt;
&lt;br /&gt;
===Set General===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set Silent===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Query current profile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List all profiles===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LED==&lt;br /&gt;
&lt;br /&gt;
===Activate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Deactivate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Messaging==&lt;br /&gt;
&lt;br /&gt;
===New e-mail===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:&amp;quot;mailto:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send and receive e-mail===&lt;br /&gt;
&lt;br /&gt;
It works, but it takes looong time (up to minute and a half) via GPRS (2.5, 3 or 3.5). Network and/or speed is not the problem, it just takes long via GPRS. It is much faster via Wi-Fi.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set presence===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:&amp;quot;I&#039;m here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Change peak_schedule settings===&lt;br /&gt;
&lt;br /&gt;
Check:&lt;br /&gt;
 run-standalone.sh gconftool-2 -R /apps/activesync&lt;br /&gt;
&lt;br /&gt;
Set (check if yours is named ActiveSyncAccount1):&lt;br /&gt;
 run-standalone.sh gconftool-2 --set /apps/activesync/ActiveSyncAccount1/schedule/peak_schedule --type=int 15&lt;br /&gt;
Where the last number is one of the following (as standard in GUI):&lt;br /&gt;
 0 = Always on&lt;br /&gt;
 -1 = Manual&lt;br /&gt;
 15 = Every 15 minutes&lt;br /&gt;
 30 = Every 30 minutes&lt;br /&gt;
 60 = Every hour&lt;br /&gt;
 240 = Every 4 hours&lt;br /&gt;
 720 = Every 12 hours&lt;br /&gt;
&lt;br /&gt;
==Media player==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open file in media player===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:&amp;quot;file:///$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pause what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.stop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play what&#039;s currently selected===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.play&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play next mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.next&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play previous mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.previous&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
===Send notification (orange one line popup)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;NOTIFICATION&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send dialog notification (orange multi line popup requiring user interaction)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:&amp;quot;QUESTION?&amp;quot; uint32:0 string:&amp;quot;OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not sure what string &amp;quot;OK&amp;quot; does, but it is needed and can be anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Securing==&lt;br /&gt;
&lt;br /&gt;
===Lock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;locked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;unlocked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Networking==&lt;br /&gt;
&lt;br /&gt;
===Connect to specific saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;IAP_ID&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
IAP_ID is internet access point identifier and can be obtained with the following command:&lt;br /&gt;
&lt;br /&gt;
 gconftool -R /system/osso/connectivity/IAP&lt;br /&gt;
&lt;br /&gt;
Find lines which matches /system/osso/connectivity/IAP/&amp;lt;IAP_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For GPRS connections replace &amp;quot;@32@&amp;quot; with a space in IAP_ID string.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that phone has to be disconnected in order to connect via this call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to any saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disconnect internet===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect (show change connection UI)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;boolean:true&amp;quot; at the end, one-line notification saying &amp;quot;No saved connections available&amp;quot; appears. Maybe affects more than that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Radio mode==&lt;br /&gt;
&lt;br /&gt;
===2G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dual===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
&lt;br /&gt;
===Identify adapter path===&lt;br /&gt;
&lt;br /&gt;
You need to know adapter path in order to send D-Bus call to the right place. You can get it with entering this command into the terminal:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable===&lt;br /&gt;
&lt;br /&gt;
Using the adapter path value returned with previous command, for example &#039;&#039;/org/bluez/906/hci0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
This one automatically inserts adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
With auto-discovery of adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to specific device===&lt;br /&gt;
&lt;br /&gt;
 devmac=00:11:22:33:44:55&lt;br /&gt;
 service=AudioSink&lt;br /&gt;
 &lt;br /&gt;
 adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;)&lt;br /&gt;
 device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | sed -ne &#039;s/^.*object path //p&#039; -e &#039;s/&amp;quot;//g&#039;)&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect&lt;br /&gt;
&lt;br /&gt;
Change the AudoSink to any service and the devmac to the MAC of bluetooth device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Check for updates==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.hildon_application_manager /com/nokia/hildon_application_manager com.nokia.hildon_application_manager.check_for_updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Open link in browser==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:&amp;quot;google.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set volume==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:50&lt;br /&gt;
&lt;br /&gt;
The value can be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
==Reboot==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_reboot&lt;br /&gt;
This is same as rebooting from power key menu (needs uncommenting in certain XML file to appear) and has been identified as insecure way to reboot the device (no filesystem synchronization, etc.). Better command is to simply enter &amp;quot;reboot&amp;quot; in root terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shutdown==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_shutdown&lt;br /&gt;
See warning at reboot D-Bus call (needs testing).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show dashboard==&lt;br /&gt;
&lt;br /&gt;
 dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
===D-Bus Scripts===&lt;br /&gt;
&lt;br /&gt;
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Panucci (pause)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GConf=&lt;br /&gt;
&lt;br /&gt;
==Reset GPRS data counter==&lt;br /&gt;
&lt;br /&gt;
The commands are PR1.2 compliant and do not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command line=&lt;br /&gt;
&lt;br /&gt;
==Enable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GStreamer=&lt;br /&gt;
&lt;br /&gt;
==Shoot photo after 10 seconds==&lt;br /&gt;
&lt;br /&gt;
The camera application must be off for it to work. And of course the camera shutter must be open...&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video0 num-buffers=1 \! video/x-raw-yuv,width=2592,height=1968  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
To shoot from the front camera, change &#039;&#039;&#039;/dev/video0&#039;&#039;&#039; to &#039;&#039;&#039;/dev/video1&#039;&#039;&#039; and the proper resolution:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 \! video/x-raw-yuv,width=640,height=480  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
Other way:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
=Python=&lt;br /&gt;
&lt;br /&gt;
==Make a phone call==&lt;br /&gt;
&lt;br /&gt;
  import dbus&lt;br /&gt;
  def place_call(number):&lt;br /&gt;
    bus = dbus.SystemBus()&lt;br /&gt;
    csd_call = dbus.Interface(bus.get_object(&#039;com.nokia.csd&#039;,&lt;br /&gt;
                                             &#039;/com/nokia/csd/call&#039;),&lt;br /&gt;
                                             &#039;com.nokia.csd.Call&#039;)&lt;br /&gt;
    csd_call.CreateWith(str(number), dbus.UInt32(0))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Send SMS==&lt;br /&gt;
&lt;br /&gt;
From:&lt;br /&gt;
http://talk.maemo.org/showpost.php?p=548948&amp;amp;postcount=52&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python2.5&lt;br /&gt;
 &lt;br /&gt;
 import pexpect&lt;br /&gt;
 import time&lt;br /&gt;
 from subprocess import *&lt;br /&gt;
 &lt;br /&gt;
 child = pexpect.spawn(&#039;pnatd&#039;);&lt;br /&gt;
 child.send(&#039;at\r&#039;);&lt;br /&gt;
 time.sleep(0.25);&lt;br /&gt;
 child.send(&#039;at+cmgf=1\r&#039;);&lt;br /&gt;
 time.sleep(0.25);&lt;br /&gt;
 child.send(&#039;at+cmgs=&amp;quot;+XXXXXXX&amp;quot;\r&#039;);&lt;br /&gt;
 child.send(&#039;SMSTEXTSMSTEXTSMSTEXT&#039;);&lt;br /&gt;
 child.send(chr(26));&lt;br /&gt;
 child.send(chr(26));&lt;br /&gt;
 child.sendeof();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Send dialog notification (orange multi line popup requiring user interaction)==&lt;br /&gt;
&lt;br /&gt;
  import dbus&lt;br /&gt;
  def show_notification_dialog(message, mode=&amp;quot;single&amp;quot;):&lt;br /&gt;
    bus = dbus.SystemBus()&lt;br /&gt;
    iface = dbus.Interface(bus.get_object(&#039;org.freedesktop.Notifications&#039;,&lt;br /&gt;
                                          &#039;/org/freedesktop/Notifications&#039;),&lt;br /&gt;
                                          &#039;org.freedesktop.Notifications&#039;)&lt;br /&gt;
    if mode == &amp;quot;single&amp;quot;:&lt;br /&gt;
        iface.SystemNoteInfoprint(message)&lt;br /&gt;
    elif mode == &amp;quot;multiline&amp;quot;:&lt;br /&gt;
        iface.SystemNoteDialog(str(message), dbus.UInt32(0), &#039;Ok&#039;)&lt;br /&gt;
&lt;br /&gt;
This function allows you to show notification either with multiline (on maemo pre-5 it will show a dialog with an &amp;quot;Ok&amp;quot; button) or single line (tiny notifications hiding automatically).&lt;br /&gt;
&lt;br /&gt;
==Take a screenshot==&lt;br /&gt;
&lt;br /&gt;
 import gtk.gdk&lt;br /&gt;
 &lt;br /&gt;
 w = gtk.gdk.get_default_root_window()&lt;br /&gt;
 sz = w.get_size()&lt;br /&gt;
 print &amp;quot;The size of the window is %d x %d&amp;quot; % sz&lt;br /&gt;
 pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])&lt;br /&gt;
 pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])&lt;br /&gt;
 if (pb != None):&lt;br /&gt;
   pb.save(&amp;quot;screenshot.png&amp;quot;,&amp;quot;png&amp;quot;)&lt;br /&gt;
   print &amp;quot;Screenshot saved to screenshot.png.&amp;quot;&lt;br /&gt;
 else:&lt;br /&gt;
   print &amp;quot;Unable to get the screenshot.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Credits: took code from [http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux here], where there is also a QT way to do it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>193.14.97.241</name></author>
	</entry>
</feed>