]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 5d4faf3ddfbcaf273816324837ad2b45907c9988..21f428f2cebfc14f05192290922cbdf1847e7881 100644 (file)
@@ -6,6 +6,119 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>Latest Jami back in Debian Testing, and scriptable using dbus</title>
+               <link>http://people.skolelinux.org/pere/blog/Latest_Jami_back_in_Debian_Testing__and_scriptable_using_dbus.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Latest_Jami_back_in_Debian_Testing__and_scriptable_using_dbus.html</guid>
+                <pubDate>Tue, 12 Jan 2021 17:00:00 +0100</pubDate>
+               <description>&lt;p&gt;After a lot of hard work by its maintainer Alexandre Viau and
+others, the decentralized communication platform
+&lt;a href=&quot;https://en.wikipedia.org/wiki/Jami_(software)&quot;&gt;Jami&lt;/a&gt;
+(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.&lt;/p&gt;
+
+&lt;p&gt;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:&lt;/p&gt;
+
+&lt;p&gt;&lt;pre&gt;
+#!/bin/sh
+#
+# Usage: $0 &lt;jami-address&gt; &lt;message&gt;
+#
+# Send &lt;message&gt; to &lt;jami-address&gt;, create local jami account if
+# missing.
+#
+# License: GPL v2 or later at your choice
+# Author: Petter Reinholdtsen
+
+
+if [ -z &quot;$HOME&quot; ] ; then
+    echo &quot;error: missing \$HOME, required for dbus to work&quot;
+    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&gt;/dev/null ; then
+        unset DBUS_SESSION_BUS_ADDRESS
+    fi
+fi
+if [ -z &quot;$DBUS_SESSION_BUS_ADDRESS&quot; ] &amp;&amp; [ -x &quot;$DBUSLAUNCH&quot; ]; then
+    DBUS_SESSION_BUS_ADDRESS=&quot;unix:path=$HOME/.dbus&quot;
+    dbus-daemon --session --address=&quot;$DBUS_SESSION_BUS_ADDRESS&quot; --nofork --nopidfile --syslog-only &lt; /dev/null &gt; /dev/null 2&gt;&amp;1 3&gt;&amp;1 &amp;
+    DBUS_SESSION_BUS_PID=$!
+    (
+        echo DBUS_SESSION_BUS_PID=$DBUS_SESSION_BUS_PID
+        echo DBUS_SESSION_BUS_ADDRESS=\&quot;&quot;$DBUS_SESSION_BUS_ADDRESS&quot;\&quot;
+        echo export DBUS_SESSION_BUS_ADDRESS
+    ) &gt; $PIDFILE
+    . $PIDFILE
+fi &amp;
+
+dringop() {
+    part=&quot;$1&quot;; shift
+    op=&quot;$1&quot;; shift
+    dbus-send --session \
+        --dest=&quot;cx.ring.Ring&quot; /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
+}
+
+dringopreply() {
+    part=&quot;$1&quot;; shift
+    op=&quot;$1&quot;; shift
+    dbus-send --session --print-reply \
+        --dest=&quot;cx.ring.Ring&quot; /cx/ring/Ring/$part cx.ring.Ring.$part.$op $*
+}
+
+firstaccount() {
+    dringopreply ConfigurationManager getAccountList | \
+      grep string | awk -F&#39;&quot;&#39; &#39;{print $2}&#39; | head -n 1
+}
+
+account=$(firstaccount)
+
+if [ -z &quot;$account&quot; ] ; then
+    echo &quot;Missing local account, trying to create it&quot;
+    dringop ConfigurationManager addAccount \
+      dict:string:string:&quot;Account.type&quot;,&quot;RING&quot;,&quot;Account.videoEnabled&quot;,&quot;false&quot;
+    account=$(firstaccount)
+    if [ -z &quot;$account&quot; ] ; then
+        echo &quot;unable to create local account&quot;
+        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:&quot;$account&quot; string:&quot;$1&quot; \
+  dict:string:string:&quot;text/plain&quot;,&quot;$2&quot; 
+&lt;/pre&gt;&lt;/p&gt;
+
+&lt;p&gt;If you want to check it out yourself, visit the 
+&lt;a href=&quot;https://jami.net/&quot;&gt;the Jami system project page&lt;/a&gt; to learn
+more, and install the latest Jami client from Debian Unstable or
+Testing.&lt;/p&gt;
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Boken «Made with Creative Commons» lanseres på norsk</title>
                <link>http://people.skolelinux.org/pere/blog/Boken__Made_with_Creative_Commons__lanseres_p__norsk.html</link>
@@ -478,7 +591,7 @@ Zoom meetings with free software clients.&lt;/p&gt;
 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
@@ -505,7 +618,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 &quot;&lt;tt&gt;[Meeting
-ID].[Password].[Layout].[Host Key]&lt;/tt&gt;&quot;, and you can hear see how you
+ID].[Password].[Layout].[Host Key]&lt;/tt&gt;&quot;, 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
@@ -518,51 +631,6 @@ then look like this (all using made up numbers):&lt;/p&gt;
 &lt;p&gt;Now if only jami would reduce its memory usage, I could even
 recommend this setup to others. :)&lt;/p&gt;
 
-&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
-</description>
-       </item>
-       
-       <item>
-               <title>GnuCOBOL, a free platform to learn and use COBOL - nice free software</title>
-               <link>http://people.skolelinux.org/pere/blog/GnuCOBOL__a_free_platform_to_learn_and_use_COBOL___nice_free_software.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/GnuCOBOL__a_free_platform_to_learn_and_use_COBOL___nice_free_software.html</guid>
-                <pubDate>Wed, 29 Apr 2020 13:10:00 +0200</pubDate>
-               <description>&lt;p&gt;The curiosity got the better of me when
-&lt;a href=&quot;https://developers.slashdot.org/story/20/04/06/1424246/new-jersey-desperately-needs-cobol-programmers&quot;&gt;Slashdot
-reported&lt;/a&gt; that New Jersey was desperately looking for
-&lt;a href=&quot;https://en.wikipedia.org/wiki/COBOL&quot;&gt;COBOL&lt;/a&gt; programmers,
-and a few days later it was reported that
-&lt;a href=&quot;https://onezero.medium.com/ibm-rallies-cobol-engineers-to-save-overloaded-unemployment-systems-eeadf13eddce&quot;&gt;IBM
-tried to locate COBOL programmers&lt;/a&gt;.&lt;/p&gt;
-
-&lt;p&gt;I thus decided to have a look at free software alternatives to
-learn COBOL, and had the pleasure to find
-&lt;a href=&quot;https://sourceforge.net/projects/open-cobol/&quot;&gt;GnuCOBOL&lt;/a&gt; was
-already &lt;a href=&quot;https://tracker.debian.org/pkg/gnucobol&quot;&gt;in
-Debian&lt;/a&gt;.  It used to be called Open Cobol, and is a &quot;compiler&quot;
-transforming COBOL code to C or C++ before giving it to GCC or Visual
-Studio to build binaries.&lt;/p&gt;
-
-&lt;p&gt;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.&lt;/p&gt;
-
-&lt;p&gt;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,
-&lt;a href=&quot;https://en.wikipedia.org/wiki/GnuCOBOL&quot;&gt;the GnuCOBOL Wikipedia
-page&lt;/a&gt; have a few simple examples to get you startet.&lt;/p&gt;
-
-&lt;p&gt;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.&lt;/p&gt;
-
 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
 activities, please send Bitcoin donations to my address
 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;