]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 762fc9ffb641bb55c089caf98faa57a45dbd1e44..2faa9a8da375278afb129e0e38a71c06e74898ac 100644 (file)
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
        <item>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
        <item>
-               <title>A program should be able to open its own files on Linux</title>
-               <link>http://people.skolelinux.org/pere/blog/A_program_should_be_able_to_open_its_own_files_on_Linux.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/A_program_should_be_able_to_open_its_own_files_on_Linux.html</guid>
-                <pubDate>Sun, 5 Jun 2016 08:30:00 +0200</pubDate>
-               <description>&lt;p&gt;Many years ago, when koffice was fresh and with few users, I
-decided to test its presentation tool when making the slides for a
-talk I was giving for NUUG on Japhar, a free Java virtual machine.  I
-wrote the first draft of the slides, saved the result and went to bed
-the day before I would give the talk.  The next day I took a plane to
-the location where the meeting should take place, and on the plane I
-started up koffice again to polish the talk a bit, only to discover
-that kpresenter refused to load its own data file.  I cursed a bit and
-started making the slides again from memory, to have something to
-present when I arrived.  I tested that the saved files could be
-loaded, and the day seemed to be rescued.  I continued to polish the
-slides until I suddenly discovered that the saved file could no longer
-be loaded into kpresenter.  In the end I had to rewrite the slides
-three times, condensing the content until the talk became shorter and
-shorter.  After the talk I was able to pinpoint the problem &amp;ndash;
-kpresenter wrote inline images in a way itself could not understand.
-Eventually that bug was fixed and kpresenter ended up being a great
-program to make slides.  The point I&#39;m trying to make is that we
-expect a program to be able to load its own data files, and it is
-embarrassing to its developers if it can&#39;t.&lt;/p&gt;
-
-&lt;p&gt;Did you ever experience a program failing to load its own data
-files from the desktop file browser?  It is not a uncommon problem.  A
-while back I discovered that the screencast recorder
-gtk-recordmydesktop would save an Ogg Theora video file the KDE file
-browser would refuse to open.  No video player claimed to understand
-such file.  I tracked down the cause being &lt;tt&gt;file --mime-type&lt;/tt&gt;
-returning the application/ogg MIME type, which no video player I had
-installed listed as a MIME type they would understand.  I asked for
-&lt;a href=&quot;http://bugs.gw.com/view.php?id=382&quot;&gt;file to change its
-behavour&lt;/a&gt; and use the MIME type video/ogg instead.  I also asked
-several video players to add video/ogg to their desktop files, to give
-the file browser an idea what to do about Ogg Theora files.  After a
-while, the desktop file browsers in Debian started to handle the
-output from gtk-recordmydesktop properly.&lt;/p&gt;
-
-&lt;p&gt;But history repeats itself.  A few days ago I tested the music
-system Rosegarden again, and I discovered that the KDE and xfce file
-browsers did not know what to do with the Rosegarden project files
-(*.rg).  I&#39;ve reported &lt;a href=&quot;http://bugs.debian.org/825993&quot;&gt;the
-rosegarden problem to BTS&lt;/a&gt; and a fix is commited to git and will be
-included in the next upload.  To increase the chance of me remembering
-how to fix the problem next time some program fail to load its files
-from the file browser, here are some notes on how to fix it.&lt;/p&gt;
-
-&lt;p&gt;The file browsers in Debian in general operates on MIME types.
-There are two sources for the MIME type of a given file.  The output from
-&lt;tt&gt;file --mime-type&lt;/tt&gt; mentioned above, and the content of the
-shared MIME type registry (under /usr/share/mime/).  The file MIME
-type is mapped to programs supporting the MIME type, and this
-information is collected from
-&lt;a href=&quot;https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/&quot;&gt;the
-desktop files&lt;/a&gt; available in /usr/share/applications/.  If there is
-one desktop file claiming support for the MIME type of the file, it is
-activated when asking to open a given file.  If there are more, one
-can normally select which one to use by right-clicking on the file and
-selecting the wanted one using &#39;Open with&#39; or similar.  In general
-this work well.  But it depend on each program picking a good MIME
-type (preferably
-&lt;a href=&quot;http://www.iana.org/assignments/media-types/media-types.xhtml&quot;&gt;a
-MIME type registered with IANA&lt;/a&gt;), file and/or the shared MIME
-registry recognizing the file and the desktop file to list the MIME
-type in its list of supported MIME types.&lt;/p&gt;
-
-&lt;p&gt;The &lt;tt&gt;/usr/share/mime/packages/rosegarden.xml&lt;/tt&gt; entry for
-&lt;a href=&quot;http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec&quot;&gt;the
-Shared MIME database&lt;/a&gt; look like this:&lt;/p&gt;
+               <title>Automatic Google Drive sync using grive in Debian</title>
+               <link>http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</guid>
+                <pubDate>Thu, 4 Oct 2018 15:20:00 +0200</pubDate>
+               <description>&lt;p&gt;A few days, I rescued a Windows victim over to Debian.  To try to
+rescue the remains, I helped set up automatic sync with Google Drive.
+I did not find any sensible Debian package handling this
+automatically, so I rebuild the grive2 source from
+&lt;a href=&quot;http://www.webupd8.org/&quot;&gt;the Ubuntu UPD8 PPA&lt;/a&gt; to do the
+task and added a autostart desktop entry and a small shell script to
+run in the background while the user is logged in to do the sync.
+Here is a sketch of the setup for future reference.&lt;/p&gt;
+
+&lt;p&gt;I first created &lt;tt&gt;~/googledrive&lt;/tt&gt;, entered the directory and
+ran &#39;&lt;tt&gt;grive -a&lt;/tt&gt;&#39; to authenticate the machine/user.  Next, I
+created a autostart hook in &lt;tt&gt;~/.config/autostart/grive.desktop&lt;/tt&gt;
+to start the sync when the user log in:&lt;/p&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
-&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
-&amp;lt;mime-info xmlns=&quot;http://www.freedesktop.org/standards/shared-mime-info&quot;&amp;gt;
-  &amp;lt;mime-type type=&quot;audio/x-rosegarden&quot;&amp;gt;
-    &amp;lt;sub-class-of type=&quot;application/x-gzip&quot;/&amp;gt;
-    &amp;lt;comment&amp;gt;Rosegarden project file&amp;lt;/comment&amp;gt;
-    &amp;lt;glob pattern=&quot;*.rg&quot;/&amp;gt;
-  &amp;lt;/mime-type&amp;gt;
-&amp;lt;/mime-info&amp;gt;
+[Desktop Entry]
+Name=Google drive autosync
+Type=Application
+Exec=/home/user/bin/grive-sync
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
-&lt;p&gt;This states that audio/x-rosegarden is a kind of application/x-gzip
-(it is a gzipped XML file).  Note, it is much better to use an
-official MIME type registered with IANA than it is to make up ones own
-unofficial ones like the x-rosegarden type used by rosegarden.&lt;/p&gt;
-
-&lt;p&gt;The desktop file of the rosegarden program failed to list
-audio/x-rosegarden in its list of supported MIME types, causing the
-file browsers to have no idea what to do with *.rg files:&lt;/p&gt;
+&lt;p&gt;Finally, I wrote the &lt;tt&gt;~/bin/grive-sync&lt;/tt&gt; script to sync
+~/googledrive/ with the files in Google Drive.&lt;/p&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
-% grep Mime /usr/share/applications/rosegarden.desktop
-MimeType=audio/x-rosegarden-composition;audio/x-rosegarden-device;audio/x-rosegarden-project;audio/x-rosegarden-template;audio/midi;
-X-KDE-NativeMimeType=audio/x-rosegarden-composition
-%
+#!/bin/sh
+set -e
+cd ~/
+cleanup() {
+    if [ &quot;$syncpid&quot; ] ; then
+        kill $syncpid
+    fi
+}
+trap cleanup EXIT INT QUIT
+/usr/lib/grive/grive-sync.sh listen googledrive 2&gt;&amp;1 | sed &quot;s%^%$0:%&quot; &amp;
+syncpdi=$!
+while true; do
+    if ! xhost &gt;/dev/null 2&gt;&amp;1 ; then
+        echo &quot;no DISPLAY, exiting as the user probably logged out&quot;
+        exit 1
+    fi
+    if [ ! -e /run/user/1000/grive-sync.sh_googledrive ] ; then
+        /usr/lib/grive/grive-sync.sh sync googledrive
+    fi
+    sleep 300
+done 2&gt;&amp;1 | sed &quot;s%^%$0:%&quot;
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
-&lt;p&gt;The fix was to add &quot;audio/x-rosegarden;&quot; at the end of the
-MimeType= line.&lt;/p&gt;
+&lt;p&gt;Feel free to use the setup if you want.  It can be assumed to be
+GNU GPL v2 licensed (or any later version, at your leisure), but I
+doubt this code is possible to claim copyright on.&lt;/p&gt;
 
 
-&lt;p&gt;If you run into a file which fail to open the correct program when
-selected from the file browser, please check out the output from
-&lt;tt&gt;file --mime-type&lt;/tt&gt; for the file, ensure the file ending and
-MIME type is registered somewhere under /usr/share/mime/ and check
-that some desktop file under /usr/share/applications/ is claiming
-support for this MIME type.  If not, please report a bug to have it
-fixed. :)&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>
 </description>
        </item>
        
        <item>
