maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting) (https://talk.maemo.org/showthread.php?t=46594)

shapeshifter 2010-03-27 09:22

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by evad (Post 583878)
UPDATE: GOT IT!
In /opt/alarmed/tweakrprofileswitcher.sh script I've changed first line from #!/bin/bash to #!/bin/ash - and now switching profiles works (even without a need to create a custom tweakrprofileswitcher.sh command)! Woohoo! :)

Dude you're a genius. Thanks a lot for figuring this one out. I read your bug report and started pondering over the problem again, because it was soo weird and random. I'll make the changes in the package and upload an update soon so everyone can profit.
Thanks again ^^

edit:
Package updated and tested, should work for everyone now?

though this doesn't explain why your syncevolution command runs fine manually but not from the alarmd_queue.ini... :| I *could* remove the '/bin/ash -c' prefix but I think that this would break commands that have stuff like '>>' in them and things.

rash.m2k 2010-03-27 09:41

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 584099)
Dude you're a genius. Thanks a lot for figuring this one out. I read your bug report and started pondering over the problem again, because it was soo weird and random. I'll make the changes in the package and upload an update soon so everyone can profit.
Thanks again ^^

in total this is in 5 files in total i.e. all the .sh files, a quick cat and grep showed this, so you need to change them also. mine wasnt working now it does!!!

grog 2010-03-27 14:27

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 584099)
Package updated and tested, should work for everyone now?

Works for me. I can even switch to/from Silent & General. Good work!!! TX

ffarber 2010-03-27 18:00

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
I have been lurking on thread for a while trying to figure out why alarmed wasn't working for me either, now it is working. Yes!!! Unfortunately, I am not a Linux maven and I am struggling to come up with a script that will reboot the phone which I want to use alarmed to trigger.

1) I couldn't get the dbus-send approach to work, I don't know why
2) You need to be root to run the reboot command and someone shot down the idea of having a checkbox in alarmed to run the command as root due to security concerns...not sure who cares about that since the phone is always with me and I have not installed openssh but maybe I am missing something
3) I tried 'rootsh reboot' and got some weird pop-up message that rootsh was no longer trusted (I forget the exact wording)

Sorry for the off topic rant, I got carried away. Thanks for alarmed, now that it switches profiles for me, I can remove system event scheduler.

Cheers,
Fred

shapeshifter 2010-03-27 18:29

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by ffarber (Post 584471)
I am struggling to come up with a script that will reboot the phone which I want to use alarmed to trigger.

I just tried 'sudo reboot', and it seems to work. I also tried it as a comman execution and it's allright. I'm guessing rootsh needs to be installed for this anyway. But it seems to work. You might wanna try this.

tokag 2010-03-27 21:18

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
very nice app man. super useful, i thank you. my only suggestion for improvement is to add a link in the "extras" sections of the settings menu. otherwise, good stuff. thanks again.

ffarber 2010-03-27 22:13

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 584516)
I just tried 'sudo reboot', and it seems to work. I also tried it as a comman execution and it's allright. I'm guessing rootsh needs to be installed for this anyway. But it seems to work. You might wanna try this.

Thanks, I had tried that from xtrerminal and it asks for a password (I forgot to mention that in my prior post) but I will try again.

Fred

evad 2010-03-28 00:29

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 584099)
edit:
Package updated and tested, should work for everyone now?

Works ok for me.

Quote:

though this doesn't explain why your syncevolution command runs fine manually but not from the alarmd_queue.ini... :| I *could* remove the '/bin/ash -c' prefix but I think that this would break commands that have stuff like '>>' in them and things.
Does it make a difference that in this case /bin/ash is actually trying to execute a python app/script? Doesn't that conflict in some way?

I did workaround this, tough. Instead of executing /opt/syncevolution/sync.py I do /usr/bin/syncevolution - actual syncevolution application (sync.py is just a front-end for syncevolution). This way my syncing via alarmed works ok.

Generally, I rather wouldn't automatically insert any command execution prefixes as you do with /bin/ash -c 'command-entered-by-user' - if one user is savvy enough to schedule a custom command, he/she should type command exactly as it should run.

General suggestions/wishlist to Alarmed
Since it gladly works as I expected, here's couple of my suggestions to the app:
  • Add ability to disable/enable specific jobs, instead of deleting/adding them.
  • Automatically remove single-run jobs, ie. "alarm in 5 minutes" - add option to delete that job once it goes off.
  • On the jobs list only display name of job given by user (currently job descriptions, especially those based on cron syntax are painfully long).
  • Add more built-in functions, ie. launching device backup (suggested by someone before), (dis)connect cellular/wifi adapters, switch 2G/3G modes, change telepathy accounts online/offline statuses etc.

mdengler 2010-03-31 06:21

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Is it just me, or are other people getting this too?

Code:

# apt-get -y install alarmed
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  alarmed: Depends: pyside-qt4-core but it is not going to be installed
          Depends: pyside-qt4-maemo5 but it is not going to be installed
          Depends: pyside-qt4-gui but it is not going to be installed
E: Broken packages


Rob1n 2010-03-31 08:19

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by mdengler (Post 589212)
Is it just me, or are other people getting this too?

Code:

# apt-get -y install alarmed
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  alarmed: Depends: pyside-qt4-core but it is not going to be installed
          Depends: pyside-qt4-maemo5 but it is not going to be installed
          Depends: pyside-qt4-gui but it is not going to be installed
E: Broken packages


I've not had that exact issue, but I can see that the pyside-qt4 packages are being held back from updating. This is due to the autobuilder using the new PR1.2 SDK to build the packages, meaning they're not compatible with the PR1.1.1 phones. You'll either need to get hold of older versions of the dependencies, build them yourself using the older SDK, or wait for PR1.2 to be released.


All times are GMT. The time now is 21:23.

vBulletin® Version 3.8.8