Active Topics

 


Reply
Thread Tools
Posts: 20 | Thanked: 17 times | Joined on Nov 2011 @ Zagreb, Croatia
#1
Hi everyone!

Util we get official call log from Jolla and inspired by answer from kortsi at https://together.jolla.com/question/...lete-call-log/ I decided to create simple script which creates a html table and invokes browser to show it.

Also, I packed everything into tar file, so you can use it as application to show full call log. Icon I used to show this "application" was from my Nokia 808.

To use tar from attachment in this post, copy it to root directory (/) and un-tar as root:
Code:
devel-su
cd /
tar xvf call-log.0.1.tar
Contents of archive is as follows:
Code:
[nemo@localhost Downloads]$ tar -tvf call-log.0.1.tar
drwxrwxr-x nemo/nemo         0 2014-02-12 00:16 home/nemo/.call-log/
-rw-r--r-- nemo/nemo       168 2014-02-12 00:06 usr/share/applications/call-log.desktop
-rwxr-xr-x root/root      1375 2014-02-12 00:14 usr/share/call-log/call-log.sh
-rw-r--r-- root/root      8230 2014-02-11 22:59 usr/share/icons/hicolor/86x86/apps/call-log.png
Note: I am not a developer, so I used my bash/scripting knowledge to made this possible. Probably I didn't everything "by the book", so if I made some mistakes please let me know.

Of course, as usual, use it at your own risk

18.02.2014. added new version 0.3.
Attached Files
File Type: tar call-log.0.3.tar (20.0 KB, 353 views)

Last edited by kskoda; 2014-02-18 at 08:01.
 

The Following 12 Users Say Thank You to kskoda For This Useful Post:
Posts: 31 | Thanked: 32 times | Joined on Jan 2008 @ Helsinki
#2
That's clever. I had no idea it would be so easy to run a script from the app list, and fire up the browser. I will be using this. Thanks!
 

The Following User Says Thank You to kortsi For This Useful Post:
Posts: 20 | Thanked: 17 times | Joined on Nov 2011 @ Zagreb, Croatia
#3
Next step is to merge phone numbers with contacts database, but this seems a little harder because I have to join 2 databases.
I'm thinking to clone Events and Contacts tables into new sqlite DB, and then merge them with one query.
 

The Following User Says Thank You to kskoda For This Useful Post:
Posts: 20 | Thanked: 17 times | Joined on Nov 2011 @ Zagreb, Croatia
#4
Just uploaded version 0.3, in which contact names, mobile type and phone number are shown.
Unfortunately, this version needs sudo command/package installed because Contacts database needs privileged user. I downloaded mine from OpenRepos at https://openrepos.net/content/nieldk/sudo

After installation of "sudo", we need to add "nemo" to privileged user in /etc/sudoers with "visudo" command:
Code:
nemo ALL=(ALL) NOPASSWD: ALL
 

The Following 2 Users Say Thank You to kskoda For This Useful Post:
Posts: 1 | Thanked: 1 time | Joined on Feb 2015
#5
I just registered just to thank you for this awesome script, love it
 

The Following User Says Thank You to Crescendo For This Useful Post:
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#6
Originally Posted by kskoda View Post
Just uploaded version 0.3, in which contact names, mobile type and phone number are shown.
Unfortunately, this version needs sudo command/package installed because Contacts database needs privileged user. I downloaded mine from OpenRepos at https://openrepos.net/content/nieldk/sudo

After installation of "sudo", we need to add "nemo" to privileged user in /etc/sudoers with "visudo" command:
Code:
nemo ALL=(ALL) NOPASSWD: ALL
This is very good work and thanks for sharing.

If you allow me to suggest a small improvement; instead of giving more rights to nemo (which is kind of a security leak), you could give only to the script the elevated rights.
I didn't look too much into your script, but maybe you'll need to split all the sudo actions into a second script and call it from inside your main script that is executed as user.
 

The Following 3 Users Say Thank You to Saturn For This Useful Post:
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#7
Here are some instructions to achieve the above:

1. Create a sudoers file to give the priviledges to a script:
Code:
visudo -f /etc/sudoers.d/callLogHelper
and add here the following;
Code:
ALL ALL = (root) NOPASSWD: /usr/share/call-log/callLogHelper.sh
2. Create the script in /usr/share/call-log/callLogHelper.sh
and add the two calls that need to be executed as root.

3. in the call-log.sh add the line:
Code:
sudo /usr/share/call-log/callLogHelper.sh
replacing the previous sudo lines.

attached are the files for clarity, just remove the ".txt" at the end.

Hope it helps.
Attached Files
File Type: txt call-log.sh.txt (3.0 KB, 196 views)
File Type: txt callLogHelper.sh.txt (298 Bytes, 166 views)
File Type: txt callLogHelper.txt (64 Bytes, 158 views)
 

The Following 3 Users Say Thank You to Saturn For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#8
Oops, looks like I missed to hit the refresh button. :embarassed: (had that open since the morning and wanted to write this answer but did not find time during carneval )

Originally Posted by Saturn View Post
... If you allow me to suggest a small improvement; instead of giving more rights to nemo (which is kind of a security leak), you could give only to the script the elevated rights.
Second that.
... split all the sudo actions into a second script and call it from inside your main script that is executed as user.
Even better.

Never do (smells like sudser package on N900):
Originally Posted by kskoda View Post
Code:
nemo ALL=(ALL) NOPASSWD: ALL
But maybe
Code:
nemo ALL=(ALL) NOPASSWD: /usr/share/call-log/callLog.sh
possibly add a "*" at the end for parameters to pass.
__________________
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

Last edited by peterleinchen; 2015-02-15 at 19:07.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 20 | Thanked: 17 times | Joined on Nov 2011 @ Zagreb, Croatia
#9
Thanks to all for comments and suggestions!

As my Jolla is currently used by my wife (unfortunately I have to use device with dual SIM without Sailfish ), it will take some time to take your suggestions into scripts/tar.

Feel free to update your scripts in your Jollas, or even better when you update and test it send it to me and I'll update initial post.
 

The Following User Says Thank You to kskoda For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#10
why you want ot execute something with no password? The only you need is
Code:
nemo ALL=(ALL) ALL
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Reply

Tags
call log, sailfish os


 
Forum Jump


All times are GMT. The time now is 16:15.