]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Small updates.
[homepage.git] / blog / index.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Petter Reinholdtsen</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
8
9 <item>
10 <title>Vitenskapen tar som vanlig feil igjen - relativt feil</title>
11 <link>http://people.skolelinux.org/pere/blog/Vitenskapen_tar_som_vanlig_feil_igjen___relativt_feil.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Vitenskapen_tar_som_vanlig_feil_igjen___relativt_feil.html</guid>
13 <pubDate>Mon, 1 Aug 2016 16:00:00 +0200</pubDate>
14 <description>&lt;p&gt;For mange år siden leste jeg en klassisk tekst som gjorde såpass
15 inntrykk på meg at jeg husker den fortsatt, flere år senere, og bruker
16 argumentene fra den stadig vekk. Teksten var «The Relativity of
17 Wrong» som Isaac Asimov publiserte i Skeptical Inquirer i 1989. Den
18 gir litt perspektiv rundt formidlingen av vitenskapelige resultater.
19 Jeg har hatt lyst til å kunne dele den også med folk som ikke
20 behersker Engelsk så godt, som barn og noen av mine eldre slektninger,
21 og har savnet å ha den tilgjengelig på norsk. For to uker siden tok
22 jeg meg sammen og kontaktet Asbjørn Dyrendal i foreningen Skepsis om
23 de var interessert i å publisere en norsk utgave på bloggen sin, og da
24 han var positiv tok jeg kontakt med Skeptical Inquirer og spurte om
25 det var greit for dem. I løpet av noen dager fikk vi tilbakemelding
26 fra Barry Karr hos The Skeptical Inquirer som hadde sjekket og fått OK
27 fra Robyn Asimov som representerte arvingene i Asmiov-familien og gikk
28 igang med oversettingen.&lt;/p&gt;
29
30 &lt;p&gt;Resultatet, &lt;a href=&quot;http://www.skepsis.no/?p=1617&quot;&gt;«Relativt
31 feil»&lt;/a&gt;, ble publisert på skepsis-bloggen for noen minutter siden.
32 Jeg anbefaler deg på det varmeste å lese denne teksten og dele den med
33 dine venner.&lt;/p&gt;
34
35 &lt;p&gt;For å håndtere oversettelsen og sikre at original og oversettelse
36 var i sync brukte vi git, po4a, GNU make og Transifex. Det hele
37 fungerte utmerket og gjorde det enkelt å dele tekstene og jobbe sammen
38 om finpuss på formuleringene. Hadde hosted.weblate.org latt meg
39 opprette nye prosjekter selv i stedet for å måtte kontakte
40 administratoren der, så hadde jeg brukt weblate i stedet.&lt;/p&gt;
41 </description>
42 </item>
43
44 <item>
45 <title>Techno TV broadcasting live across Norway and the Internet (#debconf16, #nuug) on @frikanalen</title>
46 <link>http://people.skolelinux.org/pere/blog/Techno_TV_broadcasting_live_across_Norway_and_the_Internet___debconf16___nuug__on__frikanalen.html</link>
47 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Techno_TV_broadcasting_live_across_Norway_and_the_Internet___debconf16___nuug__on__frikanalen.html</guid>
48 <pubDate>Mon, 1 Aug 2016 10:30:00 +0200</pubDate>
49 <description>&lt;p&gt;Did you know there is a TV channel broadcasting talks from DebConf
50 16 across an entire country? Or that there is a TV channel
51 broadcasting talks by or about
52 &lt;a href=&quot;http://beta.frikanalen.no/video/625529/&quot;&gt;Linus Torvalds&lt;/a&gt;,
53 &lt;a href=&quot;http://beta.frikanalen.no/video/625599/&quot;&gt;Tor&lt;/a&gt;,
54 &lt;a href=&quot;http://beta.frikanalen.no/video/624019/&quot;&gt;OpenID&lt;/A&gt;,
55 &lt;a href=&quot;http://beta.frikanalen.no/video/625624/&quot;&gt;Common Lisp&lt;/a&gt;,
56 &lt;a href=&quot;http://beta.frikanalen.no/video/625446/&quot;&gt;Civic Tech&lt;/a&gt;,
57 &lt;a href=&quot;http://beta.frikanalen.no/video/625090/&quot;&gt;EFF founder John Barlow&lt;/a&gt;,
58 &lt;a href=&quot;http://beta.frikanalen.no/video/625432/&quot;&gt;how to make 3D
59 printer electronics&lt;/a&gt; and many more fascinating topics? It works
60 using only free software (all of it
61 &lt;a href=&quot;http://github.com/Frikanalen&quot;&gt;available from Github&lt;/a&gt;), and
62 is administrated using a web browser and a web API.&lt;/p&gt;
63
64 &lt;p&gt;The TV channel is the Norwegian open channel
65 &lt;a href=&quot;http://www.frikanalen.no/&quot;&gt;Frikanalen&lt;/a&gt;, and I am involved
66 via &lt;a href=&quot;https://www.nuug.no/&quot;&gt;the NUUG member association&lt;/a&gt; in
67 running and developing the software for the channel. The channel is
68 organised as a member organisation where its members can upload and
69 broadcast what they want (think of it as Youtube for national
70 broadcasting television). Individuals can broadcast too. The time
71 slots are handled on a first come, first serve basis. Because the
72 channel have almost no viewers and very few active members, we can
73 experiment with TV technology without too much flack when we make
74 mistakes. And thanks to the few active members, most of the slots on
75 the schedule are free. I see this as an opportunity to spread
76 knowledge about technology and free software, and have a script I run
77 regularly to fill up all the open slots the next few days with
78 technology related video. The end result is a channel I like to
79 describe as Techno TV - filled with interesting talks and
80 presentations.&lt;/p&gt;
81
82 &lt;p&gt;It is available on channel 50 on the Norwegian national digital TV
83 network (RiksTV). It is also available as a multicast stream on
84 Uninett. And finally, it is available as
85 &lt;a href=&quot;http://beta.frikanalen.no/&quot;&gt;a WebM unicast stream&lt;/a&gt; from
86 Frikanalen and NUUG. Check it out. :)&lt;/p&gt;
87 </description>
88 </item>
89
90 <item>
91 <title>Unlocking HTC Desire HD on Linux using unruu and fastboot</title>
92 <link>http://people.skolelinux.org/pere/blog/Unlocking_HTC_Desire_HD_on_Linux_using_unruu_and_fastboot.html</link>
93 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Unlocking_HTC_Desire_HD_on_Linux_using_unruu_and_fastboot.html</guid>
94 <pubDate>Thu, 7 Jul 2016 11:30:00 +0200</pubDate>
95 <description>&lt;p&gt;Yesterday, I tried to unlock a HTC Desire HD phone, and it proved
96 to be a slight challenge. Here is the recipe if I ever need to do it
97 again. It all started by me wanting to try the recipe to set up
98 &lt;a href=&quot;https://blog.torproject.org/blog/mission-impossible-hardening-android-security-and-privacy&quot;&gt;an
99 hardened Android installation&lt;/a&gt; from the Tor project blog on a
100 device I had access to. It is a old mobile phone with a broken
101 microphone The initial idea had been to just
102 &lt;a href=&quot;http://wiki.cyanogenmod.org/w/Install_CM_for_ace&quot;&gt;install
103 CyanogenMod on it&lt;/a&gt;, but did not quite find time to start on it
104 until a few days ago.&lt;/p&gt;
105
106 &lt;p&gt;The unlock process is supposed to be simple: (1) Boot into the boot
107 loader (press volume down and power at the same time), (2) select
108 &#39;fastboot&#39; before (3) connecting the device via USB to a Linux
109 machine, (4) request the device identifier token by running &#39;fastboot
110 oem get_identifier_token&#39;, (5) request the device unlocking key using
111 the &lt;a href=&quot;http://www.htcdev.com/bootloader/&quot;&gt;HTC developer web
112 site&lt;/a&gt; and unlock the phone using the key file emailed to you.&lt;/p&gt;
113
114 &lt;p&gt;Unfortunately, this only work fi you have hboot version 2.00.0029
115 or newer, and the device I was working on had 2.00.0027. This
116 apparently can be easily fixed by downloading a Windows program and
117 running it on your Windows machine, if you accept the terms Microsoft
118 require you to accept to use Windows - which I do not. So I had to
119 come up with a different approach. I got a lot of help from AndyCap
120 on #nuug, and would not have been able to get this working without
121 him.&lt;/p&gt;
122
123 &lt;p&gt;First I needed to extract the hboot firmware from
124 &lt;a href=&quot;http://www.htcdev.com/ruu/PD9810000_Ace_Sense30_S_hboot_2.00.0029.exe&quot;&gt;the
125 windows binary for HTC Desire HD&lt;/a&gt; downloaded as &#39;the RUU&#39; from HTC.
126 For this there is is &lt;a href=&quot;https://github.com/kmdm/unruu/&quot;&gt;a github
127 project named unruu&lt;/a&gt; using libunshield. The unshield tool did not
128 recognise the file format, but unruu worked and extracted rom.zip,
129 containing the new hboot firmware and a text file describing which
130 devices it would work for.&lt;/p&gt;
131
132 &lt;p&gt;Next, I needed to get the new firmware into the device. For this I
133 followed some instructions
134 &lt;a href=&quot;http://www.htc1guru.com/2013/09/new-ruu-zips-posted/&quot;&gt;available
135 from HTC1Guru.com&lt;/a&gt;, and ran these commands as root on a Linux
136 machine with Debian testing:&lt;/p&gt;
137
138 &lt;p&gt;&lt;pre&gt;
139 adb reboot-bootloader
140 fastboot oem rebootRUU
141 fastboot flash zip rom.zip
142 fastboot flash zip rom.zip
143 fastboot reboot
144 &lt;/pre&gt;&lt;/p&gt;
145
146 &lt;p&gt;The flash command apparently need to be done twice to take effect,
147 as the first is just preparations and the second one do the flashing.
148 The adb command is just to get to the boot loader menu, so turning the
149 device on while holding volume down and the power button should work
150 too.&lt;/p&gt;
151
152 &lt;p&gt;With the new hboot version in place I could start following the
153 instructions on the HTC developer web site. I got the device token
154 like this:&lt;/p&gt;
155
156 &lt;p&gt;&lt;pre&gt;
157 fastboot oem get_identifier_token 2&gt;&amp;1 | sed &#39;s/(bootloader) //&#39;
158 &lt;/pre&gt;
159
160 &lt;p&gt;And once I got the unlock code via email, I could use it like
161 this:&lt;/p&gt;
162
163 &lt;p&gt;&lt;pre&gt;
164 fastboot flash unlocktoken Unlock_code.bin
165 &lt;/pre&gt;&lt;/p&gt;
166
167 &lt;p&gt;And with that final step in place, the phone was unlocked and I
168 could start stuffing the software of my own choosing into the device.
169 So far I only inserted a replacement recovery image to wipe the phone
170 before I start. We will see what happen next. Perhaps I should
171 install &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt; on it. :)&lt;/p&gt;
172 </description>
173 </item>
174
175 <item>
176 <title>How to use the Signal app if you only have a land line (ie no mobile phone)</title>
177 <link>http://people.skolelinux.org/pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html</link>
178 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html</guid>
179 <pubDate>Sun, 3 Jul 2016 14:20:00 +0200</pubDate>
180 <description>&lt;p&gt;For a while now, I have wanted to test
181 &lt;a href=&quot;https://whispersystems.org/&quot;&gt;the Signal app&lt;/a&gt;, as it is
182 said to provide end to end encrypted communication and several of my
183 friends and family are already using it. As I by choice do not own a
184 mobile phone, this proved to be harder than expected. And I wanted to
185 have the source of the client and know that it was the code used on my
186 machine. But yesterday I managed to get it working. I used the
187 Github source, compared it to the source in
188 &lt;a href=&quot;https://chrome.google.com/webstore/detail/signal-private-messenger/bikioccmkafdpakkkcpdbppfkghcmihk?hl=en-US&quot;&gt;the
189 Signal Chrome app&lt;/a&gt; available from the Chrome web store, applied
190 patches to use the production Signal servers, started the app and
191 asked for the hidden &quot;register without a smart phone&quot; form. Here is
192 the recipe how I did it.&lt;/p&gt;
193
194 &lt;p&gt;First, I fetched the Signal desktop source from Github, using
195
196 &lt;pre&gt;
197 git clone https://github.com/WhisperSystems/Signal-Desktop.git
198 &lt;/pre&gt;
199
200 &lt;p&gt;Next, I patched the source to use the production servers, to be
201 able to talk to other Signal users:&lt;/p&gt;
202
203 &lt;pre&gt;
204 cat &amp;lt;&amp;lt;EOF | patch -p0
205 diff -ur ./js/background.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js
206 --- ./js/background.js 2016-06-29 13:43:15.630344628 +0200
207 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js 2016-06-29 14:06:29.530300934 +0200
208 @@ -47,8 +47,8 @@
209 });
210 });
211
212 - var SERVER_URL = &#39;https://textsecure-service-staging.whispersystems.org&#39;;
213 - var ATTACHMENT_SERVER_URL = &#39;https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com&#39;;
214 + var SERVER_URL = &#39;https://textsecure-service-ca.whispersystems.org:4433&#39;;
215 + var ATTACHMENT_SERVER_URL = &#39;https://whispersystems-textsecure-attachments.s3.amazonaws.com&#39;;
216 var messageReceiver;
217 window.getSocketStatus = function() {
218 if (messageReceiver) {
219 diff -ur ./js/expire.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js
220 --- ./js/expire.js 2016-06-29 13:43:15.630344628 +0200
221 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js2016-06-29 14:06:29.530300934 +0200
222 @@ -1,6 +1,6 @@
223 ;(function() {
224 &#39;use strict&#39;;
225 - var BUILD_EXPIRATION = 0;
226 + var BUILD_EXPIRATION = 1474492690000;
227
228 window.extension = window.extension || {};
229
230 EOF
231 &lt;/pre&gt;
232
233 &lt;p&gt;The first part is changing the servers, and the second is updating
234 an expiration timestamp. This timestamp need to be updated regularly.
235 It is set 90 days in the future by the build process (Gruntfile.js).
236 The value is seconds since 1970 times 1000, as far as I can tell.&lt;/p&gt;
237
238 &lt;p&gt;Based on a tip and good help from the #nuug IRC channel, I wrote a
239 script to launch Signal in Chromium.&lt;/p&gt;
240
241 &lt;pre&gt;
242 #!/bin/sh
243 cd $(dirname $0)
244 mkdir -p userdata
245 exec chromium \
246 --proxy-server=&quot;socks://localhost:9050&quot; \
247 --user-data-dir=`pwd`/userdata --load-and-launch-app=`pwd`
248 &lt;/pre&gt;
249
250 &lt;p&gt; The script start the app and configure Chromium to use the Tor
251 SOCKS5 proxy to make sure those controlling the Signal servers (today
252 Amazon and Whisper Systems) as well as those listening on the lines
253 will have a harder time location my laptop based on the Signal
254 connections if they use source IP address.&lt;/p&gt;
255
256 &lt;p&gt;When the script starts, one need to follow the instructions under
257 &quot;Standalone Registration&quot; in the CONTRIBUTING.md file in the git
258 repository. I right clicked on the Signal window to get up the
259 Chromium debugging tool, visited the &#39;Console&#39; tab and wrote
260 &#39;extension.install(&quot;standalone&quot;)&#39; on the console prompt to get the
261 registration form. Then I entered by land line phone number and
262 pressed &#39;Call&#39;. 5 seconds later the phone rang and a robot voice
263 repeated the verification code three times. After entering the number
264 into the verification code field in the form, I could start using
265 Signal from my laptop.
266
267 &lt;p&gt;As far as I can tell, The Signal app will leak who is talking to
268 whom and thus who know who to those controlling the central server,
269 but such leakage is hard to avoid with a centrally controlled server
270 setup. It is something to keep in mind when using Signal - the
271 content of your chats are harder to intercept, but the meta data
272 exposing your contact network is available to people you do not know.
273 So better than many options, but not great. And sadly the usage is
274 connected to my land line, thus allowing those controlling the server
275 to associate it to my home and person. I would prefer it if only
276 those I knew could tell who I was on Signal. There are options
277 avoiding such information leakage, but most of my friends are not
278 using them, so I am stuck with Signal for now.&lt;/p&gt;
279 </description>
280 </item>
281
282 <item>
283 <title>The new &quot;best&quot; multimedia player in Debian?</title>
284 <link>http://people.skolelinux.org/pere/blog/The_new__best__multimedia_player_in_Debian_.html</link>
285 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/The_new__best__multimedia_player_in_Debian_.html</guid>
286 <pubDate>Mon, 6 Jun 2016 12:50:00 +0200</pubDate>
287 <description>&lt;p&gt;When I set out a few weeks ago to figure out
288 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html&quot;&gt;which
289 multimedia player in Debian claimed to support most file formats /
290 MIME types&lt;/a&gt;, I was a bit surprised how varied the sets of MIME types
291 the various players claimed support for. The range was from 55 to 130
292 MIME types. I suspect most media formats are supported by all
293 players, but this is not really reflected in the MimeTypes values in
294 their desktop files. There are probably also some bogus MIME types
295 listed, but it is hard to identify which one this is.&lt;/p&gt;
296
297 &lt;p&gt;Anyway, in the mean time I got in touch with upstream for some of
298 the players suggesting to add more MIME types to their desktop files,
299 and decided to spend some time myself improving the situation for my
300 favorite media player VLC. The fixes for VLC entered Debian unstable
301 yesterday. The complete list of MIME types can be seen on the
302 &lt;a href=&quot;https://wiki.debian.org/DebianMultimedia/PlayerSupport&quot;&gt;Multimedia
303 player MIME type support status&lt;/a&gt; Debian wiki page.&lt;/p&gt;
304
305 &lt;p&gt;The new &quot;best&quot; multimedia player in Debian? It is VLC, followed by
306 totem, parole, kplayer, gnome-mpv, mpv, smplayer, mplayer-gui and
307 kmplayer. I am sure some of the other players desktop files support
308 several of the formats currently listed as working only with vlc,
309 toten and parole.&lt;/p&gt;
310
311 &lt;p&gt;A sad observation is that only 14 MIME types are listed as
312 supported by all the tested multimedia players in Debian in their
313 desktop files: audio/mpeg, audio/vnd.rn-realaudio, audio/x-mpegurl,
314 audio/x-ms-wma, audio/x-scpls, audio/x-wav, video/mp4, video/mpeg,
315 video/quicktime, video/vnd.rn-realvideo, video/x-matroska,
316 video/x-ms-asf, video/x-ms-wmv and video/x-msvideo. Personally I find
317 it sad that video/ogg and video/webm is not supported by all the media
318 players in Debian. As far as I can tell, all of them can handle both
319 formats.&lt;/p&gt;
320 </description>
321 </item>
322
323 <item>
324 <title>A program should be able to open its own files on Linux</title>
325 <link>http://people.skolelinux.org/pere/blog/A_program_should_be_able_to_open_its_own_files_on_Linux.html</link>
326 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/A_program_should_be_able_to_open_its_own_files_on_Linux.html</guid>
327 <pubDate>Sun, 5 Jun 2016 08:30:00 +0200</pubDate>
328 <description>&lt;p&gt;Many years ago, when koffice was fresh and with few users, I
329 decided to test its presentation tool when making the slides for a
330 talk I was giving for NUUG on Japhar, a free Java virtual machine. I
331 wrote the first draft of the slides, saved the result and went to bed
332 the day before I would give the talk. The next day I took a plane to
333 the location where the meeting should take place, and on the plane I
334 started up koffice again to polish the talk a bit, only to discover
335 that kpresenter refused to load its own data file. I cursed a bit and
336 started making the slides again from memory, to have something to
337 present when I arrived. I tested that the saved files could be
338 loaded, and the day seemed to be rescued. I continued to polish the
339 slides until I suddenly discovered that the saved file could no longer
340 be loaded into kpresenter. In the end I had to rewrite the slides
341 three times, condensing the content until the talk became shorter and
342 shorter. After the talk I was able to pinpoint the problem &amp;ndash;
343 kpresenter wrote inline images in a way itself could not understand.
344 Eventually that bug was fixed and kpresenter ended up being a great
345 program to make slides. The point I&#39;m trying to make is that we
346 expect a program to be able to load its own data files, and it is
347 embarrassing to its developers if it can&#39;t.&lt;/p&gt;
348
349 &lt;p&gt;Did you ever experience a program failing to load its own data
350 files from the desktop file browser? It is not a uncommon problem. A
351 while back I discovered that the screencast recorder
352 gtk-recordmydesktop would save an Ogg Theora video file the KDE file
353 browser would refuse to open. No video player claimed to understand
354 such file. I tracked down the cause being &lt;tt&gt;file --mime-type&lt;/tt&gt;
355 returning the application/ogg MIME type, which no video player I had
356 installed listed as a MIME type they would understand. I asked for
357 &lt;a href=&quot;http://bugs.gw.com/view.php?id=382&quot;&gt;file to change its
358 behavour&lt;/a&gt; and use the MIME type video/ogg instead. I also asked
359 several video players to add video/ogg to their desktop files, to give
360 the file browser an idea what to do about Ogg Theora files. After a
361 while, the desktop file browsers in Debian started to handle the
362 output from gtk-recordmydesktop properly.&lt;/p&gt;
363
364 &lt;p&gt;But history repeats itself. A few days ago I tested the music
365 system Rosegarden again, and I discovered that the KDE and xfce file
366 browsers did not know what to do with the Rosegarden project files
367 (*.rg). I&#39;ve reported &lt;a href=&quot;http://bugs.debian.org/825993&quot;&gt;the
368 rosegarden problem to BTS&lt;/a&gt; and a fix is commited to git and will be
369 included in the next upload. To increase the chance of me remembering
370 how to fix the problem next time some program fail to load its files
371 from the file browser, here are some notes on how to fix it.&lt;/p&gt;
372
373 &lt;p&gt;The file browsers in Debian in general operates on MIME types.
374 There are two sources for the MIME type of a given file. The output from
375 &lt;tt&gt;file --mime-type&lt;/tt&gt; mentioned above, and the content of the
376 shared MIME type registry (under /usr/share/mime/). The file MIME
377 type is mapped to programs supporting the MIME type, and this
378 information is collected from
379 &lt;a href=&quot;https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/&quot;&gt;the
380 desktop files&lt;/a&gt; available in /usr/share/applications/. If there is
381 one desktop file claiming support for the MIME type of the file, it is
382 activated when asking to open a given file. If there are more, one
383 can normally select which one to use by right-clicking on the file and
384 selecting the wanted one using &#39;Open with&#39; or similar. In general
385 this work well. But it depend on each program picking a good MIME
386 type (preferably
387 &lt;a href=&quot;http://www.iana.org/assignments/media-types/media-types.xhtml&quot;&gt;a
388 MIME type registered with IANA&lt;/a&gt;), file and/or the shared MIME
389 registry recognizing the file and the desktop file to list the MIME
390 type in its list of supported MIME types.&lt;/p&gt;
391
392 &lt;p&gt;The &lt;tt&gt;/usr/share/mime/packages/rosegarden.xml&lt;/tt&gt; entry for
393 &lt;a href=&quot;http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec&quot;&gt;the
394 Shared MIME database&lt;/a&gt; look like this:&lt;/p&gt;
395
396 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
397 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
398 &amp;lt;mime-info xmlns=&quot;http://www.freedesktop.org/standards/shared-mime-info&quot;&amp;gt;
399 &amp;lt;mime-type type=&quot;audio/x-rosegarden&quot;&amp;gt;
400 &amp;lt;sub-class-of type=&quot;application/x-gzip&quot;/&amp;gt;
401 &amp;lt;comment&amp;gt;Rosegarden project file&amp;lt;/comment&amp;gt;
402 &amp;lt;glob pattern=&quot;*.rg&quot;/&amp;gt;
403 &amp;lt;/mime-type&amp;gt;
404 &amp;lt;/mime-info&amp;gt;
405 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
406
407 &lt;p&gt;This states that audio/x-rosegarden is a kind of application/x-gzip
408 (it is a gzipped XML file). Note, it is much better to use an
409 official MIME type registered with IANA than it is to make up ones own
410 unofficial ones like the x-rosegarden type used by rosegarden.&lt;/p&gt;
411
412 &lt;p&gt;The desktop file of the rosegarden program failed to list
413 audio/x-rosegarden in its list of supported MIME types, causing the
414 file browsers to have no idea what to do with *.rg files:&lt;/p&gt;
415
416 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
417 % grep Mime /usr/share/applications/rosegarden.desktop
418 MimeType=audio/x-rosegarden-composition;audio/x-rosegarden-device;audio/x-rosegarden-project;audio/x-rosegarden-template;audio/midi;
419 X-KDE-NativeMimeType=audio/x-rosegarden-composition
420 %
421 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
422
423 &lt;p&gt;The fix was to add &quot;audio/x-rosegarden;&quot; at the end of the
424 MimeType= line.&lt;/p&gt;
425
426 &lt;p&gt;If you run into a file which fail to open the correct program when
427 selected from the file browser, please check out the output from
428 &lt;tt&gt;file --mime-type&lt;/tt&gt; for the file, ensure the file ending and
429 MIME type is registered somewhere under /usr/share/mime/ and check
430 that some desktop file under /usr/share/applications/ is claiming
431 support for this MIME type. If not, please report a bug to have it
432 fixed. :)&lt;/p&gt;
433 </description>
434 </item>
435
436 <item>
437 <title>Tor - from its creators mouth 11 years ago</title>
438 <link>http://people.skolelinux.org/pere/blog/Tor___from_its_creators_mouth_11_years_ago.html</link>
439 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Tor___from_its_creators_mouth_11_years_ago.html</guid>
440 <pubDate>Sat, 28 May 2016 14:20:00 +0200</pubDate>
441 <description>&lt;p&gt;A little more than 11 years ago, one of the creators of Tor, and
442 the current President of &lt;a href=&quot;https://www.torproject.org/&quot;&gt;the Tor
443 project&lt;/a&gt;, Roger Dingledine, gave a talk for the members of the
444 &lt;a href=&quot;http://www.nuug.no/&quot;&gt;Norwegian Unix User group&lt;/a&gt; (NUUG). A
445 video of the talk was recorded, and today, thanks to the great help
446 from David Noble, I finally was able to publish the video of the talk
447 on Frikanalen, the Norwegian open channel TV station where NUUG
448 currently publishes its talks. You can
449 &lt;a href=&quot;http://frikanalen.no/se&quot;&gt;watch the live stream using a web
450 browser&lt;/a&gt; with WebM support, or check out the recording on the video
451 on demand page for the talk
452 &quot;&lt;a href=&quot;http://beta.frikanalen.no/video/625599&quot;&gt;Tor: Anonymous
453 communication for the US Department of Defence...and you.&lt;/a&gt;&quot;.&lt;/p&gt;
454
455 &lt;p&gt;Here is the video included for those of you using browsers with
456 HTML video and Ogg Theora support:&lt;/p&gt;
457
458 &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;
459 &lt;source src=&quot;http://simula.gunkies.org/media/625599/theora/20050421-tor-frikanalen.ogv&quot; type=&quot;video/ogg&quot;/&gt;
460 &lt;/video&gt;&lt;/p&gt;
461
462 &lt;p&gt;I guess the gist of the talk can be summarised quite simply: If you
463 want to help the military in USA (and everyone else), use Tor. :)&lt;/p&gt;
464 </description>
465 </item>
466
467 <item>
468 <title>Isenkram with PackageKit support - new version 0.23 available in Debian unstable</title>
469 <link>http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</link>
470 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</guid>
471 <pubDate>Wed, 25 May 2016 10:20:00 +0200</pubDate>
472 <description>&lt;p&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;The isenkram
473 system&lt;/a&gt; is a user-focused solution in Debian for handling hardware
474 related packages. The idea is to have a database of mappings between
475 hardware and packages, and pop up a dialog suggesting for the user to
476 install the packages to use a given hardware dongle. Some use cases
477 are when you insert a Yubikey, it proposes to install the software
478 needed to control it; when you insert a braille reader list it
479 proposes to install the packages needed to send text to the reader;
480 and when you insert a ColorHug screen calibrator it suggests to
481 install the driver for it. The system work well, and even have a few
482 command line tools to install firmware packages and packages for the
483 hardware already in the machine (as opposed to hotpluggable hardware).&lt;/p&gt;
484
485 &lt;p&gt;The system was initially written using aptdaemon, because I found
486 good documentation and example code on how to use it. But aptdaemon
487 is going away and is generally being replaced by
488 &lt;a href=&quot;http://www.freedesktop.org/software/PackageKit/&quot;&gt;PackageKit&lt;/a&gt;,
489 so Isenkram needed a rewrite. And today, thanks to the great patch
490 from my college Sunil Mohan Adapa in the FreedomBox project, the
491 rewrite finally took place. I&#39;ve just uploaded a new version of
492 Isenkram into Debian Unstable with the patch included, and the default
493 for the background daemon is now to use PackageKit. To check it out,
494 install the &lt;tt&gt;isenkram&lt;/tt&gt; package and insert some hardware dongle
495 and see if it is recognised.&lt;/p&gt;
496
497 &lt;p&gt;If you want to know what kind of packages isenkram would propose for
498 the machine it is running on, you can check out the isenkram-lookup
499 program. This is what it look like on a Thinkpad X230:&lt;/p&gt;
500
501 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
502 % isenkram-lookup
503 bluez
504 cheese
505 fprintd
506 fprintd-demo
507 gkrellm-thinkbat
508 hdapsd
509 libpam-fprintd
510 pidgin-blinklight
511 thinkfan
512 tleds
513 tp-smapi-dkms
514 tp-smapi-source
515 tpb
516 %p
517 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
518
519 &lt;p&gt;The hardware mappings come from several places. The preferred way
520 is for packages to announce their hardware support using
521 &lt;a href=&quot;https://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
522 cross distribution appstream system&lt;/a&gt;.
523 See
524 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;previous
525 blog posts about isenkram&lt;/a&gt; to learn how to do that.&lt;/p&gt;
526 </description>
527 </item>
528
529 <item>
530 <title>Discharge rate estimate in new battery statistics collector for Debian</title>
531 <link>http://people.skolelinux.org/pere/blog/Discharge_rate_estimate_in_new_battery_statistics_collector_for_Debian.html</link>
532 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Discharge_rate_estimate_in_new_battery_statistics_collector_for_Debian.html</guid>
533 <pubDate>Mon, 23 May 2016 09:35:00 +0200</pubDate>
534 <description>&lt;p&gt;Yesterday I updated the
535 &lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;battery-stats
536 package in Debian&lt;/a&gt; with a few patches sent to me by skilled and
537 enterprising users. There were some nice user and visible changes.
538 First of all, both desktop menu entries now work. A design flaw in
539 one of the script made the history graph fail to show up (its PNG was
540 dumped in ~/.xsession-errors) if no controlling TTY was available.
541 The script worked when called from the command line, but not when
542 called from the desktop menu. I changed this to look for a DISPLAY
543 variable or a TTY before deciding where to draw the graph, and now the
544 graph window pop up as expected.&lt;/p&gt;
545
546 &lt;p&gt;The next new feature is a discharge rate estimator in one of the
547 graphs (the one showing the last few hours). New is also the user of
548 colours showing charging in blue and discharge in red. The percentages
549 of this graph is relative to last full charge, not battery design
550 capacity.&lt;/p&gt;
551
552 &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;
553
554 &lt;p&gt;The other graph show the entire history of the collected battery
555 statistics, comparing it to the design capacity of the battery to
556 visualise how the battery life time get shorter over time. The red
557 line in this graph is what the previous graph considers 100 percent:
558
559 &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;
560
561 &lt;p&gt;In this graph you can see that I only charge the battery to 80
562 percent of last full capacity, and how the capacity of the battery is
563 shrinking. :(&lt;/p&gt;
564
565 &lt;p&gt;The last new feature is in the collector, which now will handle
566 more hardware models. On some hardware, Linux power supply
567 information is stored in /sys/class/power_supply/ACAD/, while the
568 collector previously only looked in /sys/class/power_supply/AC/. Now
569 both are checked to figure if there is power connected to the
570 machine.&lt;/p&gt;
571
572 &lt;p&gt;If you are interested in how your laptop battery is doing, please
573 check out the
574 &lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;battery-stats&lt;/a&gt;
575 in Debian unstable, or rebuild it on Jessie to get it working on
576 Debian stable. :) The upstream source is available from &lt;a
577 href=&quot;https://github.com/petterreinholdtsen/battery-stats&quot;&gt;github&lt;/a&gt;.
578 Patches are very welcome.&lt;/p&gt;
579
580 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
581 activities, please send Bitcoin donations to my address
582 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
583 </description>
584 </item>
585
586 <item>
587 <title>French edition of Lawrence Lessigs book Cultura Libre on Amazon and Barnes &amp; Noble</title>
588 <link>http://people.skolelinux.org/pere/blog/French_edition_of_Lawrence_Lessigs_book_Cultura_Libre_on_Amazon_and_Barnes___Noble.html</link>
589 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/French_edition_of_Lawrence_Lessigs_book_Cultura_Libre_on_Amazon_and_Barnes___Noble.html</guid>
590 <pubDate>Sat, 21 May 2016 10:50:00 +0200</pubDate>
591 <description>&lt;p&gt;A few weeks ago the French paperback edition of Lawrence Lessigs
592 2004 book Cultura Libre was published. Today I noticed that the book
593 is now available from book stores. You can now buy it from
594 &lt;a href=&quot;http://www.amazon.com/Culture-Libre-French-Lawrence-Lessig/dp/8269018260&quot;&gt;Amazon&lt;/a&gt;
595 ($19.99),
596 &lt;a href=&quot;http://www.barnesandnoble.com/w/culture-libre-lawrence-lessig/1123776705&quot;&gt;Barnes
597 &amp; Noble&lt;/a&gt; ($?) and as always from
598 &lt;a href=&quot;http://www.lulu.com/shop/lawrence-lessig/culture-libre/paperback/product-22645082.html&quot;&gt;Lulu.com&lt;/a&gt;
599 ($19.99). The revenue is donated to the Creative Commons project. If
600 you buy from Lulu.com, they currently get $10.59, while if you buy
601 from one of the book stores most of the revenue go to the book store
602 and the Creative Commons project get much (not sure how much
603 less).&lt;/p&gt;
604
605 &lt;p&gt;I was a bit surprised to discover that there is a kindle edition
606 sold by Amazon Digital Services LLC on Amazon. Not quite sure how
607 that edition was created, but if you want to download a electronic
608 edition (PDF, EPUB, Mobi) generated from the same files used to create
609 the paperback edition, they are
610 &lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig&quot;&gt;available
611 from github&lt;/a&gt;.&lt;/p&gt;
612 </description>
613 </item>
614
615 </channel>
616 </rss>