1 Title: Latest Jami back in Debian Testing, and scriptable using dbus
2 Tags: english, debian, sikkerhet, surveillance
5 <p>After a lot of hard work by its maintainer Alexandre Viau and
6 others, the decentralized communication platform
7 <a href="https://en.wikipedia.org/wiki/Jami_(software)">Jami</a>
8 (earlier known as Ring), managed to get
9 <a href="https://tracker.debian.org/pkg/ring">its latest version</a>
10 into Debian Testing. Several of its dependencies has caused build and
11 propagation problems, which all seem to be solved now.</p>
13 <p>In addition to the fact that Jami is decentralized, similar to how
14 bittorrent is decentralized, I first of all like how it is not
15 connected to external IDs like phone numbers. This allow me to set up
16 computers to send me notifications using Jami without having to find
17 get a phone number for each computer. Automatic notification via Jami
18 is also made trivial thanks to the provided client side API (as a DBus
19 service). Here is my bourne shell script demonstrating how to let any
20 system send a message to any Jami address. It will create a new
21 identity before sending the message, if no Jami identity exist
27 # Usage: $0 <jami-address> <message>
29 # Send <message> to <jami-address>, create local jami account if
32 # License: GPL v2 or later at your choice
33 # Author: Petter Reinholdtsen
36 if [ -z "$HOME" ] ; then
37 echo "error: missing \$HOME, required for dbus to work"
41 # First, get dbus running if not already running
42 DBUSLAUNCH=/usr/bin/dbus-launch
43 PIDFILE=/run/asterisk/dbus-session.pid
44 if [ -e $PIDFILE ] ; then
46 if ! kill -0 $DBUS_SESSION_BUS_PID 2>/dev/null ; then
47 unset DBUS_SESSION_BUS_ADDRESS
50 if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -x "$DBUSLAUNCH" ]; then
51 DBUS_SESSION_BUS_ADDRESS="unix:path=$HOME/.dbus"
52 dbus-daemon --session --address="$DBUS_SESSION_BUS_ADDRESS" --nofork --nopidfile --syslog-only < /dev/null > /dev/null 2>&1 3>&1 &
53 DBUS_SESSION_BUS_PID=$!
55 echo DBUS_SESSION_BUS_PID=$DBUS_SESSION_BUS_PID
56 echo DBUS_SESSION_BUS_ADDRESS=\""$DBUS_SESSION_BUS_ADDRESS"\"
57 echo export DBUS_SESSION_BUS_ADDRESS
66 --dest="cx.ring.Ring" /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
72 dbus-send --session --print-reply \
73 --dest="cx.ring.Ring" /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
77 dringopreply ConfigurationManager getAccountList | \
78 grep string | awk -F'"' '{print $2}' | head -n 1
81 account=$(firstaccount)
83 if [ -z "$account" ] ; then
84 echo "Missing local account, trying to create it"
85 dringop ConfigurationManager addAccount \
86 dict:string:string:"Account.type","RING","Account.videoEnabled","false"
87 account=$(firstaccount)
88 if [ -z "$account" ] ; then
89 echo "unable to create local account"
94 # Not using dringopreply to ensure $2 can contain spaces
95 dbus-send --print-reply --session \
97 /cx/ring/Ring/ConfigurationManager \
98 cx.ring.Ring.ConfigurationManager.sendTextMessage \
99 string:"$account" string:"$1" \
100 dict:string:string:"text/plain","$2"
103 <p>If you want to check it out yourself, visit the
104 <a href="https://jami.net/">the Jami system project page</a> to learn
105 more, and install the latest Jami client from Debian Unstable or
108 <p>As usual, if you use Bitcoin and want to show your support of my
109 activities, please send Bitcoin donations to my address
110 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>