-               <title>Tor - from its creators mouth 11 years ago</title>
-               <link>http://people.skolelinux.org/pere/blog/Tor___from_its_creators_mouth_11_years_ago.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Tor___from_its_creators_mouth_11_years_ago.html</guid>
-                <pubDate>Sat, 28 May 2016 14:20:00 +0200</pubDate>
-               <description>&lt;p&gt;A little more than 11 years ago, one of the creators of Tor, and
-the current President of &lt;a href=&quot;https://www.torproject.org/&quot;&gt;the Tor
-project&lt;/a&gt;, Roger Dingledine, gave a talk for the members of the
-&lt;a href=&quot;http://www.nuug.no/&quot;&gt;Norwegian Unix User group&lt;/a&gt; (NUUG).  A
-video of the talk was recorded, and today, thanks to the great help
-from David Noble, I finally was able to publish the video of the talk
-on Frikanalen, the Norwegian open channel TV station where NUUG
-currently publishes its talks.  You can
-&lt;a href=&quot;http://frikanalen.no/se&quot;&gt;watch the live stream using a web
-browser&lt;/a&gt; with WebM support, or check out the recording on the video
-on demand page for the talk
-&quot;&lt;a href=&quot;http://beta.frikanalen.no/video/625599&quot;&gt;Tor: Anonymous
-communication for the US Department of Defence...and you.&lt;/a&gt;&quot;.&lt;/p&gt;
-
-&lt;p&gt;Here is the video included for those of you using browsers with
-HTML video and Ogg Theora support:&lt;/p&gt;
-
-&lt;p&gt;&lt;video width=&quot;70%&quot; poster=&quot;http://simula.gunkies.org/media/625599/large_thumb/20050421-tor-frikanalen.jpg&quot; controls&gt;
-  &lt;source src=&quot;http://simula.gunkies.org/media/625599/theora/20050421-tor-frikanalen.ogv&quot; type=&quot;video/ogg&quot;/&gt;
-&lt;/video&gt;&lt;/p&gt;
-
-&lt;p&gt;I guess the gist of the talk can be summarised quite simply: If you
-want to help the military in USA (and everyone else), use Tor. :)&lt;/p&gt;
+               <title>Valutakrambod - A python and bitcoin love story</title>
+               <link>http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html</guid>
+                <pubDate>Sat, 29 Sep 2018 22:20:00 +0200</pubDate>
+               <description>&lt;p&gt;It would come as no surprise to anyone that I am interested in
+bitcoins and virtual currencies.  I&#39;ve been keeping an eye on virtual
+currencies for many years, and it is part of the reason a few months
+ago, I started writing a python library for collecting currency
+exchange rates and trade on virtual currency exchanges.  I decided to
+name the end result valutakrambod, which perhaps can be translated to
+small currency shop.&lt;/p&gt;
+
+&lt;p&gt;The library uses the tornado python library to handle HTTP and
+websocket connections, and provide a asynchronous system for
+connecting to and tracking several services.  The code is available
+from
+&lt;a href=&quot;http://github.com/petterreinholdtsen/valutakrambod&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;
+
+&lt;/p&gt;There are two example clients of the library.  One is very simple and
+list every updated buy/sell price received from the various services.
+This code is started by running bin/btc-rates and call the client code
+in valutakrambod/client.py.  The simple client look like this:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
+import functools
+import tornado.ioloop
+import valutakrambod
+class SimpleClient(object):
+    def __init__(self):
+        self.services = []
+        self.streams = []
+        pass
+    def newdata(self, service, pair, changed):
+        print(&quot;%-15s %s-%s: %8.3f %8.3f&quot; % (
+            service.servicename(),
+            pair[0],
+            pair[1],
+            service.rates[pair][&#39;ask&#39;],
+            service.rates[pair][&#39;bid&#39;])
+        )
+    async def refresh(self, service):
+        await service.fetchRates(service.wantedpairs)
+    def run(self):
+        self.ioloop = tornado.ioloop.IOLoop.current()
+        self.services = valutakrambod.service.knownServices()
+        for e in self.services:
+            service = e()
+            service.subscribe(self.newdata)
+            stream = service.websocket()
+            if stream:
+                self.streams.append(stream)
+            else:
+                # Fetch information from non-streaming services immediately
+                self.ioloop.call_later(len(self.services),
+                                       functools.partial(self.refresh, service))
+                # as well as regularly
+                service.periodicUpdate(60)
+        for stream in self.streams:
+            stream.connect()
+        try:
+            self.ioloop.start()
+        except KeyboardInterrupt:
+            print(&quot;Interrupted by keyboard, closing all connections.&quot;)
+            pass
+        for stream in self.streams:
+            stream.close()
+&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;The library client loops over all known &quot;public&quot; services,
+initialises it, subscribes to any updates from the service, checks and
+activates websocket streaming if the service provide it, and if no
+streaming is supported, fetches information from the service and sets
+up a periodic update every 60 seconds.  The output from this client
+can look like this:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
+Bl3p            BTC-EUR: 5687.110 5653.690
+Bl3p            BTC-EUR: 5687.110 5653.690
+Bl3p            BTC-EUR: 5687.110 5653.690
+Hitbtc          BTC-USD: 6594.560 6593.690
+Hitbtc          BTC-USD: 6594.560 6593.690
+Bl3p            BTC-EUR: 5687.110 5653.690
+Hitbtc          BTC-USD: 6594.570 6593.690
+Bitstamp        EUR-USD:    1.159    1.154
+Hitbtc          BTC-USD: 6594.570 6593.690
+Hitbtc          BTC-USD: 6594.580 6593.690
+Hitbtc          BTC-USD: 6594.580 6593.690
+Hitbtc          BTC-USD: 6594.580 6593.690
+Bl3p            BTC-EUR: 5687.110 5653.690
+Paymium         BTC-EUR: 5680.000 5620.240
+&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;The exchange order book is tracked in addition to the best buy/sell
+price, for those that need to know the details.&lt;/p&gt;
+
+&lt;p&gt;The other example client is focusing on providing a curses view
+with updated buy/sell prices as soon as they are received from the
+services.  This code is located in bin/btc-rates-curses and activated
+by using the &#39;-c&#39; argument.  Without the argument the &quot;curses&quot; output
+is printed without using curses, which is useful for debugging.  The
+curses view look like this:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
+           Name Pair   Bid         Ask         Spr    Ftcd    Age
+ BitcoinsNorway BTCEUR   5591.8400   5711.0800   2.1%   16    nan     60
+       Bitfinex BTCEUR   5671.0000   5671.2000   0.0%   16     22     59
+        Bitmynt BTCEUR   5580.8000   5807.5200   3.9%   16     41     60
+         Bitpay BTCEUR   5663.2700         nan   nan%   15    nan     60
+       Bitstamp BTCEUR   5664.8400   5676.5300   0.2%    0      1      1
+           Bl3p BTCEUR   5653.6900   5684.9400   0.5%    0    nan     19
+       Coinbase BTCEUR   5600.8200   5714.9000   2.0%   15    nan    nan
+         Kraken BTCEUR   5670.1000   5670.2000   0.0%   14     17     60
+        Paymium BTCEUR   5620.0600   5680.0000   1.1%    1   7515    nan
+ BitcoinsNorway BTCNOK  52898.9700  54034.6100   2.1%   16    nan     60
+        Bitmynt BTCNOK  52960.3200  54031.1900   2.0%   16     41     60
+         Bitpay BTCNOK  53477.7833         nan   nan%   16    nan     60
+       Coinbase BTCNOK  52990.3500  54063.0600   2.0%   15    nan    nan
+        MiraiEx BTCNOK  52856.5300  54100.6000   2.3%   16    nan    nan
+ BitcoinsNorway BTCUSD   6495.5300   6631.5400   2.1%   16    nan     60
+       Bitfinex BTCUSD   6590.6000   6590.7000   0.0%   16     23     57
+         Bitpay BTCUSD   6564.1300         nan   nan%   15    nan     60
+       Bitstamp BTCUSD   6561.1400   6565.6200   0.1%    0      2      1
+       Coinbase BTCUSD   6504.0600   6635.9700   2.0%   14    nan    117
+         Gemini BTCUSD   6567.1300   6573.0700   0.1%   16     89    nan
+         Hitbtc+BTCUSD   6592.6200   6594.2100   0.0%    0      0      0
+         Kraken BTCUSD   6565.2000   6570.9000   0.1%   15     17     58
+  Exchangerates EURNOK      9.4665      9.4665   0.0%   16 107789    nan
+     Norgesbank EURNOK      9.4665      9.4665   0.0%   16 107789    nan
+       Bitstamp EURUSD      1.1537      1.1593   0.5%    4      5      1
+  Exchangerates EURUSD      1.1576      1.1576   0.0%   16 107789    nan
+ BitcoinsNorway LTCEUR      1.0000     49.0000  98.0%   16    nan    nan
+ BitcoinsNorway LTCNOK    492.4800    503.7500   2.2%   16    nan     60
+ BitcoinsNorway LTCUSD      1.0221     49.0000  97.9%   15    nan    nan
+     Norgesbank USDNOK      8.1777      8.1777   0.0%   16 107789    nan
+&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;The code for this client is too complex for a simple blog post, so
+you will have to check out the git repository to figure out how it
+work.  What I can tell is how the three last numbers on each line
+should be interpreted.  The first is how many seconds ago information
+was received from the service.  The second is how long ago, according
+to the service, the provided information was updated.  The last is an
+estimate on how often the buy/sell values change.&lt;/p&gt;
+
+&lt;p&gt;If you find this library useful, or would like to improve it, I
+would love to hear from you.  Note that for some of the services I&#39;ve
+implemented a trading API.  It might be the topic of a future blog
+post.&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>
 </description>
        </item>
        
        <item>
-               <title>Isenkram with PackageKit support - new version 0.23 available in Debian unstable</title>
-               <link>http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</guid>
-                <pubDate>Wed, 25 May 2016 10:20:00 +0200</pubDate>
-               <description>&lt;p&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;The isenkram
-system&lt;/a&gt; is a user-focused solution in Debian for handling hardware
-related packages.  The idea is to have a database of mappings between
-hardware and packages, and pop up a dialog suggesting for the user to
-install the packages to use a given hardware dongle.  Some use cases
-are when you insert a Yubikey, it proposes to install the software
-needed to control it; when you insert a braille reader list it
-proposes to install the packages needed to send text to the reader;
-and when you insert a ColorHug screen calibrator it suggests to
-install the driver for it.  The system work well, and even have a few
-command line tools to install firmware packages and packages for the
-hardware already in the machine (as opposed to hotpluggable hardware).&lt;/p&gt;
-
-&lt;p&gt;The system was initially written using aptdaemon, because I found
-good documentation and example code on how to use it.  But aptdaemon
-is going away and is generally being replaced by
-&lt;a href=&quot;http://www.freedesktop.org/software/PackageKit/&quot;&gt;PackageKit&lt;/a&gt;,
-so Isenkram needed a rewrite.  And today, thanks to the great patch
-from my college Sunil Mohan Adapa in the FreedomBox project, the
-rewrite finally took place.  I&#39;ve just uploaded a new version of
-Isenkram into Debian Unstable with the patch included, and the default
-for the background daemon is now to use PackageKit.  To check it out,
-install the &lt;tt&gt;isenkram&lt;/tt&gt; package and insert some hardware dongle
-and see if it is recognised.&lt;/p&gt;
-
-&lt;p&gt;If you want to know what kind of packages isenkram would propose for
-the machine it is running on, you can check out the isenkram-lookup
-program.  This is what it look like on a Thinkpad X230:&lt;/p&gt;
+               <title>VLC in Debian now can do bittorrent streaming</title>
+               <link>http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html</guid>
+                <pubDate>Mon, 24 Sep 2018 21:20:00 +0200</pubDate>
+               <description>&lt;p&gt;Back in February, I got curious to see
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Using_VLC_to_stream_bittorrent_sources.html&quot;&gt;if
+VLC now supported Bittorrent streaming&lt;/a&gt;.  It did not, despite the
+fact that the idea and code to handle such streaming had been floating
+around for years.  I did however find
+&lt;a href=&quot;https://github.com/johang/vlc-bittorrent&quot;&gt;a standalone plugin
+for VLC&lt;/a&gt; to do it, and half a year later I decided to wrap up the
+plugin and get it into Debian.  I uploaded it to NEW a few days ago,
+and am very happy to report that it
+&lt;a href=&quot;https://tracker.debian.org/pkg/vlc-plugin-bittorrent&quot;&gt;entered
+Debian&lt;/a&gt; a few hours ago, and should be available in Debian/Unstable
+tomorrow, and Debian/Testing in a few days.&lt;/p&gt;
+
+&lt;p&gt;With the vlc-plugin-bittorrent package installed you should be able
+to stream videos using a simple call to&lt;/p&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
 
 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
-% isenkram-lookup 
-bluez
-cheese
-fprintd
-fprintd-demo
-gkrellm-thinkbat
-hdapsd
-libpam-fprintd
-pidgin-blinklight
-thinkfan
-tleds
-tp-smapi-dkms
-tp-smapi-source
-tpb
-%p
+vlc https://archive.org/download/TheGoat/TheGoat_archive.torrent
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
 
-&lt;p&gt;The hardware mappings come from several places.  The preferred way
-is for packages to announce their hardware support using
-&lt;a href=&quot;https://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
-cross distribution appstream system&lt;/a&gt;.
-See
-&lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;previous
-blog posts about isenkram&lt;/a&gt; to learn how to do that.&lt;/p&gt;
+&lt;/p&gt;It can handle magnet links too.  Now if only native vlc had
+bittorrent support.  Then a lot more would be helping each other to
+share public domain and creative commons movies.  The plugin need some
+stability work with seeking and picking the right file in a torrent
+with many files, but is already usable.  Please note that the plugin
+is not removing downloaded files when vlc is stopped, so it can fill
+up your disk if you are not careful.  Have fun. :)&lt;/p&gt;
+
+&lt;p&gt;I would love to get help maintaining this package.  Get in touch if
+you are interested.&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>
 </description>
        </item>
        
        <item>
-               <title>Discharge rate estimate in new battery statistics collector for Debian</title>
-               <link>http://people.skolelinux.org/pere/blog/Discharge_rate_estimate_in_new_battery_statistics_collector_for_Debian.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Discharge_rate_estimate_in_new_battery_statistics_collector_for_Debian.html</guid>
-                <pubDate>Mon, 23 May 2016 09:35:00 +0200</pubDate>
-               <description>&lt;p&gt;Yesterday I updated the
-&lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;battery-stats
-package in Debian&lt;/a&gt; with a few patches sent to me by skilled and
-enterprising users.  There were some nice user and visible changes.
-First of all, both desktop menu entries now work.  A design flaw in
-one of the script made the history graph fail to show up (its PNG was
-dumped in ~/.xsession-errors) if no controlling TTY was available.
-The script worked when called from the command line, but not when
-called from the desktop menu.  I changed this to look for a DISPLAY
-variable or a TTY before deciding where to draw the graph, and now the
-graph window pop up as expected.&lt;/p&gt;
-
-&lt;p&gt;The next new feature is a discharge rate estimator in one of the
-graphs (the one showing the last few hours).  New is also the user of
-colours showing charging in blue and discharge in red.  The percentages
-of this graph is relative to last full charge, not battery design
-capacity.&lt;/p&gt;
-
-&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2016-05-23-battery-stats-rate.png&quot;/&gt;&lt;/p&gt;
-
-&lt;p&gt;The other graph show the entire history of the collected battery
-statistics, comparing it to the design capacity of the battery to
-visualise how the battery life time get shorter over time.  The red
-line in this graph is what the previous graph considers 100 percent:
-
-&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2016-05-23-battery-stats-history.png&quot;/&gt;&lt;/p&gt;
-
-&lt;p&gt;In this graph you can see that I only charge the battery to 80
-percent of last full capacity, and how the capacity of the battery is
-shrinking. :(&lt;/p&gt;
-
-&lt;p&gt;The last new feature is in the collector, which now will handle
-more hardware models.  On some hardware, Linux power supply
-information is stored in /sys/class/power_supply/ACAD/, while the
-collector previously only looked in /sys/class/power_supply/AC/.  Now
-both are checked to figure if there is power connected to the
-machine.&lt;/p&gt;
-
-&lt;p&gt;If you are interested in how your laptop battery is doing, please
-check out the
-&lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;battery-stats&lt;/a&gt;
-in Debian unstable, or rebuild it on Jessie to get it working on
-Debian stable. :) The upstream source is available from &lt;a
-href=&quot;https://github.com/petterreinholdtsen/battery-stats&quot;&gt;github&lt;/a&gt;.
-Patches are very welcome.&lt;/p&gt;
+               <title>Using the Kodi API to play Youtube videos</title>
+               <link>http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html</guid>
+                <pubDate>Sun, 2 Sep 2018 23:40:00 +0200</pubDate>
+               <description>&lt;p&gt;I continue to explore my Kodi installation, and today I wanted to
+tell it to play a youtube URL I received in a chat, without having to
+insert search terms using the on-screen keyboard.  After searching the
+web for API access to the Youtube plugin and testing a bit, I managed
+to find a recipe that worked.  If you got a kodi instance with its API
+available from http://kodihost/jsonrpc, you can try the following to
+have check out a nice cover band.&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;curl --silent --header &#39;Content-Type: application/json&#39; \
+  --data-binary &#39;{ &quot;id&quot;: 1, &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;Player.Open&quot;,
+  &quot;params&quot;: {&quot;item&quot;: { &quot;file&quot;:
+  &quot;plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg&quot; } } }&#39; \
+  http://projector.local/jsonrpc&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;I&#39;ve extended kodi-stream program to take a video source as its
+first argument.  It can now handle direct video links, youtube links
+and &#39;desktop&#39; to stream my desktop to Kodi.  It is almost like a
+Chromecast. :)&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;p&gt;As usual, if you use Bitcoin and want to show your support of my
 activities, please send Bitcoin donations to my address
