Reply
Thread Tools
Posts: 19 | Thanked: 6 times | Joined on Dec 2012
#1551
Hi ajalkane, thanks for answer,

Originally Posted by ajalkane View Post
I don't unfortunately know how to do it. You can try monitoring what DBus messages are being sent when you change those schedules.
I have wrote a cross thread about it

So I think I've reach my limit with Dbus to be able to write a command to change schedule mode or anything else about mail accounts.

Lorenzo seems to have the same kind of problem with managing mail account via profilematic and its custom action.

Regards,
Nemric.
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1552
Originally Posted by jalyst View Post
Instead of assuming much will change, I don't suppose you've raised your concerns here?
https://together.jolla.com/questions
Or Nemo bug-tracker, or both. Just a suggestion, I'm not trying to tell you what to do.
Thanks... in together there's many topics relating to this already.

Regarding the libraries needed, I certainly will intend to request that they will be white-listed in harbour once I have the device to test with and figure what's needed.
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1553
Originally Posted by nemric View Post
Hi ajalkane, thanks for answer,

I have wrote a cross thread about it

So I think I've reach my limit with Dbus to be able to write a command to change schedule mode or anything else about mail accounts.
EmaNymton's answer indicates you can't control such complicated structures using just command-line tools. You'll need a little python script. You can also run python scripts without problem from ProfileMatic's Custom Action so it should be possible to do.

I'm sure here's people here with experience that could help you with writing those DBus commands in Python script - I don't have enough relevant experience to tell immediately how to do it.
__________________
My N9/N950 projects:
 
Posts: 3 | Thanked: 2 times | Joined on Jan 2014
#1554
Originally Posted by ajalkane View Post
Just a guess, perhaps device has not had time to fully exit power saving mode before you try syncing and the sync is not done when in power saving mode? If that is the case you can try to add some delay in the script.

If it works from command-line it should work from ProfileMatic. But you can also debug your scripts for example by writing the output of that dbus-send command to a file and inspecting what it says.
Many thanks for feedback. For your first comment, it is a good suggestion but I already have ~1 min delay after disabling PSM.

I agree that it should be working as the command line seem to be fully functional. Or atleast there should be a way to get it working. My feeling is that there may be some problems with command line parsing here as the dbus-send has long list of arguments ending with calendar ID string inside single quotes. But on the other hand, I am rather inexperienced linux user so this may be incorrect. Furthermore,I have to confess that I have been testing many of the options using the easy easy way, that is, using Profilematic's test button and the checking if I see the sync arrow to appear onscreen. Could this explain the lack of success?
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1555
Originally Posted by klefa View Post
I agree that it should be working as the command line seem to be fully functional.
Have you tried running it from N9's terminal to make sure it works?

If you have and it works there, can you include here the full Custom Action and the scripts it calls. Maybe some problem can be seen then.

Furthermore,I have to confess that I have been testing many of the options using the easy easy way, that is, using Profilematic's test button and the checking if I see the sync arrow to appear onscreen. Could this explain the lack of success?
No, the test button causes same thing to happen as when ProfileMatic's conditions cause the action to trigger - so that's the right way to test if it works with ProfileMatic.
__________________
My N9/N950 projects:
 
Posts: 697 | Thanked: 137 times | Joined on Jul 2012 @ Hillerød, DK
#1556
Originally Posted by ajalkane View Post

No, the test button causes same thing to happen as when ProfileMatic's conditions cause the action to trigger - so that's the right way to test if it works with ProfileMatic.
Re this issue I have an old unsolved problem due to test button and custom action content:
Re custom action Network you said action to be:
sh /home/user/scripts/execroot.sh "/sbin/initctl restart xsession/icd2"
which did't work but this from Schturman worked:
sh -c "echo rootme | devel-su -c '/sbin/initctl restart xsession/icd2'"

see: http://talk.maemo.org/showthread.php...14#post1373614

I have same problem where test button don't work with action:
sh /home/user/scripts/execroot.sh /home/user/scripts/restartbme.sh
http://talk.maemo.org/showpost.php?p...&postcount=885

Should this action be changed due to something like above from Schturman?
__________________
OK
 

The Following 2 Users Say Thank You to Garp For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1557
Originally Posted by Garp View Post
Re this issue I have an old unsolved problem due to test button and custom action content:
Re custom action Network you said action to be:
sh /home/user/scripts/execroot.sh "/sbin/initctl restart xsession/icd2"
which did't work but this from Schturman worked:
sh -c "echo rootme | devel-su -c '/sbin/initctl restart xsession/icd2'"

see: http://talk.maemo.org/showthread.php...14#post1373614

I have same problem where test button don't work with action:
sh /home/user/scripts/execroot.sh /home/user/scripts/restartbme.sh
http://talk.maemo.org/showpost.php?p...&postcount=885

Should this action be changed due to something like above from Schturman?
The execroot version should work just the same. If it doesn't, there's probably a bug in the script. I'll double check this when I have time and modify accordingly. Nothing wrong with using Schturman's version, perhaps it's even clearer.
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post:
Posts: 3 | Thanked: 2 times | Joined on Jan 2014
#1558
Originally Posted by ajalkane View Post
The execroot version should work just the same. If it doesn't, there's probably a bug in the script. I'll double check this when I have time and modify accordingly. Nothing wrong with using Schturman's version, perhaps it's even clearer.
I followed the suggestion by Garp above for my calendar sync issue, with the following command line:

sh -c "echo rootme | devel-su -c '/usr/bin/dbus-send --session --print-reply --dest=com.meego.msyncd /synchronizer com.meego.msyncd.startSync string:'160967398''"

...and IT WORKS - at least when using the test button.

Now, my setup would be perfect if anybody would have a suggestion of how to invoke meecast update on command line as well :-)

Last edited by klefa; 2014-01-15 at 18:11.
 

The Following 2 Users Say Thank You to klefa For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1559
Originally Posted by ajalkane View Post
The execroot version should work just the same. If it doesn't, there's probably a bug in the script. I'll double check this when I have time and modify accordingly. Nothing wrong with using Schturman's version, perhaps it's even clearer.
I couldn't find anything wrong with the execroot script, and my tests showed it working.

But obviously using it seems to be prone to mistakes as is evident by (at least) two examples (this can be errors in copying the script, windows line-feeds, etc.).

So in light of that I've edited the posts detailing running as root to have the "echo rootme | devel-su -c" version as first.
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#1560
@ajalkane
There is nothing wrong with the execroot script. So it really seems like copy or lf/cr mistakes.
Only one little thing:
the script takes only one parameter (the commmand itself). But what about having the need to give some parameters to that script?

I have the approach using a template header activating root rights and then execute the shell script in lower part of the same file.
For each action one dedicated script which can be called with as much parameters as you like (and tweaked inside).

Code:
#!/bin/sh
# executing a shell script given with paramete$
# by peterleinchen, based on MFaroTusino's idea

if [ $(id -u) != 0 ]; then
  echo rootme | devel-su -c "$0 $*"
  exit $?
fi

# own shell code from here
echo $(whoami) >> /home/user/.out_execAsRoot
Make the script executable (chmod +x scriptName).
For safety freaks you may also make it non-readable (root password inside) with chmod u-r scriptName.

Just make sure to give the full qualified path name when calling.


In fact it is pretty much the same as the execroot.script and also based on MFaroTusino's. But all in one place and I like it that way ... (just wanted to share)
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:02.