X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/a5f4bdf4e8b5407e0e69b78fc77db623de7d967c..33aa1c0600c2b3b8750c5daea87cdcd8625de166:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index 2faa9a8da3..e89c56e1b4 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -7,259 +7,168 @@ - Automatic Google Drive sync using grive in Debian - http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html - http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html - Thu, 4 Oct 2018 15:20:00 +0200 - <p>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 -<a href="http://www.webupd8.org/">the Ubuntu UPD8 PPA</a> 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.</p> - -<p>I first created <tt>~/googledrive</tt>, entered the directory and -ran '<tt>grive -a</tt>' to authenticate the machine/user. Next, I -created a autostart hook in <tt>~/.config/autostart/grive.desktop</tt> -to start the sync when the user log in:</p> - -<p><blockquote><pre> -[Desktop Entry] -Name=Google drive autosync -Type=Application -Exec=/home/user/bin/grive-sync -</pre></blockquote></p> - -<p>Finally, I wrote the <tt>~/bin/grive-sync</tt> script to sync -~/googledrive/ with the files in Google Drive.</p> - -<p><blockquote><pre> -#!/bin/sh -set -e -cd ~/ -cleanup() { - if [ "$syncpid" ] ; then - kill $syncpid - fi -} -trap cleanup EXIT INT QUIT -/usr/lib/grive/grive-sync.sh listen googledrive 2>&1 | sed "s%^%$0:%" & -syncpdi=$! -while true; do - if ! xhost >/dev/null 2>&1 ; then - echo "no DISPLAY, exiting as the user probably logged out" - 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>&1 | sed "s%^%$0:%" -</pre></blockquote></p> - -<p>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.</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> + Totalovervåkning av innbyggernes bevegelser - nei takk! + http://people.skolelinux.org/pere/blog/Totaloverv_kning_av_innbyggernes_bevegelser___nei_takk_.html + http://people.skolelinux.org/pere/blog/Totaloverv_kning_av_innbyggernes_bevegelser___nei_takk_.html + Thu, 16 Apr 2020 20:30:00 +0200 + <p>Jeg er blitt spurt hva jeg synes om lansering av smittestopp-appen, +overvåkningsløsningen lansert av Folkehelseinstituttet, +Simula-senteret og Regjeringen i dag, fulgt av klare trusler fra +regjeringen om konsekvenser hvis befolkningen ikke tar den i bruk. +Rekker ikke skrive noe fyldig om temaet, men det er klart for meg at +den utraderer retten til privatliv samt utgjør en personlig +sikkerhetsrisiko for alle som tar den i bruk. Bare det er nok til at +det fremstår som en svert dårlig ide å bli med på denne "dugnaden". +Det finnes andre og bedre tilnærminger enn den valgt av FHI. Har de +valgt den for å sikre seg nok et datasett i den fremtidige +ehelse-portalen? Potensialet for misbruk av informasjon samlet inn av +appen er for stort, effekten på neste krise for klar og gevinsten for +liten.</p> + +<p>For å si det med forhenværende leder i Datatilsynet, Georg Apenes, +som skrev i en kronikk den gang Datatilsynet vernet +privatsfæren at +«<a href="https://www.dagbladet.no/kultur/rent-mel-i-bilen/66333882">SENTRALT +I en liberal forestillingsverden finner vi aksept av borgerens rett +til å kunne velge å være i fred; å være u-iakttatt, uregistrert og +anonym</a>». Det er ikke uten grunn han startet kronikken med +«Personvern et fremmedord i enkelte av de statsorganene som samler +inn, oppbevarer og bruker personopplysninger». Der har nok +statsorganene bare blitt dårligere på 13 år.</p> + +<p>Det er jo også verdt å merke seg at personvernrådet i EU (EDPB) +mener smittestopp-appen +<a href="https://nrkbeta.no/2020/04/16/personvernrad-i-eu-mener-norsk-app-bryter-med-viktig-personvernprinsipp/">opererer +i strid med prinsippet om dataminimering</a>. Også de ser at det +finnes mye bedre måter å gjøre dette på.</p> + + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Valutakrambod - A python and bitcoin love story - http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html - http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html - Sat, 29 Sep 2018 22:20:00 +0200 - <p>It would come as no surprise to anyone that I am interested in -bitcoins and virtual currencies. I'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.</p> - -<p>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 -<a href="http://github.com/petterreinholdtsen/valutakrambod">github</a>.</p> - -</p>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:</p> - -<p><blockquote><pre> -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("%-15s %s-%s: %8.3f %8.3f" % ( - service.servicename(), - pair[0], - pair[1], - service.rates[pair]['ask'], - service.rates[pair]['bid']) - ) - 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("Interrupted by keyboard, closing all connections.") - pass - for stream in self.streams: - stream.close() -</pre></blockquote></p> - -<p>The library client loops over all known "public" 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:</p> - -<p><blockquote><pre> -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 -</pre></blockquote></p> - -<p>The exchange order book is tracked in addition to the best buy/sell -price, for those that need to know the details.</p> - -<p>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 '-c' argument. Without the argument the "curses" output -is printed without using curses, which is useful for debugging. The -curses view look like this:</p> - -<p><blockquote><pre> - 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 -</pre></blockquote></p> - -<p>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.</p> - -<p>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've -implemented a trading API. It might be the topic of a future blog -post.</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> + Ny URL til den frie norske stavekontrollen + http://people.skolelinux.org/pere/blog/Ny_URL_til_den_frie_norske_stavekontrollen.html + http://people.skolelinux.org/pere/blog/Ny_URL_til_den_frie_norske_stavekontrollen.html + Sat, 21 Mar 2020 08:00:00 +0100 + <p>Det er lenge siden jeg har sett på den norske stavekontrollen, sist +jeg skrev om temaet var i 2016, og i mellomtiden har nettstedet +no.speling.org forsvunnet, og både git-depotet på Alioth og +mailman-tjenesten som hadde epostlistene for oversettelser blitt lagt +ned. Men bokmål og nynorsk trenger fortsatt stavekontroll, så etter +et par purringer fra en som har lyst til å forbedre stavekontrollen +har jeg endelig fått lagt ut ny offentlig kopi av git-depotet. Jeg +valgte gitlab foran github.. Siste utgave av stavekontrollen kan +hentes ned fra +<a href="https://gitlab.com/norwegian-language-tools/spell-norwegian">https://gitlab.com/norwegian-language-tools/spell-norwegian</a>. +Ingen ny versjon i denne omgang altså, bare et nytt sted å samle +forbedringer til den frie norske stavekontrollen. :) + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - VLC in Debian now can do bittorrent streaming - http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html - http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html - Mon, 24 Sep 2018 21:20:00 +0200 - <p>Back in February, I got curious to see -<a href="http://people.skolelinux.org/pere/blog/Using_VLC_to_stream_bittorrent_sources.html">if -VLC now supported Bittorrent streaming</a>. 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 -<a href="https://github.com/johang/vlc-bittorrent">a standalone plugin -for VLC</a> 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 -<a href="https://tracker.debian.org/pkg/vlc-plugin-bittorrent">entered -Debian</a> a few hours ago, and should be available in Debian/Unstable -tomorrow, and Debian/Testing in a few days.</p> - -<p>With the vlc-plugin-bittorrent package installed you should be able -to stream videos using a simple call to</p> - -<p><blockquote><pre> -vlc https://archive.org/download/TheGoat/TheGoat_archive.torrent -</pre></blockquote></p> - -</p>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. :)</p> - -<p>I would love to get help maintaining this package. Get in touch if -you are interested.</p> + Nikita version 0.5 released - updated free software archive API server + http://people.skolelinux.org/pere/blog/Nikita_version_0_5_released___updated_free_software_archive_API_server.html + http://people.skolelinux.org/pere/blog/Nikita_version_0_5_released___updated_free_software_archive_API_server.html + Mon, 2 Mar 2020 19:00:00 +0100 + <p>Today, after many months of development, a new release of +<ahref="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita +Noark 5 core project</a> was finally +<ahref="https://lists.nuug.no/pipermail/nikita-noark/2020-March/000519.html">announced +on the project mailing list</a>. The Nikita free software solution is +an implementation of the Norwegian archive standard Noark 5 used by +government offices in Norway. These were the changes in version 0.5 +since version 0.4, see the email link above for links to a demo +site:</p> + +<ul> + + <li>Updated to Noark 5 versjon 5.0 API specification. + <ul> + <li>Changed formatting of _links from [] to {} to match IETF draft + on JSON HAL.</li> + <li>Merged Registrering og Basisregistrering in version 4 to + combined Registrering.</li> + <li>DokumentObjekt is now subtype of ArkivEnhet.</li> + <li>Introducing new entity Arkivnotat.</li> + <li>Changed all relation keys to use /v5/ instead of /v4/.</li> + <li>Corrected to use new official relation keys when possible.</li> + <li>Renamed Sakspart to Part and connect it to Mappe, Registrering + and Dokumentbeskrivelse instead of only Saksmappe.</li> + <li>Moved Korrespondansepart connection from Journalpost to + Registrering.</li> + <li>Moved Part and Korrespondansepart from package sakarkiv to + arkivstruktur.</li> + <li>Renamed presedensstatus to presedensStatus.</li> + <li>Use new JSON content-type "application/vnd.noark5+json".</li> + <li>Updated prepopulated format list to use PRONOM codes.</li> + <li>Implemented endpoint for system information.</li> + <li>Implemented national identifiers for both file and record.</li> + <li>Implemented comments.</li> + <li>implemented sign off.</li> + <li>implemented conversion.</li> + </ul></li> + <li>Improved/implemented OData search and paging support for more entities.</li> + <li>No longer exposes attribute Dokumentobjekt.referanseDokumentfil, + one should use the relation in _links instead.</li> + <li>Corrected relation keys under + https://rel.arkivverket.no/noark5/v5/api/administrasjon/, replacing + 'administrasjon' with 'admin'.</li> + <li>Fixed several security and stability issues discovered by Coverity.</li> + <li>Corrected handling ETag errors, now return code 409.</li> + <li>Improved handling of Kryssreferanse.</li> + <li>Changed internal database model to use UUID/SystemID as primary keys + in tables.</li> + <li>Changed internal database table names to use package prefix.</li> + <li>Changed time zone handling for date and datetime attributes, to be + more according to the new definition in the API specification.</li> + <li>Change revoke-token to only drop token on POST requests, not GET.</li> + <li>Updated to newer Spring version.</li> + <li>Changed primary key and URL component for metadata code lists to + use the 'kode' value instead of a SystemID.</li> + <li>Corrected implementation of Part and Sakspart.</li> + <li>Changed instance lists with subtypes (like .../registrering/ and + .../mappe/) to include the attributes and _links entries for the + subtype in the supertype lists.</li> + <li>Adjusted _links relations to make it possible to figure out the + entity of an instance using the self->href->relation key lookup + method.</li> + <li>Fixed several end points to make sure GET, PUT, POST and DELETE + match each other.</li> + <li>Updated DELETE endpoints to work with UUID based entity + identifiers.</li> + <li>Restructured code to use more common URL related constants in entry + point values and replace @RequestMapping with method specific + annotations.</li> + <li>Added first unit test code.</li> + <li>Updated web GUI to work with the updated API.</li> + <li>Changed integer fields, enforce them as numeric.</li> + <li>Rewrote and simplify metadata handling to use common service and + controller code instead of duplicating for each type.</li> + <li>Implemented the remaining metadata types.</li> + <li>Changed Country list source from Wikipedia to Debian iso-codes and + updated the list of Countries.</li> + <li>Many many corrections and improvements.</li> + +</ul> + +<p>If free and open standardized archiving API sound interesting to +you, please contact us on IRC +(<a href="irc://irc.freenode.net/%23nikita">#nikita on +irc.freenode.net</a>) or email +(<a href="https://lists.nuug.no/mailman/listinfo/nikita-noark">nikita-noark +mailing list</a>).</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -268,28 +177,33 @@ activities, please send Bitcoin donations to my address - Using the Kodi API to play Youtube videos - http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html - http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html - Sun, 2 Sep 2018 23:40:00 +0200 - <p>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.</p> - -<p><blockquote><pre>curl --silent --header 'Content-Type: application/json' \ - --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", - "params": {"item": { "file": - "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg" } } }' \ - http://projector.local/jsonrpc</pre></blockquote></p> - -<p>I've extended kodi-stream program to take a video source as its -first argument. It can now handle direct video links, youtube links -and 'desktop' to stream my desktop to Kodi. It is almost like a -Chromecast. :)</p> + Blockchain and IoT articles accepted into Records Management Journal + http://people.skolelinux.org/pere/blog/Blockchain_and_IoT_articles_accepted_into_Records_Management_Journal.html + http://people.skolelinux.org/pere/blog/Blockchain_and_IoT_articles_accepted_into_Records_Management_Journal.html + Thu, 27 Feb 2020 09:05:00 +0100 + <p>On Tuesday, two scietific articles we have been working on for a +while, was finally accepted for publication into +<a href="https://www.emerald.com/insight/publication/issn/0956-5698">Records +Management Journal</a>. Still waiting for the assigned DOI urls to +start working, but you can have a look at the LaTeX originals here.</p> + +<p>The first article is +"<a href="http://people.skolelinux.org/pere/blog/images/2020-02-25-rmj-iot-record-keeping.pdf">A +record-keeping approach to managing IoT-data for government +agencies</a>" (<a href="https://doi.org/10.1108/RMJ-09-2019-0056">DOI +10.1108/RMJ-09-2019-0056</a>) by Thomas Sødring, Petter Reinholdtsen +and David Massey, and sketches some approaches for storing measurement +data (aka Internet of Things sensor data) in a archive, thus providing +a well defined mechanism for screening and deletion of the information </p> + +<p>The second article is +"<a href="http://people.skolelinux.org/pere/blog/images/2020-02-25-rmj-block-chain-record-keeping.pdf">Publishing +and using record-keeping structural information in a blockchain</a>" +(<a href="https://doi.org/10.1108/RMJ-09-2019-0050">DOI +10.1108/RMJ-09-2019-0050<a/>) by Thomas Sødring, Petter Reinholdtsen +and Svein Ølnes, where we describe a way for third parties to validate +authenticity and thus improve trust in the records kept in a +archive.</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -298,279 +212,195 @@ activities, please send Bitcoin donations to my address - Software created using taxpayers’ money should be Free Software - http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html - http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html - Thu, 30 Aug 2018 13:50:00 +0200 - <p>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 -<a href="https://publiccode.eu/">Public Money, Public Code</a> to help -them. I hope you too will do the same.</p> + Redaksjon på plass for Noark 5 tjenestegrensesnitt + http://people.skolelinux.org/pere/blog/Redaksjon_p__plass_for_Noark_5_tjenestegrensesnitt.html + http://people.skolelinux.org/pere/blog/Redaksjon_p__plass_for_Noark_5_tjenestegrensesnitt.html + Wed, 5 Feb 2020 14:45:00 +0100 + <p>Arbeidet med å lage et godt, fritt og åpent standardisert maskinelt +grensesnitt for arkivering, med tilhørende fri +programvareimplementasjon fortsetter. Jeg snakker om +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard">Noark +5 Tjenestegrensesnitt</a> og +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita</a>. +Siste nytt etter +<a href="https://www.nuug.no/aktiviteter/20200127-noark-seminar/">seminaret +for noen dager siden</a>, er vi i Nikita-prosjektet har fått beskjed +fra Arkivverket at det blir satt ned en redaksjon for å videreutvikle +spesifikasjonen. Redaksjonen består av Mona Danielsen og Anne Sofie +Knutsen ved arkivverket, Thomas Sødring ved OsloMet, og meg selv fra +NUUG. De to sistenevnte tar seg av de åpenbare forbedringene, mens +hele redaksjonen diskuterer tvilstilfeller. Jeg håper dette vil bidra +til at vi lykkes i å gjøre denne protokollspesifikasjonen så entydig +og klar at den vil bidra til et velfungerende marked for +arkivsystemer, og sikre at programmer som trenger å snakke med +arkivsystemet kan snakke med enhver implementasjon av +API-spesifikasjonen. Nikita er den første implementasjonen, men det +bør blir flere.</p> + +<p>Det gjenstår riktig nok endel før vi er i mål, selv om svært mye +allerede er på plass. Med innspill og forslag til forbedringer fra +alle som vil ha et leverandøruavhengig og fullstendig +datamaskinlesbart grensesnitt til arkivet, så tror jeg vi vil +lykkes.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - A bit more on privacy respecting health monitor / fitness tracker - http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html - http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html - Mon, 13 Aug 2018 09:00:00 +0200 - <p>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'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 -<a href="https://github.com/Freeyourgadget/Gadgetbridge/">Gadgetbridge</a>. -It provide cloudless collection and storing of data from a variety of -trackers. Its -<a href="https://github.com/Freeyourgadget/Gadgetbridge/#supported-devices">list -of supported devices</a> 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 -<a href="https://us.amazfit.com/shop/bip?variant=336750">Amazfit -Bip</a> and -<a href="http://www.xiaomimi6phone.com/xiaomi-mi-band-3-features-release-date-rumors/">Xiaomi -Band 3</a>.</p> - -<p>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 -<a href="https://www.gpsbabel.org/htmldoc-development/fmt_garmin_fit.html">Garmin -FIT files</a> containing the collected measurements. While -proprietary, FIT files apparently can be read at least by -<a href="https://www.gpsbabel.org">GPSBabel</a> and the -<a href="https://apps.nextcloud.com/apps/gpxpod">GpxPod</a> 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 -<a href="https://buy.garmin.com/en-US/US/p/564291">Garmin Forerunner -935</a>, 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.</p> - -<p>A final idea was to build ones own unit, perhaps by basing it on a -wearable hardware platforms like -<a href="https://learn.adafruit.com/flora-geo-watch">the Flora Geo -Watch</a>. 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.</p> - -<p>While I was working on tracking down links, I came across an -inspiring TED talk by Dave Debronkart about -<a href="https://archive.org/details/DavedeBronkart_2010X">being a -e-patient</a>, and discovered the web site -<a href="https://participatorymedicine.org/epatients/">Participatory -Medicine</a>. 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.</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> + Artikkel om Noark 5 Tjenestegrensesnitt og Nikita i Arkivråd nummer 3 for 2019 + http://people.skolelinux.org/pere/blog/Artikkel_om_Noark_5_Tjenestegrensesnitt_og_Nikita_i_Arkivr_d_nummer_3_for_2019.html + http://people.skolelinux.org/pere/blog/Artikkel_om_Noark_5_Tjenestegrensesnitt_og_Nikita_i_Arkivr_d_nummer_3_for_2019.html + Thu, 26 Dec 2019 08:00:00 +0100 + <p>Like før julaften ble en artikkel jeg har skrevet om vedlikehold av +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard">Noark +5 Tjenestegrensesnitt</a> og Nikita publisert i <a +href="https://www.arkivrad.no/arkivrad">tidsskriftet Arkivråd</a>. +Det er basert på +<a href="http://people.skolelinux.org/pere/blog/_pen_og_gjennomsiktig_vedlikehold_av_spesifikasjonen_for_Noark_5_Tjenestegrensesnitt.html">min bloggpost +om samme tema</a> som ble publisert 2019-03-11. Jeg oppdaget nettopp +at nettsiden til tidsskriftet Arkivråd er oppdatert med siste utgave, +og artikkelen dermed er tilgjengelig for alle. Du finner den i +<a href="https://www.arkivrad.no/sites/arkivrad/files/arkivrad_03_2019_nett.pdf">PDF-en +til nummer 2019/3 på side 30-33</a>. Jeg håper leserne av +tidsskriftet får lyst til å sjekke ut tjenestegrensesnittet og at +artikkelen vil gjøre det enklere for flere å bidra til en enda bedre, +klarere og mer entydig API-spesifikasjon. Det kan gjøre at +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">arkivsystemet +Nikita</a> kan bli enda bedre når spesifikasjonen forbedres.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Privacy respecting health monitor / fitness tracker? - http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html - http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html - Tue, 7 Aug 2018 16:00:00 +0200 - <p>Dear lazyweb,</p> - -<p>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 <strong>only</strong> 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 "the cloud"). The collected data should be available -using only free software. I'm not interested in depending on some -non-free software that will leave me high and dry some time in the -future. I'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 "cloud enabled"). -Is there an alternative? I'm not interested in giving money to people -requiring me to accept "privacy terms" to allow myself to measure my -own health.</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> + Meningsløst, men for hvem... + http://people.skolelinux.org/pere/blog/Meningsl_st__men_for_hvem___.html + http://people.skolelinux.org/pere/blog/Meningsl_st__men_for_hvem___.html + Wed, 25 Dec 2019 10:35:00 +0100 + <p>En historie som har betydd endel for meg, og som jeg av og til +tenker på når hverdagen tynger, ble så vidt jeg har klart å finne ut, +skrevet av <a href="https://en.wikipedia.org/wiki/Loren_Eiseley">Loren +Eiseley</a> <a href="https://en.wikipedia.org/wiki/The_Star_Thrower">i +flere ulike varianter</a>. På norsk tror jeg den går under navnet +«Gutten og sjøstjernen», og jeg fant en oversettelse av en utgave av den +hos +<a href="https://no.quora.com/Hva-er-din-favoritthistorie">Quora</a>. +Fant også <a href="https://www.youtube.com/watch?v=-qClChUdlfI">en +filmatisering</a>, men den versjonen jeg liker best fant jeg +<a href="https://www.goodreads.com/author/quotes/56782.Loren_Eiseley">hos +Goodreads</a>. Jeg oversatte den utgaven til norsk i går, og har lyst +til å dele den med deg: + +<blockquote><p>Mens jeg tok en pause fra skrivingen og vandret på en +øde strand ved daggry, så jeg en gutt i det fjerne bøye seg ned og +kaste noe mens han vandret mot meg over den endeløse stranden. Da han +kom nærmere, kunne jeg se at han kastet sjøstjerner, som var etterlatt +i sanden av tidevannet, tilbake i havet. Da han var nær nok spurte jeg +ham hvorfor han jobbet så hardt på denne merkelige oppgaven. Han sa at +solen snart ville stå opp og tørke sjøstjernene slik at de ville +dø.</p> + +<p>Jeg sa til ham at dette var helt meningsløst. Det var kilometer på +kilometer med strand, og det lå sjøstjerner hele veien. En person +alene kunne ikke gjøre noen forskjell. Han smilte da han plukket opp +neste sjøstjerne. Mens han kastet den så langt ut i havet som han +klarte sa han, «for denne gjør det en forskjell». Jeg droppet +skrivingen og tilbrakte resten av morgenen med å kaste +sjøstjerner.</p> + +<p>- Loren Eiseley</p> +</blockquote> + +<p>Kanskje noe du også kan ha glede av å tenke på når ting virker +håpløst?</p> + +<p>Teksten er gjengitt og oversatt basert på utgaven på Good Read, +uten tillatelse fra noen andre enn meg selv. Jeg håper på tilgivelse, +hvis det er et problem for noen, da det er gjort i beste mening. Hvis +eventuell rettighetshaver tar kontakt vil jeg fjerne teksten og i +stedet legge ut henvendelsen der teksten kreves fjernet.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Sharing images with friends and family using RSS and EXIF/XMP metadata - http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html - http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html - Tue, 31 Jul 2018 23:30:00 +0200 - <p>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 -&lt;enclosure&gt; RSS tag), but was unable to find a current supplier -of such frames. In the end I gave up that approach.</p> - -<p>Some months ago, I discovered that -<a href="https://www.jwz.org/xscreensaver/">XScreensaver</a> 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 -<a href="https://kodi.tv">Kodi</a> (both using -<a href="https://www.openelec.tv/">OpenELEC</a> and -<a href="https://libreelec.tv">LibreELEC</a>) provide the -<a href="https://github.com/grinsted/script.screensaver.feedreader">Feedreader</a> -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.</p> - -<p>Armed with motivation and a test photo frame, I set out to generate -a RSS feed for the Kodi instance. I adjusted my <a -href="https://freedombox.org/">Freedombox</a> 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.</p> - -<p>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:</p> - -<blockquote><pre> -exiftool -headline='The RSS image title' \ - -description='The RSS image description.' \ - -subject+=for-family photo.jpeg -</pre></blockquote> - -<p>I initially tried the "-title" and "keyword" tags, but they were -invisible in digiKam, so I changed to "-headline" and "-subject". I -use the keyword/subject 'for-family' 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.</p> - -<p>Are there better ways to do this? Get in touch if you have better -suggestions.</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> + Artikkel om Nikita i Arkheion nummer 2019/2 + http://people.skolelinux.org/pere/blog/Artikkel_om_Nikita_i_Arkheion_nummer_2019_2.html + http://people.skolelinux.org/pere/blog/Artikkel_om_Nikita_i_Arkheion_nummer_2019_2.html + Mon, 9 Dec 2019 15:05:00 +0100 + <p>Jeg hadde i dag gleden av å oppdage at en artikkel om +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">arkivsystemet +Nikita</a> som vi skrev i sommer, nå er publisert i +<a href="http://www.arkheion.no/">Arkheion, fagtidsskrift for kommunial +arkivsektor</a>. Du finner artikkelen på side 30-33 i nummer 2019/2, +PDF kan lastes ned fra nettstedet til tidsskriftet. Kanskje +publiseringen kan føre til at noen flere får øynene opp for verdien av +et åpent standardisert API for arkivering og søk i arkivet.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Simple streaming the Linux desktop to Kodi using GStreamer and RTP - http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html - http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html - Thu, 12 Jul 2018 17:55:00 +0200 - <p>Last night, I wrote -<a href="http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html">a -recipe to stream a Linux desktop using VLC to a instance of Kodi</a>. -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.</p> - -<p>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 -<a href="https://kodi.wiki/view/JSON-RPC_API/v8">the JSON-RPC API in -Kodi</a> 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.</p> - -<blockquote><pre> -#!/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="$1" - cmd="$2" - params="$3" - curl --silent --header 'Content-Type: application/json' \ - --data-binary "{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"$cmd\", \"params\": $params }" \ - "http://$host/jsonrpc" -} -cleanup() { - if [ -n "$kodihost" ] ; then - # Stop the playing when we end - playerid=$(kodicmd "$kodihost" Player.GetActivePlayers "{}" | - jq .result[].playerid) - kodicmd "$kodihost" Player.Stop "{ \"playerid\" : $playerid }" > /dev/null - fi - if [ "$gstpid" ] && kill -0 "$gstpid" >/dev/null 2>&1; then - kill "$gstpid" - fi -} -trap cleanup EXIT INT - -if [ -n "$1" ]; then - kodihost=$1 - shift -else - kodihost=kodi.local -fi - -mcast=239.255.0.1 -mcastport=1234 -mcastttl=1 - -pasrc=$(pactl list | grep -A2 'Source #' | grep 'Name: .*\.monitor$' | \ - cut -d" " -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. \ - > /dev/null 2>&1 & -gstpid=$! - -# Give stream a second to get going -sleep 1 - -# Ask kodi to start streaming using its JSON-RPC API -kodicmd "$kodihost" Player.Open \ - "{\"item\": { \"file\": \"udp://@$mcast:$mcastport\" } }" > /dev/null - -# wait for gst to end -wait "$gstpid" -</pre></blockquote> - -<p>I hope you find the approach useful. I know I do.</p> + When terms and policy turn users away + http://people.skolelinux.org/pere/blog/When_terms_and_policy_turn_users_away.html + http://people.skolelinux.org/pere/blog/When_terms_and_policy_turn_users_away.html + Sat, 7 Dec 2019 21:15:00 +0100 + <p>When asked to accept terms of use and privacy policies that state +it will to remove rights I otherwise had or accept unreasonable terms +undermining my privacy, I choose away the service. I simply do not +have the conscience to accept terms I have no indention of upholding. +But how are the system and service providers to know how many people +they scared away? Normally I just quietly walk away. But today, I +tried a new approach. I sent the following email (removing the +specifics, as I am not out to take the specific service in question) +to the service provider I decided to not use, to at least give them +one data point on how many users are unhappy with their terms:</p> + +<blockquote> +From: Petter Reinholdtsen +<br>Subject: When terms of use turn users away +<br>To: [contact@some.site] +<br>Date: Sat, 07 Dec 2019 16:30:56 +0100 + +<p>Dear [Site Owner],</p> + +<p>I was eager to test the system, as it seemed like a fun and +interesting application of [some] technology, but after reading the +terms of use and privacy policy on &lt;URL: +https://www.[some.site]/terms-of-use &gt; and &lt;URL: +https://www.[some.site]/privacy-policy &gt; I want you to know that I +decided to turn away. There were several provisions in the terms and +policy turning me off, but the final term that convinced me was being +asked to sign away my right to reverse engineer.</p> + +<p>-- +<br>Happy hacking +<br>Petter Reinholdtsen</p> +</blockquote> + +<p>I do not expect much to come out of it, but sharing it here in case +others want to give something similar a try too. If companies +discover their terms scare away enough people, perhaps they will be +improved...</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -579,149 +409,58 @@ activities, please send Bitcoin donations to my address - Streaming the Linux desktop to Kodi using VLC and RTSP - http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html - http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html - Thu, 12 Jul 2018 02:00:00 +0200 - <p>PS: See -<ahref="http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html">the -followup post</a> for a even better approach.</p> - -<p>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.</p> - -<p>I had a look at several approaches, for example -<a href="https://github.com/mfoetsch/dlna_live_streaming">using uPnP -DLNA as described in 2011</a>, 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.</p> - -<p>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.</p> - -<p>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.</p> - -<p>I did not spend much time investigating codeces. I combined the -rtp and rtsp recipes from -<a href="https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/">the -VLC Streaming HowTo/Command Line Examples</a>, and was able to get -this working on the desktop/streaming end.</p> - -<blockquote><pre> -vlc screen:// --sout \ - '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}' -</pre></blockquote> - -<p>I ssh-ed into my Kodi box and created a file like this with the -same IP address:</p> - -<blockquote><pre> -echo rtsp://192.168.11.4:8080/test.sdp \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>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. :)</p> - -<p>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.</p> - -<p><strong>Update 2018-07-12</strong>: Johannes Schauer send me a few -succestions and reminded me about an important step. The "screen:" -input source is only available once the vlc-plugin-access-extra -package is installed on Debian. Without it, you will see this error -message: "VLC is unable to open the MRL 'screen://'. Check the log -for details." 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 - -<blockquote><pre> -cvlc screen:// --sout \ - '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}' -</pre></blockquote> - -<p>and this on the Kodi end<p> - -<blockquote><pre> -echo rtsp://192.168.11.4:8080/ \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>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've tried to change the vb and ab -parameters to use more bandwidth, but it did not make a -difference.</p> - -<p>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: - -<blockquote><pre> -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 'Source #' | \ - grep 'Name: .*\.monitor$' | cut -d" " -f2|head -1) ! \ - audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. -</pre></blockquote> - -<p>and this on the Kodi end<p> - -<blockquote><pre> -echo udp://@239.255.0.1:1234 \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>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 "hop" for each increase (read up on -multicast to learn more. :)!</p> - -<p>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.</p> - -<blockquote><pre> -cvlc screen:// --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}' -</pre></blockquote> - -<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> + What would it cost to store all 2018 phone calls in Norway? + http://people.skolelinux.org/pere/blog/What_would_it_cost_to_store_all_2018_phone_calls_in_Norway_.html + http://people.skolelinux.org/pere/blog/What_would_it_cost_to_store_all_2018_phone_calls_in_Norway_.html + Mon, 25 Nov 2019 20:15:00 +0100 + <p>Four years ago, I did a back of the envelope calculation on +<a href="http://people.skolelinux.org/pere/blog/What_would_it_cost_to_store_all_phone_calls_in_Norway_.html">how +much it would cost to store audio recordings of all the phone calls in +Norway</a>, and came up with NOK 2.1 million / EUR 250 000 for the +year 2013. It is time to repeat the calculation using updated +numbers. The calculation is based on how much data storage is needed +for each minute of audio, how many minutes all the calls in Norway +sums up to, multiplied by the cost of data storage.</p> + +<p>The number of phone call minutes for 2018 was fetched from +<a href="https://ekomstatistikken.nkom.no/">the NKOM statistics +site</a>, and for 2018, land line calls are listed as 434 238 000 +minutes, while mobile phone calls are listed with 7 542 006 000 +minutes. The total number of minutes is thus 7 976 244 000. For +simplicity, I decided to ignore any advantages in audio compression the +last four years, and continue to assume 60 Kbytes/min as the last +time.</p> + +<p>Storage prices still varies a lot, but as last time, I decide to +take a reasonable big and cheap hard drive, and double its price to +include the surrounding costs into account. A 10 TB disk cost less +than 4500 NOK / 450 EUR these days, and doubling it give 9000 NOK per +10 TB.</p> + +<p>So, with the parameters in place, lets update the old table +estimating cost for calls in a given year:</p> + +<table border="1"> +<tr><th>Year</th><th>Call minutes</th><th>Size</th><th>Price in NOK / EUR</th></tr> +<tr><td>2005</td><td align="right">24 000 000 000</td><td align="right">1.3 PiB</td><td align="right">1 170 000 / 117 000</td></tr> + +<tr><td>2012</td><td align="right">18 000 000 000</td><td align="right">1.0 PiB</td><td align="right">900 000 / 90 000</td></tr> + +<tr><td>2013</td><td align="right">17 000 000 000</td><td align="right">950 TiB</td><td align="right">855 000 / 85 500</td></tr> + +<tr><td>2018</td><td align="right">7 976 244 000</td><td align="right">445 TiB</td><td align="right">401 100 / 40 110</td></tr> +</table> + +<p>Both the cost of storage and the number of phone call minutes have +dropped since the last time, bringing the cost down to a level where I +guess even small organizations can afford to store the audio recording +from every phone call taken in a year in Norway. Of course, this is +just the cost of buying the storage equipment. Maintenance, need to +be included as well, but the volume of a single year is about a single +rack of hard drives, so it is not much more than I could fit in my own +home. Wonder how much the electricity bill would raise if I had that +kind of storage? I doubt it would be more than a few tens of thousand +NOK per year.</p>