@@ -270,204 +298,430 @@ activities, please send Bitcoin donations to my address
        </item>
        
        <item>
        </item>
        
        <item>
-               <title>French edition of Lawrence Lessigs book Cultura Libre on Amazon and Barnes &amp; Noble</title>
-               <link>http://people.skolelinux.org/pere/blog/French_edition_of_Lawrence_Lessigs_book_Cultura_Libre_on_Amazon_and_Barnes___Noble.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/French_edition_of_Lawrence_Lessigs_book_Cultura_Libre_on_Amazon_and_Barnes___Noble.html</guid>
-                <pubDate>Sat, 21 May 2016 10:50:00 +0200</pubDate>
-               <description>&lt;p&gt;A few weeks ago the French paperback edition of Lawrence Lessigs
-2004 book Cultura Libre was published.  Today I noticed that the book
-is now available from book stores.  You can now buy it from
-&lt;a href=&quot;http://www.amazon.com/Culture-Libre-French-Lawrence-Lessig/dp/8269018260&quot;&gt;Amazon&lt;/a&gt;
-($19.99),
-&lt;a href=&quot;http://www.barnesandnoble.com/w/culture-libre-lawrence-lessig/1123776705&quot;&gt;Barnes
-&amp; Noble&lt;/a&gt; ($?) and as always from
-&lt;a href=&quot;http://www.lulu.com/shop/lawrence-lessig/culture-libre/paperback/product-22645082.html&quot;&gt;Lulu.com&lt;/a&gt;
-($19.99).  The revenue is donated to the Creative Commons project.  If
-you buy from Lulu.com, they currently get $10.59, while if you buy
-from one of the book stores most of the revenue go to the book store
-and the Creative Commons project get much (not sure how much
-less).&lt;/p&gt;
-
-&lt;p&gt;I was a bit surprised to discover that there is a kindle edition
-sold by Amazon Digital Services LLC on Amazon.  Not quite sure how
-that edition was created, but if you want to download a electronic
-edition (PDF, EPUB, Mobi) generated from the same files used to create
-the paperback edition, they are
-&lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig&quot;&gt;available
-from github&lt;/a&gt;.&lt;/p&gt;
+               <title>Software created using taxpayers’ money should be Free Software</title>
+               <link>http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html</guid>
+                <pubDate>Thu, 30 Aug 2018 13:50:00 +0200</pubDate>
+               <description>&lt;p&gt;It might seem obvious that software created using tax money should
+be available for everyone to use and improve.  Free Software
+Foundation Europe recentlystarted a campaign to help get more people
+to understand this, and I just signed the petition on
+&lt;a href=&quot;https://publiccode.eu/&quot;&gt;Public Money, Public Code&lt;/a&gt; to help
+them. I hope you too will do the same.&lt;/p&gt;
 </description>
        </item>
        
        <item>
 </description>
        </item>
        
        <item>
