Editing Desktop Command Execution Widget scripts
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
Warning: This page is 36 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 617: | Line 617: | ||
'''email.sh script:''' | '''email.sh script:''' | ||
- | + | Make it executable and insert proper IAP_ID in the script. What it does is that it checks whether the phone is connected to the internet and if it is, send and receive is performed and if it is not, the defined connection (IAP_ID) is used to connect, then send and receive is performed and script waits about minute and a half (Modest e-mail client which [[Nokia N900|N900]] uses is slow in this aspect) and then disconnects internet. | |
#!/bin/sh | #!/bin/sh | ||
- | + | get=`/sbin/route | awk '/au/ {print $1}'` | |
- | + | if [ `echo $get` = default ]; then | |
+ | dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive | ||
+ | else | ||
+ | dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Updating e-mail" | ||
+ | dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"IAP_ID" uint32:0 | ||
sleep 10 | sleep 10 | ||
- | + | dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive | |
+ | sleep 90 | ||
+ | dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true | ||
+ | dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"E-mail updated" | ||
+ | fi | ||
Learn more about Contributing to the wiki.