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">
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" />
10 <title>Software created using taxpayers’ money should be Free Software
</title>
11 <link>http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</guid>
13 <pubDate>Thu,
30 Aug
2018 13:
50:
00 +
0200</pubDate>
14 <description><p
>It might seem obvious that software created using tax money should
15 be available for everyone to use and improve. Free Software
16 Foundation Europe recentlystarted a campaign to help get more people
17 to understand this, and I just signed the petition on
18 <a href=
"https://publiccode.eu/
">Public Money, Public Code
</a
> to help
19 them. I hope you too will do the same.
</p
>
24 <title>A bit more on privacy respecting health monitor / fitness tracker
</title>
25 <link>http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html
</link>
26 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html
</guid>
27 <pubDate>Mon,
13 Aug
2018 09:
00:
00 +
0200</pubDate>
28 <description><p
>A few days ago, I wondered if there are any privacy respecting
29 health monitors and/or fitness trackers available for sale these days.
30 I would like to buy one, but do not want to share my personal data
31 with strangers, nor be forced to have a mobile phone to get data out
32 of the unit. I
've received some ideas, and would like to share them
35 One interesting data point was a pointer to a Free Software app for
37 <a href=
"https://github.com/Freeyourgadget/Gadgetbridge/
">Gadgetbridge
</a
>.
38 It provide cloudless collection and storing of data from a variety of
40 <a href=
"https://github.com/Freeyourgadget/Gadgetbridge/#supported-devices
">list
41 of supported devices
</a
> is a good indicator for units where the
42 protocol is fairly open, as it is obviously being handled by Free
43 Software. Other units are reportedly encrypting the collected
44 information with their own public key, making sure only the vendor
45 cloud service is able to extract data from the unit. The people
46 contacting me about Gadgetbirde said they were using
47 <a href=
"https://us.amazfit.com/shop/bip?variant=
336750">Amazfit
49 <a href=
"http://www.xiaomimi6phone.com/xiaomi-mi-band-
3-features-release-date-rumors/
">Xiaomi
50 Band
3</a
>.
</p
>
52 <p
>I also got a suggestion to look at some of the units from Garmin.
53 I was told their GPS watches can be connected via USB and show up as a
54 USB storage device with
55 <a href=
"https://www.gpsbabel.org/htmldoc-development/fmt_garmin_fit.html
">Garmin
56 FIT files
</a
> containing the collected measurements. While
57 proprietary, FIT files apparently can be read at least by
58 <a href=
"https://www.gpsbabel.org
">GPSBabel
</a
> and the
59 <a href=
"https://apps.nextcloud.com/apps/gpxpod
">GpxPod
</a
> Nextcloud
60 app. It is unclear to me if they can read step count and heart rate
61 data. The person I talked to was using a
62 <a href=
"https://buy.garmin.com/en-US/US/p/
564291">Garmin Forerunner
63 935</a
>, which is a fairly expensive unit. I doubt it is worth it for
64 a unit where the vendor clearly is trying its best to move from open
65 to closed systems. I still remember when Garmin dropped NMEA support
66 in its GPSes.
</p
>
68 <p
>A final idea was to build ones own unit, perhaps by basing it on a
69 wearable hardware platforms like
70 <a href=
"https://learn.adafruit.com/flora-geo-watch
">the Flora Geo
71 Watch
</a
>. Sound like fun, but I had more money than time to spend on
72 the topic, so I suspect it will have to wait for another time.
</p
>
74 <p
>While I was working on tracking down links, I came across an
75 inspiring TED talk by Dave Debronkart about
76 <a href=
"https://archive.org/details/DavedeBronkart_2010X
">being a
77 e-patient
</a
>, and discovered the web site
78 <a href=
"https://participatorymedicine.org/epatients/
">Participatory
79 Medicine
</a
>. If you too want to track your own health and fitness
80 without having information about your private life floating around on
81 computers owned by others, I recommend checking it out.
</p
>
83 <p
>As usual, if you use Bitcoin and want to show your support of my
84 activities, please send Bitcoin donations to my address
85 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
90 <title>Privacy respecting health monitor / fitness tracker?
</title>
91 <link>http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html
</link>
92 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html
</guid>
93 <pubDate>Tue,
7 Aug
2018 16:
00:
00 +
0200</pubDate>
94 <description><p
>Dear lazyweb,
</p
>
96 <p
>I wonder, is there a fitness tracker / health monitor available for
97 sale today that respect the users privacy? With this I mean a
98 watch/bracelet capable of measuring pulse rate and other
99 fitness/health related values (and by all means, also the correct time
100 and location if possible), which is
<strong
>only
</strong
> provided for
101 me to extract/read from the unit with computer without a radio beacon
102 and Internet connection. In other words, it do not depend on a cell
103 phone app, and do make the measurements available via other peoples
104 computer (aka
"the cloud
"). The collected data should be available
105 using only free software. I
'm not interested in depending on some
106 non-free software that will leave me high and dry some time in the
107 future. I
've been unable to find any such unit. I would like to buy
108 it. The ones I have seen for sale here in Norway are proud to report
109 that they share my health data with strangers (aka
"cloud enabled
").
110 Is there an alternative? I
'm not interested in giving money to people
111 requiring me to accept
"privacy terms
" to allow myself to measure my
112 own health.
</p
>
114 <p
>As usual, if you use Bitcoin and want to show your support of my
115 activities, please send Bitcoin donations to my address
116 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
121 <title>Sharing images with friends and family using RSS and EXIF/XMP metadata
</title>
122 <link>http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html
</link>
123 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html
</guid>
124 <pubDate>Tue,
31 Jul
2018 23:
30:
00 +
0200</pubDate>
125 <description><p
>For a while now, I have looked for a sensible way to share images
126 with my family using a self hosted solution, as it is unacceptable to
127 place images from my personal life under the control of strangers
128 working for data hoarders like Google or Dropbox. The last few days I
129 have drafted an approach that might work out, and I would like to
130 share it with you. I would like to publish images on a server under
131 my control, and point some Internet connected display units using some
132 free and open standard to the images I published. As my primary
133 language is not limited to ASCII, I need to store metadata using
134 UTF-
8. Many years ago, I hoped to find a digital photo frame capable
135 of reading a RSS feed with image references (aka using the
136 &lt;enclosure
&gt; RSS tag), but was unable to find a current supplier
137 of such frames. In the end I gave up that approach.
</p
>
139 <p
>Some months ago, I discovered that
140 <a href=
"https://www.jwz.org/xscreensaver/
">XScreensaver
</a
> is able to
141 read images from a RSS feed, and used it to set up a screen saver on
142 my home info screen, showing images from the Daily images feed from
143 NASA. This proved to work well. More recently I discovered that
144 <a href=
"https://kodi.tv
">Kodi
</a
> (both using
145 <a href=
"https://www.openelec.tv/
">OpenELEC
</a
> and
146 <a href=
"https://libreelec.tv
">LibreELEC
</a
>) provide the
147 <a href=
"https://github.com/grinsted/script.screensaver.feedreader
">Feedreader
</a
>
148 screen saver capable of reading a RSS feed with images and news. For
149 fun, I used it this summer to test Kodi on my parents TV by hooking up
150 a Raspberry PI unit with LibreELEC, and wanted to provide them with a
151 screen saver showing selected pictures from my selection.
</p
>
153 <p
>Armed with motivation and a test photo frame, I set out to generate
154 a RSS feed for the Kodi instance. I adjusted my
<a
155 href=
"https://freedombox.org/
">Freedombox
</a
> instance, created
156 /var/www/html/privatepictures/, wrote a small Perl script to extract
157 title and description metadata from the photo files and generate the
158 RSS file. I ended up using Perl instead of python, as the
159 libimage-exiftool-perl Debian package seemed to handle the EXIF/XMP
160 tags I ended up using, while python3-exif did not. The relevant EXIF
161 tags only support ASCII, so I had to find better alternatives. XMP
162 seem to have the support I need.
</p
>
164 <p
>I am a bit unsure which EXIF/XMP tags to use, as I would like to
165 use tags that can be easily added/updated using normal free software
166 photo managing software. I ended up using the tags set using this
167 exiftool command, as these tags can also be set using digiKam:
</p
>
169 <blockquote
><pre
>
170 exiftool -headline=
'The RSS image title
' \
171 -description=
'The RSS image description.
' \
172 -subject+=for-family photo.jpeg
173 </pre
></blockquote
>
175 <p
>I initially tried the
"-title
" and
"keyword
" tags, but they were
176 invisible in digiKam, so I changed to
"-headline
" and
"-subject
". I
177 use the keyword/subject
'for-family
' to flag that the photo should be
178 shared with my family. Images with this keyword set are located and
179 copied into my Freedombox for the RSS generating script to find.
</p
>
181 <p
>Are there better ways to do this? Get in touch if you have better
182 suggestions.
</p
>
184 <p
>As usual, if you use Bitcoin and want to show your support of my
185 activities, please send Bitcoin donations to my address
186 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
191 <title>Simple streaming the Linux desktop to Kodi using GStreamer and RTP
</title>
192 <link>http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</link>
193 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</guid>
194 <pubDate>Thu,
12 Jul
2018 17:
55:
00 +
0200</pubDate>
195 <description><p
>Last night, I wrote
196 <a href=
"http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
">a
197 recipe to stream a Linux desktop using VLC to a instance of Kodi
</a
>.
198 During the day I received valuable feedback, and thanks to the
199 suggestions I have been able to rewrite the recipe into a much simpler
200 approach requiring no setup at all. It is a single script that take
201 care of it all.
</p
>
203 <p
>This new script uses GStreamer instead of VLC to capture the
204 desktop and stream it to Kodi. This fixed the video quality issue I
205 saw initially. It further removes the need to add a m3u file on the
206 Kodi machine, as it instead connects to
207 <a href=
"https://kodi.wiki/view/JSON-RPC_API/v8
">the JSON-RPC API in
208 Kodi
</a
> and simply ask Kodi to play from the stream created using
209 GStreamer. Streaming the desktop to Kodi now become trivial. Copy
210 the script below, run it with the DNS name or IP address of the kodi
211 server to stream to as the only argument, and watch your screen show
212 up on the Kodi screen. Note, it depend on multicast on the local
213 network, so if you need to stream outside the local network, the
214 script must be modified. Also note, I have no idea if audio work, as
215 I only care about the picture part.
</p
>
217 <blockquote
><pre
>
220 # Stream the Linux desktop view to Kodi. See
221 # http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
222 # for backgorund information.
224 # Make sure the stream is stopped in Kodi and the gstreamer process is
225 # killed if something go wrong (for example if curl is unable to find the
226 # kodi server). Do the same when interrupting this script.
230 params=
"$
3"
231 curl --silent --header
'Content-Type: application/json
' \
232 --data-binary
"{ \
"id\
":
1, \
"jsonrpc\
": \
"2.0\
", \
"method\
": \
"$cmd\
", \
"params\
": $params }
" \
233 "http://$host/jsonrpc
"
236 if [ -n
"$kodihost
" ] ; then
237 # Stop the playing when we end
238 playerid=$(kodicmd
"$kodihost
" Player.GetActivePlayers
"{}
" |
239 jq .result[].playerid)
240 kodicmd
"$kodihost
" Player.Stop
"{ \
"playerid\
" : $playerid }
" > /dev/null
242 if [
"$gstpid
" ]
&& kill -
0 "$gstpid
" >/dev/null
2>&1; then
243 kill
"$gstpid
"
246 trap cleanup EXIT INT
248 if [ -n
"$
1" ]; then
259 pasrc=$(pactl list | grep -A2
'Source #
' | grep
'Name: .*\.monitor$
' | \
260 cut -d
" " -f2|head -
1)
261 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
262 videoconvert ! queue2 ! \
263 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
264 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
265 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
266 udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=
1 sync=
0 \
267 pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
268 > /dev/null
2>&1 &
271 # Give stream a second to get going
274 # Ask kodi to start streaming using its JSON-RPC API
275 kodicmd
"$kodihost
" Player.Open \
276 "{\
"item\
": { \
"file\
": \
"udp://@$mcast:$mcastport\
" } }
" > /dev/null
278 # wait for gst to end
279 wait
"$gstpid
"
280 </pre
></blockquote
>
282 <p
>I hope you find the approach useful. I know I do.
</p
>
284 <p
>As usual, if you use Bitcoin and want to show your support of my
285 activities, please send Bitcoin donations to my address
286 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
291 <title>Streaming the Linux desktop to Kodi using VLC and RTSP
</title>
292 <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</link>
293 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</guid>
294 <pubDate>Thu,
12 Jul
2018 02:
00:
00 +
0200</pubDate>
295 <description><p
>PS: See
296 <ahref=
"http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
">the
297 followup post
</a
> for a even better approach.
</p
>
299 <p
>A while back, I was asked by a friend how to stream the desktop to
300 my projector connected to Kodi. I sadly had to admit that I had no
301 idea, as it was a task I never had tried. Since then, I have been
302 looking for a way to do so, preferable without much extra software to
303 install on either side. Today I found a way that seem to kind of
304 work. Not great, but it is a start.
</p
>
306 <p
>I had a look at several approaches, for example
307 <a href=
"https://github.com/mfoetsch/dlna_live_streaming
">using uPnP
308 DLNA as described in
2011</a
>, but it required a uPnP server, fuse and
309 local storage enough to store the stream locally. This is not going
310 to work well for me, lacking enough free space, and it would
311 impossible for my friend to get working.
</p
>
313 <p
>Next, it occurred to me that perhaps I could use VLC to create a
314 video stream that Kodi could play. Preferably using
315 broadcast/multicast, to avoid having to change any setup on the Kodi
316 side when starting such stream. Unfortunately, the only recipe I
317 could find using multicast used the rtp protocol, and this protocol
318 seem to not be supported by Kodi.
</p
>
320 <p
>On the other hand, the rtsp protocol is working! Unfortunately I
321 have to specify the IP address of the streaming machine in both the
322 sending command and the file on the Kodi server. But it is showing my
323 desktop, and thus allow us to have a shared look on the big screen at
324 the programs I work on.
</p
>
326 <p
>I did not spend much time investigating codeces. I combined the
327 rtp and rtsp recipes from
328 <a href=
"https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/
">the
329 VLC Streaming HowTo/Command Line Examples
</a
>, and was able to get
330 this working on the desktop/streaming end.
</p
>
332 <blockquote
><pre
>
333 vlc screen:// --sout \
334 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{dst=projector.local,port=
1234,sdp=rtsp://
192.168.11.4:
8080/test.sdp}
'
335 </pre
></blockquote
>
337 <p
>I ssh-ed into my Kodi box and created a file like this with the
338 same IP address:
</p
>
340 <blockquote
><pre
>
341 echo rtsp://
192.168.11.4:
8080/test.sdp \
342 > /storage/videos/screenstream.m3u
343 </pre
></blockquote
>
345 <p
>Note the
192.168.11.4 IP address is my desktops IP address. As far
346 as I can tell the IP must be hardcoded for this to work. In other
347 words, if someone elses machine is going to do the steaming, you have
348 to update screenstream.m3u on the Kodi machine and adjust the vlc
349 recipe. To get started, locate the file in Kodi and select the m3u
350 file while the VLC stream is running. The desktop then show up in my
351 big screen. :)
</p
>
353 <p
>When using the same technique to stream a video file with audio,
354 the audio quality is really bad. No idea if the problem is package
355 loss or bad parameters for the transcode. I do not know VLC nor Kodi
356 enough to tell.
</p
>
358 <p
><strong
>Update
2018-
07-
12</strong
>: Johannes Schauer send me a few
359 succestions and reminded me about an important step. The
"screen:
"
360 input source is only available once the vlc-plugin-access-extra
361 package is installed on Debian. Without it, you will see this error
362 message:
"VLC is unable to open the MRL
'screen://
'. Check the log
363 for details.
" He further found that it is possible to drop some parts
364 of the VLC command line to reduce the amount of hardcoded information.
365 It is also useful to consider using cvlc to avoid having the VLC
366 window in the desktop view. In sum, this give us this command line on
369 <blockquote
><pre
>
370 cvlc screen:// --sout \
371 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{sdp=rtsp://:
8080/}
'
372 </pre
></blockquote
>
374 <p
>and this on the Kodi end
<p
>
376 <blockquote
><pre
>
377 echo rtsp://
192.168.11.4:
8080/ \
378 > /storage/videos/screenstream.m3u
379 </pre
></blockquote
>
381 <p
>Still bad image quality, though. But I did discover that streaming
382 a DVD using dvdsimple:///dev/dvd as the source had excellent video and
383 audio quality, so I guess the issue is in the input or transcoding
384 parts, not the rtsp part. I
've tried to change the vb and ab
385 parameters to use more bandwidth, but it did not make a
386 difference.
</p
>
388 <p
>I further received a suggestion from Einar Haraldseid to try using
389 gstreamer instead of VLC, and this proved to work great! He also
390 provided me with the trick to get Kodi to use a multicast stream as
391 its source. By using this monstrous oneliner, I can stream my desktop
392 with good video quality in reasonable framerate to the
239.255.0.1
393 multicast address on port
1234:
395 <blockquote
><pre
>
396 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
397 videoconvert ! queue2 ! \
398 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
399 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
400 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
401 udpsink host=
239.255.0.1 port=
1234 ttl-mc=
1 auto-multicast=
1 sync=
0 \
402 pulsesrc device=$(pactl list | grep -A2
'Source #
' | \
403 grep
'Name: .*\.monitor$
' | cut -d
" " -f2|head -
1) ! \
404 audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
405 </pre
></blockquote
>
407 <p
>and this on the Kodi end
<p
>
409 <blockquote
><pre
>
410 echo udp://@
239.255.0.1:
1234 \
411 > /storage/videos/screenstream.m3u
412 </pre
></blockquote
>
414 <p
>Note the trick to pick a valid pulseaudio source. It might not
415 pick the one you need. This approach will of course lead to trouble
416 if more than one source uses the same multicast port and address.
417 Note the ttl-mc=
1 setting, which limit the multicast packages to the
418 local network. If the value is increased, your screen will be
419 broadcasted further, one network
"hop
" for each increase (read up on
420 multicast to learn more. :)!
</p
>
422 <p
>Having cracked how to get Kodi to receive multicast streams, I
423 could use this VLC command to stream to the same multicast address.
424 The image quality is way better than the rtsp approach, but gstreamer
425 seem to be doing a better job.
</p
>
427 <blockquote
><pre
>
428 cvlc screen:// --sout
'#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{mux=ts,dst=
239.255.0.1,port=
1234,sdp=sap}
'
429 </pre
></blockquote
>
431 <p
>As usual, if you use Bitcoin and want to show your support of my
432 activities, please send Bitcoin donations to my address
433 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
438 <title>What is the most supported MIME type in Debian in
2018?
</title>
439 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</link>
440 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</guid>
441 <pubDate>Mon,
9 Jul
2018 08:
05:
00 +
0200</pubDate>
442 <description><p
>Five years ago,
443 <a href=
"http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
">I
444 measured what the most supported MIME type in Debian was
</a
>, by
445 analysing the desktop files in all packages in the archive. Since
446 then, the DEP-
11 AppStream system has been put into production, making
447 the task a lot easier. This made me want to repeat the measurement,
448 to see how much things changed. Here are the new numbers, for
449 unstable only this time:
451 <p
><strong
>Debian Unstable:
</strong
></p
>
455 ----- -----------------------
467 30 audio/x-vorbis+ogg
468 29 image/x-portable-pixmap
470 27 image/x-portable-bitmap
478 <p
>The list was created like this using a sid chroot:
"cat
479 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk
'/^
480 - \S+\/\S+$/ {print $
2 }
' | sort | uniq -c | sort -nr | head -
20"</p
>
482 <p
>It is interesting to see how image formats have passed text/plain
483 as the most announced supported MIME type. These days, thanks to the
484 AppStream system, if you run into a file format you do not know, and
485 want to figure out which packages support the format, you can find the
486 MIME type of the file using
"file --mime
&lt;filename
&gt;
", and then
487 look up all packages announcing support for this format in their
488 AppStream metadata (XML or .desktop file) using
"appstreamcli
489 what-provides mimetype
&lt;mime-type
&gt;. For example if you, like
490 me, want to know which packages support inode/directory, you can get a
491 list like this:
</p
>
493 <p
><blockquote
><pre
>
494 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
501 Package: doublecmd-common
503 Package: enlightenment
523 </pre
></blockquote
></p
>
525 <p
>Using the same method, I can quickly discover that the Sketchup file
526 format is not yet supported by any package in Debian:
</p
>
528 <p
><blockquote
><pre
>
529 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
530 Could not find component providing
'mimetype::application/vnd.sketchup.skp
'.
532 </pre
></blockquote
></p
>
534 <p
>Yesterday I used it to figure out which packages support the STL
3D
537 <p
><blockquote
><pre
>
538 % appstreamcli what-provides mimetype application/sla|grep Package
543 </pre
></blockquote
></p
>
545 <p
>PS: A new version of Cura was uploaded to Debian yesterday.
</p
>
547 <p
>As usual, if you use Bitcoin and want to show your support of my
548 activities, please send Bitcoin donations to my address
549 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
554 <title>Debian APT upgrade without enough free space on the disk...
</title>
555 <link>http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</link>
556 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</guid>
557 <pubDate>Sun,
8 Jul
2018 12:
10:
00 +
0200</pubDate>
558 <description><p
>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
559 for a while, and when I need to update it there is not enough free
560 space on the disk for apt to do a normal
'apt upgrade
'. I normally
561 would resolve the issue by doing
'apt install
&lt;somepackages
&gt;
' to
562 upgrade only some of the packages in one batch, until the amount of
563 packages to download fall below the amount of free space available.
564 Today, I had about
500 packages to upgrade, and after a while I got
565 tired of trying to install chunks of packages manually. I concluded
566 that I did not have the spare hours required to complete the task, and
567 decided to see if I could automate it. I came up with this small
568 script which I call
'apt-in-chunks
':
</p
>
570 <p
><blockquote
><pre
>
573 # Upgrade packages when the disk is too full to upgrade every
574 # upgradable package in one lump. Fetching packages to upgrade using
575 # apt, and then installing using dpkg, to avoid changing the package
576 # flag for manual/automatic.
581 if [
"$
1" ]; then
582 grep -v
"$
1"
588 for p in $(apt list --upgradable | ignore
"$@
" |cut -d/ -f1 | grep -v
'^Listing...
'); do
589 echo
"Upgrading $p
"
591 apt install --download-only -y $p
592 for f in /var/cache/apt/archives/*.deb; do
593 if [ -e
"$f
" ]; then
594 dpkg -i /var/cache/apt/archives/*.deb
599 </pre
></blockquote
></p
>
601 <p
>The script will extract the list of packages to upgrade, try to
602 download the packages needed to upgrade one package, install the
603 downloaded packages using dpkg. The idea is to upgrade packages
604 without changing the APT mark for the package (ie the one recording of
605 the package was manually requested or pulled in as a dependency). To
606 use it, simply run it as root from the command line. If it fail, try
607 'apt install -f
' to clean up the mess and run the script again. This
608 might happen if the new packages conflict with one of the old
609 packages. dpkg is unable to remove, while apt can do this.
</p
>
611 <p
>It take one option, a package to ignore in the list of packages to
612 upgrade. The option to ignore a package is there to be able to skip
613 the packages that are simply too large to unpack. Today this was
614 'ghc
', but I have run into other large packages causing similar
615 problems earlier (like TeX).
</p
>
617 <p
>Update
2018-
07-
08: Thanks to Paul Wise, I am aware of two
618 alternative ways to handle this. The
"unattended-upgrades
619 --minimal-upgrade-steps
" option will try to calculate upgrade sets for
620 each package to upgrade, and then upgrade them in order, smallest set
621 first. It might be a better option than my above mentioned script.
622 Also,
"aptutude upgrade
" can upgrade single packages, thus avoiding
623 the need for using
"dpkg -i
" in the script above.
</p
>
625 <p
>As usual, if you use Bitcoin and want to show your support of my
626 activities, please send Bitcoin donations to my address
627 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
632 <title>The worlds only stone power plant?
</title>
633 <link>http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</link>
634 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</guid>
635 <pubDate>Sat,
30 Jun
2018 10:
35:
00 +
0200</pubDate>
636 <description><p
>So far, at least hydro-electric power, coal power, wind power,
637 solar power, and wood power are well known. Until a few days ago, I
638 had never heard of stone power. Then I learn about a quarry in a
640 <a href=
"https://en.wikipedia.org/wiki/Bremanger
">Bremanger
</a
> i
642 <a href=
"https://www.bontrup.com/en/activities/raw-materials/bremanger-quarry/
">the
643 Bremanger Quarry
</a
> company is extracting stone and dumping the stone
644 into a shaft leading to its shipping harbour. This downward movement
645 in this shaft is used to produce electricity. In short, it is using
646 falling rocks instead of falling water to produce electricity, and
647 according to its own statements it is producing more power than it is
648 using, and selling the surplus electricity to the Norwegian power
649 grid. I find the concept truly amazing. Is this the worlds only
650 stone power plant?
</p
>
652 <p
>As usual, if you use Bitcoin and want to show your support of my
653 activities, please send Bitcoin donations to my address
654 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
659 <title>Add-on to control the projector from within Kodi
</title>
660 <link>http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html
</link>
661 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html
</guid>
662 <pubDate>Tue,
26 Jun
2018 23:
55:
00 +
0200</pubDate>
663 <description><p
>My movie playing setup involve
<a href=
"https://kodi.tv/
">Kodi
</a
>,
664 <a href=
"https://openelec.tv
">OpenELEC
</a
> (probably soon to be
665 replaced with
<a href=
"https://libreelec.tv/
">LibreELEC
</a
>) and an
666 Infocus IN76 video projector. My projector can be controlled via both
667 a infrared remote controller, and a RS-
232 serial line. The vendor of
668 my projector,
<a href=
"https://www.infocus.com/
">InFocus
</a
>, had been
669 sensible enough to document the serial protocol in its user manual, so
670 it is easily available, and I used it some years ago to write
671 <a href=
"https://github.com/petterreinholdtsen/infocus-projector-control
">a
672 small script to control the projector
</a
>. For a while now, I longed
673 for a setup where the projector was controlled by Kodi, for example in
674 such a way that when the screen saver went on, the projector was
675 turned off, and when the screen saver exited, the projector was turned
678 <p
>A few days ago, with very good help from parts of my family, I
679 managed to find a Kodi Add-on for controlling a Epson projector, and
680 got in touch with its author to see if we could join forces and make a
681 Add-on with support for several projectors. To my pleasure, he was
682 positive to the idea, and we set out to add InFocus support to his
683 add-on, and make the add-on suitable for the official Kodi add-on
684 repository.
</p
>
686 <p
>The Add-on is now working (for me, at least), with a few minor
687 adjustments. The most important change I do relative to the master
688 branch in the github repository is embedding the
689 <a href=
"https://github.com/pyserial/pyserial
">pyserial module
</a
> in
690 the add-on. The long term solution is to make a
"script
" type
691 pyserial module for Kodi, that can be pulled in as a dependency in
692 Kodi. But until that in place, I embed it.
</p
>
694 <p
>The add-on can be configured to turn on the projector when Kodi
695 starts, off when Kodi stops as well as turn the projector off when the
696 screensaver start and on when the screesaver stops. It can also be
697 told to set the projector source when turning on the projector.
699 <p
>If this sound interesting to you, check out
700 <a href=
"https://github.com/fredrik-eriksson/kodi_projcontrol
">the
701 project github repository
</a
>. Perhaps you can send patches to
702 support your projector too? As soon as we find time to wrap up the
703 latest changes, it should be available for easy installation using any
704 Kodi instance.
</p
>
706 <p
>For future improvements, I would like to add projector model
707 detection and the ability to adjust the brightness level of the
708 projector from within Kodi. We also need to figure out how to handle
709 the cooling period of the projector. My projector refuses to turn on
710 for
60 seconds after it was turned off. This is not handled well by
711 the add-on at the moment.
</p
>
713 <p
>As usual, if you use Bitcoin and want to show your support of my
714 activities, please send Bitcoin donations to my address
715 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>