-               <title>I want the courts to be involved before the police can hijack a news site DNS domain (#domstolkontroll)</title>
-               <link>http://people.skolelinux.org/pere/blog/I_want_the_courts_to_be_involved_before_the_police_can_hijack_a_news_site_DNS_domain___domstolkontroll_.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/I_want_the_courts_to_be_involved_before_the_police_can_hijack_a_news_site_DNS_domain___domstolkontroll_.html</guid>
-                <pubDate>Thu, 19 May 2016 14:00:00 +0200</pubDate>
-               <description>&lt;p&gt;I just donated to the
-&lt;a href=&quot;http://www.nuug.no/dns-beslag-donasjon.shtml&quot;&gt;NUUG defence
-&quot;fond&quot;&lt;/a&gt; to fund the effort in Norway to get the seizure of the news
-site popcorn-time.no tested in court.  I hope everyone that agree with
-me will do the same.&lt;/p&gt;
-
-&lt;p&gt;Would you be worried if you knew the police in your country could
-hijack DNS domains of news sites covering free software system without
-talking to a judge first?  I am.  What if the free software system
-combined search engine lookups, bittorrent downloads and video playout
-and was called Popcorn Time?  Would that affect your view?  It still
-make me worried.&lt;/p&gt;
-
-&lt;p&gt;In March 2016, the Norwegian police seized (as in forced NORID to
-change the IP address pointed to by it to one controlled by the
-police) the DNS domain popcorn-time.no, without any supervision from
-the courts.  I did not know about the web site back then, and assumed
-the courts had been involved, and was very surprised when I discovered
-that the police had hijacked the DNS domain without asking a judge for
-permission first.  I was even more surprised when I had a look at
-&lt;a href=&quot;https://web.archive.org/web/*/http://popcorn-time.no&quot;&gt;the web
-site content on the Internet Archive&lt;/A&gt;, and only found news coverage
-about Popcorn Time, not any material published without the right
-holders permissions.&lt;/p&gt;
-
-&lt;p&gt;The seizure was widely covered in the Norwegian press (see for
-example &lt;a href=&quot;http://www.hegnar.no/Nyheter/Naeringsliv/2016/03/Popcorn-time.no-beslaglagt-av-OEkokrim&quot;&gt;Hegnar Online&lt;/a&gt; and
-&lt;a href=&quot;http://itavisen.no/2016/03/08/okokrim-har-beslaglagt-popcorn-time-no/&quot;&gt;ITavisen&lt;a/&gt;
-and
-&lt;a href=&quot;http://www.nrk.no/kultur/okokrim-gar-til-aksjon-mot-popcorn-time-1.12842452&quot;&gt;NRK&lt;/a&gt;),
-at first due to the press release sent out by Ã˜kokrim, but then based
-on
-&lt;a href=&quot;http://blogg.torvund.net/2016/03/09/okokrims-beslag-i-domenet-popcorn-time-no/&quot;&gt;protests
-from the law professor Olav Torvund&lt;/a&gt; and
-&lt;a href=&quot;http://www.klassekampen.no/article/20160311/ARTICLE/160319995&quot;&gt;lawyer
-Jon Wessel-Aas&lt;/a&gt;.  It even got some
-&lt;a href=&quot;https://torrentfreak.com/norwegian-authorities-sued-over-popcorn-time-domain-seizure-160418/&quot;&gt;coverage
-on TorrentFreak&lt;/a&gt;.&lt;/p&gt;
-
-&lt;p&gt;I
-&lt;a href=&quot;http://people.skolelinux.org/pere/blog/NUUG_contests_Norwegian_police_DNS_seizure_of_popcorn_time_no.html&quot;&gt;
-wrote about the case a month ago&lt;/a&gt;, when the
-&lt;a href=&quot;http://www.nuug.no/&quot;&gt;Norwegian Unix User Group&lt;/a&gt; (NUUG),
-where I am an active member, decided to ask the courts to test this seizure.
-The request was denied, but NUUG and its co-requestor EFN have not
-given up, and now they are rallying for support to get the seizure
-legally challenged.  They accept both bank and Bitcoin transfer for
-those that want to support the request.&lt;/p&gt;
-
-&lt;p&gt;If you as me believe news sites about free software should not be
-censored, even if the free software have both legal and illegal
-applications, and that DNS hijacking should be tested by the courts, I
-suggest you &lt;a href=&quot;http://www.nuug.no/dns-beslag-donasjon.shtml&quot;&gt;show
-your support by donating to NUUG&lt;/a&gt;.&lt;/a&gt;
+               <title>A bit more on privacy respecting health monitor / fitness tracker</title>
+               <link>http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html</guid>
+                <pubDate>Mon, 13 Aug 2018 09:00:00 +0200</pubDate>
+               <description>&lt;p&gt;A few days ago, I wondered if there are any privacy respecting
+health monitors and/or fitness trackers available for sale these days.
+I would like to buy one, but do not want to share my personal data
+with strangers, nor be forced to have a mobile phone to get data out
+of the unit.  I&#39;ve received some ideas, and would like to share them
+with you.
+
+One interesting data point was a pointer to a Free Software app for
+Android named
+&lt;a href=&quot;https://github.com/Freeyourgadget/Gadgetbridge/&quot;&gt;Gadgetbridge&lt;/a&gt;.
+It provide cloudless collection and storing of data from a variety of
+trackers.  Its
+&lt;a href=&quot;https://github.com/Freeyourgadget/Gadgetbridge/#supported-devices&quot;&gt;list
+of supported devices&lt;/a&gt; is a good indicator for units where the
+protocol is fairly open, as it is obviously being handled by Free
+Software.  Other units are reportedly encrypting the collected
+information with their own public key, making sure only the vendor
+cloud service is able to extract data from the unit.  The people
+contacting me about Gadgetbirde said they were using
+&lt;a href=&quot;https://us.amazfit.com/shop/bip?variant=336750&quot;&gt;Amazfit
+Bip&lt;/a&gt; and
+&lt;a href=&quot;http://www.xiaomimi6phone.com/xiaomi-mi-band-3-features-release-date-rumors/&quot;&gt;Xiaomi
+Band 3&lt;/a&gt;.&lt;/p&gt;
+
+&lt;p&gt;I also got a suggestion to look at some of the units from Garmin.
+I was told their GPS watches can be connected via USB and show up as a
+USB storage device with
+&lt;a href=&quot;https://www.gpsbabel.org/htmldoc-development/fmt_garmin_fit.html&quot;&gt;Garmin
+FIT files&lt;/a&gt; containing the collected measurements.  While
+proprietary, FIT files apparently can be read at least by
+&lt;a href=&quot;https://www.gpsbabel.org&quot;&gt;GPSBabel&lt;/a&gt; and the
+&lt;a href=&quot;https://apps.nextcloud.com/apps/gpxpod&quot;&gt;GpxPod&lt;/a&gt; Nextcloud
+app.  It is unclear to me if they can read step count and heart rate
+data.  The person I talked to was using a
+&lt;a href=&quot;https://buy.garmin.com/en-US/US/p/564291&quot;&gt;Garmin Forerunner
+935&lt;/a&gt;, which is a fairly expensive unit.  I doubt it is worth it for
+a unit where the vendor clearly is trying its best to move from open
+to closed systems.  I still remember when Garmin dropped NMEA support
+in its GPSes.&lt;/p&gt;
+
+&lt;p&gt;A final idea was to build ones own unit, perhaps by basing it on a
+wearable hardware platforms like
+&lt;a href=&quot;https://learn.adafruit.com/flora-geo-watch&quot;&gt;the Flora Geo
+Watch&lt;/a&gt;.  Sound like fun, but I had more money than time to spend on
+the topic, so I suspect it will have to wait for another time.&lt;/p&gt;
+
+&lt;p&gt;While I was working on tracking down links, I came across an
+inspiring TED talk by Dave Debronkart about
+&lt;a href=&quot;https://archive.org/details/DavedeBronkart_2010X&quot;&gt;being a
+e-patient&lt;/a&gt;, and discovered the web site
+&lt;a href=&quot;https://participatorymedicine.org/epatients/&quot;&gt;Participatory
+Medicine&lt;/a&gt;.  If you too want to track your own health and fitness
+without having information about your private life floating around on
+computers owned by others, I recommend checking 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;
 </description>
        </item>
        
        <item>
 </description>
        </item>
        
        <item>
-               <title>Debian now with ZFS on Linux included</title>
-               <link>http://people.skolelinux.org/pere/blog/Debian_now_with_ZFS_on_Linux_included.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Debian_now_with_ZFS_on_Linux_included.html</guid>
-                <pubDate>Thu, 12 May 2016 07:30:00 +0200</pubDate>
-               <description>&lt;p&gt;Today, after many years of hard work from many people,
-&lt;a href=&quot;http://zfsonlinux.org/&quot;&gt;ZFS for Linux&lt;/a&gt; finally entered
-Debian.  The package status can be seen on
-&lt;a href=&quot;https://tracker.debian.org/pkg/zfs-linux&quot;&gt;the package tracker
-for zfs-linux&lt;/a&gt;.  and
-&lt;a href=&quot;https://qa.debian.org/developer.php?login=pkg-zfsonlinux-devel@lists.alioth.debian.org&quot;&gt;the
-team status page&lt;/a&gt;. If you want to help out, please join us.
-&lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/zfs.git&quot;&gt;The
-source code&lt;/a&gt; is available via git on Alioth.  It would also be
-great if you could help out with
-&lt;a href=&quot;https://tracker.debian.org/pkg/dkms&quot;&gt;the dkms package&lt;/a&gt;, as
-it is an important piece of the puzzle to get ZFS working.&lt;/p&gt;
+               <title>Privacy respecting health monitor / fitness tracker?</title>
+               <link>http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html</guid>
+                <pubDate>Tue, 7 Aug 2018 16:00:00 +0200</pubDate>
+               <description>&lt;p&gt;Dear lazyweb,&lt;/p&gt;
+
+&lt;p&gt;I wonder, is there a fitness tracker / health monitor available for
+sale today that respect the users privacy?  With this I mean a
+watch/bracelet capable of measuring pulse rate and other
+fitness/health related values (and by all means, also the correct time
+and location if possible), which is &lt;strong&gt;only&lt;/strong&gt; provided for
+me to extract/read from the unit with computer without a radio beacon
+and Internet connection.  In other words, it do not depend on a cell
+phone app, and do make the measurements available via other peoples
+computer (aka &quot;the cloud&quot;).  The collected data should be available
+using only free software.  I&#39;m not interested in depending on some
+non-free software that will leave me high and dry some time in the
+future.  I&#39;ve been unable to find any such unit.  I would like to buy
+it.  The ones I have seen for sale here in Norway are proud to report
+that they share my health data with strangers (aka &quot;cloud enabled&quot;).
+Is there an alternative?  I&#39;m not interested in giving money to people
+requiring me to accept &quot;privacy terms&quot; to allow myself to measure my
+own health.&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>
 </description>
        </item>
        
        <item>
-               <title>What is the best multimedia player in Debian?</title>
-               <link>http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html</guid>
-                <pubDate>Sun, 8 May 2016 09:40:00 +0200</pubDate>
-               <description>&lt;p&gt;&lt;strong&gt;Where I set out to figure out which multimedia player in
-Debian claim support for most file formats.&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;A few years ago, I had a look at the media support for Browser
-plugins in Debian, to get an idea which plugins to include in Debian
-Edu.  I created a script to extract the set of supported MIME types
-for each plugin, and used this to find out which multimedia browser
-plugin supported most file formats / media types.
-&lt;a href=&quot;https://wiki.debian.org/DebianEdu/BrowserMultimedia&quot;&gt;The
-result&lt;/a&gt; can still be seen on the Debian wiki, even though it have
-not been updated for a while.  But browser plugins are less relevant
-these days, so I thought it was time to look at standalone
-players.&lt;/p&gt;
-
-&lt;p&gt;A few days ago I was tired of VLC not being listed as a viable
-player when I wanted to play videos from the Norwegian National
-Broadcasting Company, and decided to investigate why.  The cause is a
-&lt;a href=&quot;https://bugs.debian.org/822245&quot;&gt;missing MIME type in the VLC
-desktop file&lt;/a&gt;.  In the process I wrote a script to compare the set
-of MIME types announced in the desktop file and the browser plugin,
-only to discover that there is quite a large difference between the
-two for VLC.  This discovery made me dig up the script I used to
-compare browser plugins, and adjust it to compare desktop files
-instead, to try to figure out which multimedia player in Debian
-support most file formats.&lt;/p&gt;
-
-&lt;p&gt;The result can be seen on the Debian Wiki, as
-&lt;a href=&quot;https://wiki.debian.org/DebianMultimedia/PlayerSupport&quot;&gt;a
-table listing all MIME types supported by one of the packages included
-in the table&lt;/a&gt;, with the package supporting most MIME types being
-listed first in the table.&lt;/p&gt;
-
-&lt;/p&gt;The best multimedia player in Debian?  It is totem, followed by
-parole, kplayer, mpv, vlc, smplayer mplayer-gui gnome-mpv and
-kmplayer.  Time for the other players to update their announced MIME
-support?&lt;/p&gt;
+               <title>Sharing images with friends and family using RSS and EXIF/XMP metadata</title>
+               <link>http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html</guid>
+                <pubDate>Tue, 31 Jul 2018 23:30:00 +0200</pubDate>
+               <description>&lt;p&gt;For a while now, I have looked for a sensible way to share images
+with my family using a self hosted solution, as it is unacceptable to
+place images from my personal life under the control of strangers
+working for data hoarders like Google or Dropbox.  The last few days I
+have drafted an approach that might work out, and I would like to
+share it with you.  I would like to publish images on a server under
+my control, and point some Internet connected display units using some
+free and open standard to the images I published.  As my primary
+language is not limited to ASCII, I need to store metadata using
+UTF-8.  Many years ago, I hoped to find a digital photo frame capable
+of reading a RSS feed with image references (aka using the
+&amp;lt;enclosure&amp;gt; RSS tag), but was unable to find a current supplier
+of such frames.  In the end I gave up that approach.&lt;/p&gt;
+
+&lt;p&gt;Some months ago, I discovered that
+&lt;a href=&quot;https://www.jwz.org/xscreensaver/&quot;&gt;XScreensaver&lt;/a&gt; is able to
+read images from a RSS feed, and used it to set up a screen saver on
+my home info screen, showing images from the Daily images feed from
+NASA.  This proved to work well.  More recently I discovered that
+&lt;a href=&quot;https://kodi.tv&quot;&gt;Kodi&lt;/a&gt; (both using
+&lt;a href=&quot;https://www.openelec.tv/&quot;&gt;OpenELEC&lt;/a&gt; and
+&lt;a href=&quot;https://libreelec.tv&quot;&gt;LibreELEC&lt;/a&gt;) provide the
+&lt;a href=&quot;https://github.com/grinsted/script.screensaver.feedreader&quot;&gt;Feedreader&lt;/a&gt;
+screen saver capable of reading a RSS feed with images and news.  For
+fun, I used it this summer to test Kodi on my parents TV by hooking up
+a Raspberry PI unit with LibreELEC, and wanted to provide them with a
+screen saver showing selected pictures from my selection.&lt;/p&gt;
+
+&lt;p&gt;Armed with motivation and a test photo frame, I set out to generate
+a RSS feed for the Kodi instance.  I adjusted my &lt;a
+href=&quot;https://freedombox.org/&quot;&gt;Freedombox&lt;/a&gt; instance, created
+/var/www/html/privatepictures/, wrote a small Perl script to extract
+title and description metadata from the photo files and generate the
+RSS file.  I ended up using Perl instead of python, as the
+libimage-exiftool-perl Debian package seemed to handle the EXIF/XMP
+tags I ended up using, while python3-exif did not.  The relevant EXIF
+tags only support ASCII, so I had to find better alternatives.  XMP
+seem to have the support I need.&lt;/p&gt;
+
+&lt;p&gt;I am a bit unsure which EXIF/XMP tags to use, as I would like to
+use tags that can be easily added/updated using normal free software
+photo managing software.  I ended up using the tags set using this
+exiftool command, as these tags can also be set using digiKam:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+exiftool -headline=&#39;The RSS image title&#39; \
+  -description=&#39;The RSS image description.&#39; \
+  -subject+=for-family photo.jpeg
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;I initially tried the &quot;-title&quot; and &quot;keyword&quot; tags, but they were
+invisible in digiKam, so I changed to &quot;-headline&quot; and &quot;-subject&quot;.  I
+use the keyword/subject &#39;for-family&#39; to flag that the photo should be
+shared with my family.  Images with this keyword set are located and
+copied into my Freedombox for the RSS generating script to find.&lt;/p&gt;
+
+&lt;p&gt;Are there better ways to do this?  Get in touch if you have better
+suggestions.&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>
 </description>
        </item>
        
        <item>
-               <title>The Pyra - handheld computer with Debian preinstalled</title>
-               <link>http://people.skolelinux.org/pere/blog/The_Pyra___handheld_computer_with_Debian_preinstalled.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/The_Pyra___handheld_computer_with_Debian_preinstalled.html</guid>
-                <pubDate>Wed, 4 May 2016 10:00:00 +0200</pubDate>
-               <description>A friend of mine made me aware of
-&lt;a href=&quot;https://pyra-handheld.com/boards/pages/pyra/&quot;&gt;The Pyra&lt;/a&gt;, a
-handheld computer which will be delivered with Debian preinstalled.  I
-would love to get one of those for my birthday. :)&lt;/p&gt;
-
-&lt;p&gt;The machine is a complete ARM-based PC with micro HDMI, SATA, USB
-plugs and many others connectors, and include a full keyboard and a 5&quot;
-LCD touch screen.  The 6000mAh battery is claimed to provide a whole
-day of battery life time, but I have not seen any independent tests
-confirming this.  The vendor is still collecting preorders, and the
-last I heard last night was that 22 more orders were needed before
-production started.&lt;/p&gt;
-
-&lt;p&gt;As far as I know, this is the first handheld preinstalled with
-Debian.  Please let me know if you know of any others.  Is it the
-first computer being sold with Debian preinstalled?&lt;/p&gt;
+               <title>Simple streaming the Linux desktop to Kodi using GStreamer and RTP</title>
+               <link>http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html</guid>
+                <pubDate>Thu, 12 Jul 2018 17:55:00 +0200</pubDate>
+               <description>&lt;p&gt;Last night, I wrote
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html&quot;&gt;a
+recipe to stream a Linux desktop using VLC to a instance of Kodi&lt;/a&gt;.
+During the day I received valuable feedback, and thanks to the
+suggestions I have been able to rewrite the recipe into a much simpler
+approach requiring no setup at all.  It is a single script that take
+care of it all.&lt;/p&gt;
+
+&lt;p&gt;This new script uses GStreamer instead of VLC to capture the
+desktop and stream it to Kodi.  This fixed the video quality issue I
+saw initially.  It further removes the need to add a m3u file on the
+Kodi machine, as it instead connects to
+&lt;a href=&quot;https://kodi.wiki/view/JSON-RPC_API/v8&quot;&gt;the JSON-RPC API in
+Kodi&lt;/a&gt; and simply ask Kodi to play from the stream created using
+GStreamer.  Streaming the desktop to Kodi now become trivial.  Copy
+the script below, run it with the DNS name or IP address of the kodi
+server to stream to as the only argument, and watch your screen show
+up on the Kodi screen.  Note, it depend on multicast on the local
+network, so if you need to stream outside the local network, the
+script must be modified.  Also note, I have no idea if audio work, as
+I only care about the picture part.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+#!/bin/sh
+#
+# Stream the Linux desktop view to Kodi.  See
+# http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
+# for backgorund information.
+
+# Make sure the stream is stopped in Kodi and the gstreamer process is
+# killed if something go wrong (for example if curl is unable to find the
+# kodi server).  Do the same when interrupting this script.
+kodicmd() {
+    host=&quot;$1&quot;
+    cmd=&quot;$2&quot;
+    params=&quot;$3&quot;
+    curl --silent --header &#39;Content-Type: application/json&#39; \
+        --data-binary &quot;{ \&quot;id\&quot;: 1, \&quot;jsonrpc\&quot;: \&quot;2.0\&quot;, \&quot;method\&quot;: \&quot;$cmd\&quot;, \&quot;params\&quot;: $params }&quot; \
+        &quot;http://$host/jsonrpc&quot;
+}
+cleanup() {
+    if [ -n &quot;$kodihost&quot; ] ; then
+       # Stop the playing when we end
+       playerid=$(kodicmd &quot;$kodihost&quot; Player.GetActivePlayers &quot;{}&quot; |
+                           jq .result[].playerid)
+       kodicmd &quot;$kodihost&quot; Player.Stop &quot;{ \&quot;playerid\&quot; : $playerid }&quot; &gt; /dev/null
+    fi
+    if [ &quot;$gstpid&quot; ] &amp;&amp; kill -0 &quot;$gstpid&quot; &gt;/dev/null 2&gt;&amp;1; then
+       kill &quot;$gstpid&quot;
+    fi
+}
+trap cleanup EXIT INT
+
+if [ -n &quot;$1&quot; ]; then
+    kodihost=$1
+    shift
+else
+    kodihost=kodi.local
+fi
+
+mcast=239.255.0.1
+mcastport=1234
+mcastttl=1
+
+pasrc=$(pactl list | grep -A2 &#39;Source #&#39; | grep &#39;Name: .*\.monitor$&#39; | \
+  cut -d&quot; &quot; -f2|head -1)
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=1 sync=0 \
+  pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
+  &gt; /dev/null 2&gt;&amp;1 &amp;
+gstpid=$!
+
+# Give stream a second to get going
+sleep 1
+
+# Ask kodi to start streaming using its JSON-RPC API
+kodicmd &quot;$kodihost&quot; Player.Open \
+       &quot;{\&quot;item\&quot;: { \&quot;file\&quot;: \&quot;udp://@$mcast:$mcastport\&quot; } }&quot; &gt; /dev/null
+
+# wait for gst to end
+wait &quot;$gstpid&quot;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;I hope you find the approach useful.  I know I do.&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>
 </description>
        </item>
        
        <item>
-               <title>NUUG contests Norwegian police DNS seizure of popcorn-time.no</title>
-               <link>http://people.skolelinux.org/pere/blog/NUUG_contests_Norwegian_police_DNS_seizure_of_popcorn_time_no.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/NUUG_contests_Norwegian_police_DNS_seizure_of_popcorn_time_no.html</guid>
-                <pubDate>Mon, 18 Apr 2016 10:00:00 +0200</pubDate>
-               <description>&lt;p&gt;It is days like today I am really happy to be a member of
-&lt;a href=&quot;http://www.nuug.no/&quot;&gt;the Norwegian Unix User group&lt;/a&gt;, a
-member association for those of us believing in free software, open
-standards and unix-like operating systems.  NUUG announced today it
-will
-&lt;a href=&quot;http://www.nuug.no/news/Pressemelding__NUUG_og_EFN_begj_rer_rettslig_pr_ving_for_DNS_domenebeslag_av_popcorn_time_no.shtml&quot;&gt;try
-to bring the seizure of the DNS domain popcorn-time.no as
-unlawful&lt;/a&gt;, to stand up for the principle that writing about a
-controversial topic is not infringing copyrights, and censuring web
-pages by hijacking DNS domain should be decided by the courts, not the
-police.  The DNS domain was seized by the Norwegian National Authority
-for Investigation and Prosecution of Economic and Environmental Crime
-a month ago.  I hope this bring more paying members to NUUG to give
-the association the financial muscle needed to bring this case as far
-as it must go to stop this kind of DNS hijacking.&lt;/p&gt;
+               <title>Streaming the Linux desktop to Kodi using VLC and RTSP</title>
+               <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</guid>
+                <pubDate>Thu, 12 Jul 2018 02:00:00 +0200</pubDate>
+               <description>&lt;p&gt;PS: See
+&lt;ahref=&quot;http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html&quot;&gt;the
+followup post&lt;/a&gt; for a even better approach.&lt;/p&gt;
+
+&lt;p&gt;A while back, I was asked by a friend how to stream the desktop to
+my projector connected to Kodi.  I sadly had to admit that I had no
+idea, as it was a task I never had tried.  Since then, I have been
+looking for a way to do so, preferable without much extra software to
+install on either side.  Today I found a way that seem to kind of
+work.  Not great, but it is a start.&lt;/p&gt;
+
+&lt;p&gt;I had a look at several approaches, for example
+&lt;a href=&quot;https://github.com/mfoetsch/dlna_live_streaming&quot;&gt;using uPnP
+DLNA as described in 2011&lt;/a&gt;, but it required a uPnP server, fuse and
+local storage enough to store the stream locally.  This is not going
+to work well for me, lacking enough free space, and it would
+impossible for my friend to get working.&lt;/p&gt;
+
+&lt;p&gt;Next, it occurred to me that perhaps I could use VLC to create a
+video stream that Kodi could play.  Preferably using
+broadcast/multicast, to avoid having to change any setup on the Kodi
+side when starting such stream.  Unfortunately, the only recipe I
+could find using multicast used the rtp protocol, and this protocol
+seem to not be supported by Kodi.&lt;/p&gt;
+
+&lt;p&gt;On the other hand, the rtsp protocol is working!  Unfortunately I
+have to specify the IP address of the streaming machine in both the
+sending command and the file on the Kodi server.  But it is showing my
+desktop, and thus allow us to have a shared look on the big screen at
+the programs I work on.&lt;/p&gt;
+
+&lt;p&gt;I did not spend much time investigating codeces.  I combined the
+rtp and rtsp recipes from
+&lt;a href=&quot;https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/&quot;&gt;the
+VLC Streaming HowTo/Command Line Examples&lt;/a&gt;, and was able to get
+this working on the desktop/streaming end.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+vlc screen:// --sout \
+  &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}&#39;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;I ssh-ed into my Kodi box and created a file like this with the
+same IP address:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo rtsp://192.168.11.4:8080/test.sdp \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Note the 192.168.11.4 IP address is my desktops IP address.  As far
+as I can tell the IP must be hardcoded for this to work.  In other
+words, if someone elses machine is going to do the steaming, you have
+to update screenstream.m3u on the Kodi machine and adjust the vlc
+recipe.  To get started, locate the file in Kodi and select the m3u
+file while the VLC stream is running.  The desktop then show up in my
+big screen. :)&lt;/p&gt;
+
+&lt;p&gt;When using the same technique to stream a video file with audio,
+the audio quality is really bad.  No idea if the problem is package
+loss or bad parameters for the transcode.  I do not know VLC nor Kodi
+enough to tell.&lt;/p&gt;
+
+&lt;p&gt;&lt;strong&gt;Update 2018-07-12&lt;/strong&gt;: Johannes Schauer send me a few
+succestions and reminded me about an important step.  The &quot;screen:&quot;
+input source is only available once the vlc-plugin-access-extra
+package is installed on Debian.  Without it, you will see this error
+message: &quot;VLC is unable to open the MRL &#39;screen://&#39;.  Check the log
+for details.&quot;  He further found that it is possible to drop some parts
+of the VLC command line to reduce the amount of hardcoded information.
+It is also useful to consider using cvlc to avoid having the VLC
+window in the desktop view.  In sum, this give us this command line on
+the source end
+
+&lt;blockquote&gt;&lt;pre&gt;
+cvlc screen:// --sout \
+  &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}&#39;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;and this on the Kodi end&lt;p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo rtsp://192.168.11.4:8080/ \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Still bad image quality, though.  But I did discover that streaming
+a DVD using dvdsimple:///dev/dvd as the source had excellent video and
+audio quality, so I guess the issue is in the input or transcoding
+parts, not the rtsp part.  I&#39;ve tried to change the vb and ab
+parameters to use more bandwidth, but it did not make a
+difference.&lt;/p&gt;
+
+&lt;p&gt;I further received a suggestion from Einar Haraldseid to try using
+gstreamer instead of VLC, and this proved to work great!  He also
+provided me with the trick to get Kodi to use a multicast stream as
+its source.  By using this monstrous oneliner, I can stream my desktop
+with good video quality in reasonable framerate to the 239.255.0.1
+multicast address on port 1234:
+
+&lt;blockquote&gt;&lt;pre&gt;
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \
+  pulsesrc device=$(pactl list | grep -A2 &#39;Source #&#39; | \
+    grep &#39;Name: .*\.monitor$&#39; |  cut -d&quot; &quot; -f2|head -1) ! \
+  audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;and this on the Kodi end&lt;p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo udp://@239.255.0.1:1234 \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Note the trick to pick a valid pulseaudio source.  It might not
+pick the one you need.  This approach will of course lead to trouble
+if more than one source uses the same multicast port and address.
+Note the ttl-mc=1 setting, which limit the multicast packages to the
+local network.  If the value is increased, your screen will be
+broadcasted further, one network &quot;hop&quot; for each increase (read up on
+multicast to learn more. :)!&lt;/p&gt;
+
+&lt;p&gt;Having cracked how to get Kodi to receive multicast streams, I
+could use this VLC command to stream to the same multicast address.
+The image quality is way better than the rtsp approach, but gstreamer
+seem to be doing a better job.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+cvlc screen:// --sout &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}&#39;
+&lt;/pre&gt;&lt;/blockquote&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>
        
 </description>
        </item>