sounds cool. I always used to think it would have been cool to switch to '' profile based on Bluetooth or WIFI connection. i.e when detected at my work computer, silent profile activate automatically, when home computer detected, 'general' profile activated....but doing it to times would also be a good/better option.
something that triggers due to 'actual activity' i'e Bluetooth found, wifi detected etc etc would ensure you could be flexible with your time.
I've put together the tips in this thread and some others from here (with thanks to ruskie) and I came up with this not-exactly-easy guide to setup timed profiles.
I've made two scripts, profile_general.sh and profile_silent.sh, to set the profile to general or silent, then setup fcron to run these scripts at specific times.
And this is how I did it:
Originally Posted by
cd /home/user
mkdir Scripts
cd Scripts
create a file named "profile_general.sh", containing:
#!/bin/sh
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
and "profile_silent.sh", containing
#!/bin/sh
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
I haven't tested it, but I think you can create a fcron user with:
useradd fcron
if that doesn't work, then install adduser:
apt-get install adduser --allow-unauthenticated
adduser fcron
EDIT --- editing rcS-late is generally a bad idea and should be avoided. The script will break across upgrades, for instance. See instead the setup of the startup script here: http://wiki.maemo.org/Fcron#Installation
if you still want to edit /etc/event.d/rcS-late, after "initctl emit MOUNTS_OK", add:
/etc/init.d/fcron start
--- from here on everything should be ok.
it is set up to be silent from 8:00 to 18:00 (with a pause from 12:30 to 13:30) and from 00:00 to 8:00, except on saturday and sunday when it will be silent from 2:00 to 11:00.
The "export EDITOR=vim" is needed because fcrontab -e will look for vi in /scratchbox/tools/bin/vi and I don't have it there.
*maybe* you can use an editor other than vim. maybe also one with a GUI.
But ses has LOTS of bugs. First its portrait UI. It's a bug not a feature, because it's not consistent with current Maemo and doesn't work properly. For example when you tap the dashboard button too much is highlighted and so on. Also sometimes when you add an entry it displays wrong hour in the list. For example I added an entry with 8.00 and ses added it to list as 7.26. And it doesn't even uninstall properly. For me it was still switching profiles after the uninstall so I had to delete it manually.
I'll use fcron as it also doesn't limit me. I can schedule just about anything...
I'm using fcron too and I have a question. fcron needs user "fcron" to be run. However, when I added fcron user with "adduser fcron" its home directory was created. My question is if I can safely remove /home/fcron/ or is it needed by fcron/Maemo?