]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index 0a867783817f289c085c9a82e5db4653256deec0..04f902d67e1a4b6d1989b9b0a343212f0c8c01d9 100644 (file)
 
 
     
+    <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 its latest version 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>
+    
     <div class="entry">
       <div class="title"><a href="http://people.skolelinux.org/pere/blog/Boken__Made_with_Creative_Commons__lanseres_p__norsk.html">Boken «Made with Creative Commons» lanseres på norsk</a></div>
       <div class="date">15th November 2020</div>
@@ -537,7 +656,7 @@ Zoom meetings with free software clients.</p>
 password set on the room.  The Jami daemon leak memory like crazy
 (approximately 1 GiB a minute) when I am connected to the video
 conference, so I had to restart the client every 7-10 minutes, which
-is not great.  I tried to get other SIP Linux clients to work
+is not great.  I tried to get other SIP Linux clients to work
 without success, so I decided I would have to live with this wart
 until someone managed to fix the leak in the dring code base.  But
 another problem showed up once the rooms were password protected.  I
@@ -564,7 +683,7 @@ connect via SIP do not mention this.  The SIP address to use normally
 consist of the room ID (a number), an @ character and the IP address
 of the Zoom SIP gateway.  But Zoom understand a lot more than just the
 room ID in front of the at sign.  The format is "<tt>[Meeting
-ID].[Password].[Layout].[Host Key]</tt>", and you can hear see how you
+ID].[Password].[Layout].[Host Key]</tt>", and you can here see how you
 can both enter password, control the layout (full screen, active
 presence and gallery) and specify the host key to start the meeting.
 The full SIP address entered into Jami to provide the password will
@@ -591,57 +710,6 @@ activities, please send Bitcoin donations to my address
     </div>
     <div class="padding"></div>
     
-    <div class="entry">
-      <div class="title"><a href="http://people.skolelinux.org/pere/blog/GnuCOBOL__a_free_platform_to_learn_and_use_COBOL___nice_free_software.html">GnuCOBOL, a free platform to learn and use COBOL - nice free software</a></div>
-      <div class="date">29th April 2020</div>
-      <div class="body"><p>The curiosity got the better of me when
-<a href="https://developers.slashdot.org/story/20/04/06/1424246/new-jersey-desperately-needs-cobol-programmers">Slashdot
-reported</a> that New Jersey was desperately looking for
-<a href="https://en.wikipedia.org/wiki/COBOL">COBOL</a> programmers,
-and a few days later it was reported that
-<a href="https://onezero.medium.com/ibm-rallies-cobol-engineers-to-save-overloaded-unemployment-systems-eeadf13eddce">IBM
-tried to locate COBOL programmers</a>.</p>
-
-<p>I thus decided to have a look at free software alternatives to
-learn COBOL, and had the pleasure to find
-<a href="https://sourceforge.net/projects/open-cobol/">GnuCOBOL</a> was
-already <a href="https://tracker.debian.org/pkg/gnucobol">in
-Debian</a>.  It used to be called Open Cobol, and is a "compiler"
-transforming COBOL code to C or C++ before giving it to GCC or Visual
-Studio to build binaries.</p>
-
-<p>I managed to get in touch with upstream, and was impressed with the
-quick response, and also was happy to see a new Debian maintainer
-taking over when the original one recently asked to be replaced.  A
-new Debian upload was done as recently as yesterday.</p>
-
-<p>Using the Debian package, I was able to follow a simple COBOL
-introduction and make and run simple COBOL programs.  It was fun to
-learn a new programming language.  If you want to test for yourself,
-<a href="https://en.wikipedia.org/wiki/GnuCOBOL">the GnuCOBOL Wikipedia
-page</a> have a few simple examples to get you startet.</p>
-
-<p>As I do not have much experience with COBOL, I do not know how
-standard compliant it is, but it claim to pass most tests from COBOL
-test suite, which sound good to me.  It is nice to know it is possible
-to learn COBOL using software without any usage restrictions, and I am
-very happy such nice free software project as this is available.  If
-you as me is curious about COBOL, check it out.</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/nice free software">nice free software</a>. 
-        
-        
-      </div>
-    </div>
-    <div class="padding"></div>
-    
     <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
     <div id="sidebar">
       
@@ -650,6 +718,13 @@ activities, please send Bitcoin donations to my address
 <h2>Archive</h2>
 <ul>
 
+<li>2021
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2021/01/">January (1)</a></li>
+
+</ul></li>
+
 <li>2020
 <ul>
 
@@ -1018,7 +1093,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (174)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (175)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (159)</a></li>
 
@@ -1032,7 +1107,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (421)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (422)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
 
@@ -1100,7 +1175,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (58)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (59)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
 
@@ -1112,7 +1187,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (12)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (60)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (61)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (5)</a></li>