- <div class="entry">
- <div class="title"><a href="http://people.skolelinux.org/pere/blog/Latest_Jami_back_in_Debian_Testing__and_scriptable_using_dbus.html">Latest Jami back in Debian Testing, and scriptable using dbus</a></div>
- <div class="date">12th January 2021</div>
- <div class="body"><p>After a lot of hard work by its maintainer Alexandre Viau and
-others, the decentralized communication platform
-<a href="https://en.wikipedia.org/wiki/Jami_(software)">Jami</a>
-(earlier known as Ring), managed to get
-<a href="https://tracker.debian.org/pkg/ring">its latest version</a>
-into Debian Testing. Several of its dependencies has caused build and
-propagation problems, which all seem to be solved now.</p>
-
-<p>In addition to the fact that Jami is decentralized, similar to how
-bittorrent is decentralized, I first of all like how it is not
-connected to external IDs like phone numbers. This allow me to set up
-computers to send me notifications using Jami without having to find
-get a phone number for each computer. Automatic notification via Jami
-is also made trivial thanks to the provided client side API (as a DBus
-service). Here is my bourne shell script demonstrating how to let any
-system send a message to any Jami address. It will create a new
-identity before sending the message, if no Jami identity exist
-already:</p>
-
-<p><pre>
-#!/bin/sh
-#
-# Usage: $0 <jami-address> <message>
-#
-# Send <message> to <jami-address>, create local jami account if
-# missing.
-#
-# License: GPL v2 or later at your choice
-# Author: Petter Reinholdtsen
-
-
-if [ -z "$HOME" ] ; then
- echo "error: missing \$HOME, required for dbus to work"
- exit 1
-fi
-
-# First, get dbus running if not already running
-DBUSLAUNCH=/usr/bin/dbus-launch
-PIDFILE=/run/asterisk/dbus-session.pid
-if [ -e $PIDFILE ] ; then
- . $PIDFILE
- if ! kill -0 $DBUS_SESSION_BUS_PID 2>/dev/null ; then
- unset DBUS_SESSION_BUS_ADDRESS
- fi
-fi
-if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -x "$DBUSLAUNCH" ]; then
- DBUS_SESSION_BUS_ADDRESS="unix:path=$HOME/.dbus"
- dbus-daemon --session --address="$DBUS_SESSION_BUS_ADDRESS" --nofork --nopidfile --syslog-only < /dev/null > /dev/null 2>&1 3>&1 &
- DBUS_SESSION_BUS_PID=$!
- (
- echo DBUS_SESSION_BUS_PID=$DBUS_SESSION_BUS_PID
- echo DBUS_SESSION_BUS_ADDRESS=\""$DBUS_SESSION_BUS_ADDRESS"\"
- echo export DBUS_SESSION_BUS_ADDRESS
- ) > $PIDFILE
- . $PIDFILE
-fi &
-
-dringop() {
- part="$1"; shift
- op="$1"; shift
- dbus-send --session \
- --dest="cx.ring.Ring" /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
-}
-
-dringopreply() {
- part="$1"; shift
- op="$1"; shift
- dbus-send --session --print-reply \
- --dest="cx.ring.Ring" /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
-}
-
-firstaccount() {
- dringopreply ConfigurationManager getAccountList | \
- grep string | awk -F'"' '{print $2}' | head -n 1
-}
-
-account=$(firstaccount)
-
-if [ -z "$account" ] ; then
- echo "Missing local account, trying to create it"
- dringop ConfigurationManager addAccount \
- dict:string:string:"Account.type","RING","Account.videoEnabled","false"
- account=$(firstaccount)
- if [ -z "$account" ] ; then
- echo "unable to create local account"
- exit 1
- fi
-fi
-
-# Not using dringopreply to ensure $2 can contain spaces
-dbus-send --print-reply --session \
- --dest=cx.ring.Ring \
- /cx/ring/Ring/ConfigurationManager \
- cx.ring.Ring.ConfigurationManager.sendTextMessage \
- string:"$account" string:"$1" \
- dict:string:string:"text/plain","$2"
-</pre></p>
-
-<p>If you want to check it out yourself, visit the
-<a href="https://jami.net/">the Jami system project page</a> to learn
-more, and install the latest Jami client from Debian Unstable or
-Testing.</p>
-
-<p>As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
-</div>
- <div class="tags">
-
-
- Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
-
-
- </div>
- </div>
- <div class="padding"></div>
-