]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Fikk plakat. :)
[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>https://people.skolelinux.org/pere/blog/</link>
7 <atom:link href="https://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
8
9 <item>
10 <title>What did I learn from OpenSnitch this summer?</title>
11 <link>https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html</link>
12 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html</guid>
13 <pubDate>Sun, 11 Jun 2023 08:30:00 +0200</pubDate>
14 <description>&lt;p&gt;With yesterdays
15 &lt;a href=&quot;https://www.debian.org/News/2023/20230610&quot;&gt;release of Debian
16 12 Bookworm&lt;/a&gt;, I am happy to know the
17 &lt;a href=&quot;https://tracker.debian.org/pkg/opensnitch&quot;&gt;the interactive
18 application firewall OpenSnitch&lt;/a&gt; is available for a wider audience.
19 I have been running it for a few weeks now, and have been surprised
20 about some of the programs connecting to the Internet. Some programs
21 are obviously calling out from my machine, like the NTP network based
22 clock adjusting system and Tor to reach other Tor clients, but others
23 were more dubious. For example, the KDE Window manager try to look up
24 the host name in DNS, for no apparent reason, but if this lookup is
25 blocked the KDE desktop get periodically stuck when I use it. Another
26 surprise was how much Firefox call home directly to mozilla.com,
27 mozilla.net and googleapis.com, to mention a few, when I visit other
28 web pages. This direct connection happen even if I told Firefox to
29 always use a proxy, and the proxy setting is ignored for this traffic.
30 Other surprising connections come from audacity and dirmngr (I do not
31 use Gnome). It took some trial and error to get a good default set of
32 permissions. Without it, I would get popups asking for permissions at
33 any time, also the most inconvenient ones where I am in the middle of
34 a time sensitive gaming session.&lt;/p&gt;
35
36 &lt;p&gt;I suspect some application developers should rethink when then need
37 to use network connections or DNS lookups, and recommend testing
38 OpenSnitch (only &lt;tt&gt;apt install opensnitch&lt;/tt&gt; away in Debian
39 Bookworm) to locate and report any surprising Internet connections on
40 your desktop machine.&lt;/p&gt;
41
42 &lt;p&gt;At the moment the upstream developer and Debian package maintainer
43 is working on making the system more reliable in Debian, by enabling
44 the eBPF kernel module to track processes and connections instead of
45 depending in content in /proc/. This should enter unstable fairly
46 soon.&lt;/p&gt;
47
48 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
49 activities, please send Bitcoin donations to my address
50 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
51 </description>
52 </item>
53
54 <item>
55 <title>wmbusmeters, parse data from your utility meter - nice free software</title>
56 <link>https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html</link>
57 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html</guid>
58 <pubDate>Fri, 19 May 2023 21:50:00 +0200</pubDate>
59 <description>&lt;p&gt;There is a European standard for reading utility meters like water,
60 gas, electricity or heat distribution meters. The
61 &lt;a href=&quot;https://en.wikipedia.org/wiki/Meter-Bus&quot;&gt;Meter-Bus standard
62 (EN 13757-2, EN 13757-3 and EN 137574)&lt;/a&gt; provide a cross vendor way
63 to talk to and collect meter data. I ran into this standard when I
64 wanted to monitor some heat distribution meters, and managed to find
65 free software that could do the job. The meters in question broadcast
66 encrypted messages with meter information via radio, and the hardest
67 part was to track down the encryption keys from the vendor. With this
68 in place I could set up a MQTT gateway to submit the meter data for
69 graphing.&lt;/p&gt;
70
71 &lt;p&gt;The free software systems in question,
72 &lt;a href=&quot;https://tracker.debian.org/pkg/rtl-wmbus&quot;&gt;rtl-wmbus&lt;/a&gt; to
73 read the messages from a software defined radio, and
74 &lt;a href=&quot;https://tracker.debian.org/pkg/wmbusmeters&quot;&gt;wmbusmeters&lt;/a&gt; to
75 decrypt and decode the content of the messages, is working very well
76 and allowe me to get frequent updates from my meters. I got in touch
77 with upstream last year to see if there was any interest in publishing
78 the packages via Debian. I was very happy to learn that Fredrik
79 Öhrström volunteered to maintain the packages, and I have since
80 assisted him in getting Debian package build rules in place as well as
81 sponsoring the packages into the Debian archive. Sadly we completed
82 it too late for them to become part of the next stable Debian release
83 (Bookworm). The wmbusmeters package just cleared the NEW queue. It
84 will need some work to fix a built problem, but I expect Fredrik will
85 find a solution soon.&lt;/p&gt;
86
87 &lt;p&gt;If you got a infrastructure meter supporting the Meter Bus
88 standard, I strongly recommend having a look at these nice
89 packages.&lt;/p&gt;
90
91 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
92 activities, please send Bitcoin donations to my address
93 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
94 </description>
95 </item>
96
97 <item>
98 <title>The 2023 LinuxCNC Norwegian developer gathering</title>
99 <link>https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html</link>
100 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html</guid>
101 <pubDate>Sun, 14 May 2023 20:30:00 +0200</pubDate>
102 <description>&lt;p&gt;The LinuxCNC project is making headway these days. A lot of
103 patches and issues have seen activity on
104 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/&quot;&gt;the project github
105 pages&lt;/a&gt; recently. A few weeks ago there was a developer gathering
106 over at the &lt;a href=&quot;https://tormach.com/&quot;&gt;Tormach&lt;/a&gt; headquarter in
107 Wisconsin, and now we are planning a new gathering in Norway. If you
108 wonder what LinuxCNC is, lets quote Wikipedia:&lt;/p&gt;
109
110 &lt;blockquote&gt;
111 &quot;LinuxCNC is a software system for numerical control of
112 machines such as milling machines, lathes, plasma cutters, routers,
113 cutting machines, robots and hexapods. It can control up to 9 axes or
114 joints of a CNC machine using G-code (RS-274NGC) as input. It has
115 several GUIs suited to specific kinds of usage (touch screen,
116 interactive development).&quot;
117 &lt;/blockquote&gt;
118
119 &lt;p&gt;The Norwegian developer gathering take place the weekend June 16th
120 to 18th this year, and is open for everyone interested in contributing
121 to LinuxCNC. Up to date information about the gathering can be found
122 in
123 &lt;a href=&quot;https://sourceforge.net/p/emc/mailman/emc-developers/thread/sa64jp06nob.fsf%40hjemme.reinholdtsen.name/#msg37837251&quot;&gt;the
124 developer mailing list thread&lt;/a&gt; where the gathering was announced.
125 Thanks to the good people at
126 &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt;,
127 &lt;a href=&quot;https://www.redpill-linpro.com/&quot;&gt;Redpill-Linpro&lt;/a&gt; and
128 &lt;a href=&quot;https://www.nuugfoundation.no/no/&quot;&gt;NUUG Foundation&lt;/a&gt;, we
129 have enough sponsor funds to pay for food, and shelter for the people
130 traveling from afar to join us. If you would like to join the
131 gathering, get in touch.&lt;/p&gt;
132
133 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
134 activities, please send Bitcoin donations to my address
135 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
136 </description>
137 </item>
138
139 <item>
140 <title>OpenSnitch in Debian ready for prime time</title>
141 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html</link>
142 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html</guid>
143 <pubDate>Sat, 13 May 2023 12:10:00 +0200</pubDate>
144 <description>&lt;p&gt;A bit delayed,
145 &lt;a href=&quot;https://tracker.debian.org/pkg/opensnitch&quot;&gt;the interactive
146 application firewall OpenSnitch&lt;/a&gt; package in Debian now got the
147 latest fixes ready for Debian Bookworm. Because it depend on a
148 package missing on some architectures, the autopkgtest check of the
149 testing migration script did not understand that the tests were
150 actually working, so the migration was delayed. A bug in the package
151 dependencies is also fixed, so those installing the firewall package
152 (opensnitch) now also get the GUI admin tool (python3-opensnitch-ui)
153 installed by default. I am very grateful to Gustavo Iñiguez Goya for
154 his work on getting the package ready for Debian Bookworm.&lt;/p&gt;
155
156 &lt;p&gt;Armed with this package I have discovered some surprising
157 connections from programs I believed were able to work completly
158 offline, and it has already proven its worth, at least to me. If you
159 too want to get more familiar with the kind of programs using
160 Internett connections on your machine, I recommend testing &lt;tt&gt;apt
161 install opensnitch&lt;/tt&gt; in Bookworm and see what you think.&lt;/p&gt;
162
163 &lt;p&gt;The package is still not able to build its eBPF module within
164 Debian. Not sure how much work it would be to get it working, but
165 suspect some kernel related packages need to be extended with more
166 header files to get it working.&lt;/p&gt;
167
168 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
169 activities, please send Bitcoin donations to my address
170 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
171 </description>
172 </item>
173
174 <item>
175 <title>Speech to text, she APTly whispered, how hard can it be?</title>
176 <link>https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html</link>
177 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html</guid>
178 <pubDate>Sun, 23 Apr 2023 09:40:00 +0200</pubDate>
179 <description>&lt;p&gt;While visiting a convention during Easter, it occurred to me that
180 it would be great if I could have a digital Dictaphone with
181 transcribing capabilities, providing me with texts to cut-n-paste into
182 stuff I need to write. The background is that long drives often bring
183 up the urge to write on texts I am working on, which of course is out
184 of the question while driving. With the release of
185 &lt;a href=&quot;https://github.com/openai/whisper/&quot;&gt;OpenAI Whisper&lt;/a&gt;, this
186 seem to be within reach with Free Software, so I decided to give it a
187 go. OpenAI Whisper is a Linux based neural network system to read in
188 audio files and provide text representation of the speech in that
189 audio recording. It handle multiple languages and according to its
190 creators even can translate into a different language than the spoken
191 one. I have not tested the latter feature. It can either use the CPU
192 or a GPU with CUDA support. As far as I can tell, CUDA in practice
193 limit that feature to NVidia graphics cards. I have few of those, as
194 they do not work great with free software drivers, and have not tested
195 the GPU option. While looking into the matter, I did discover some
196 work to provide CUDA support on non-NVidia GPUs, and some work with
197 the library used by Whisper to port it to other GPUs, but have not
198 spent much time looking into GPU support yet. I&#39;ve so far used an old
199 X220 laptop as my test machine, and only transcribed using its
200 CPU.&lt;/p&gt;
201
202 &lt;p&gt;As it from a privacy standpoint is unthinkable to use computers
203 under control of someone else (aka a &quot;cloud&quot; service) to transcribe
204 ones thoughts and personal notes, I want to run the transcribing
205 system locally on my own computers. The only sensible approach to me
206 is to make the effort I put into this available for any Linux user and
207 to upload the needed packages into Debian. Looking at Debian Bookworm, I
208 discovered that only three packages were missing,
209 &lt;a href=&quot;https://bugs.debian.org/1034307&quot;&gt;tiktoken&lt;/a&gt;,
210 &lt;a href=&quot;https://bugs.debian.org/1034144&quot;&gt;triton&lt;/a&gt;, and
211 &lt;a href=&quot;https://bugs.debian.org/1034091&quot;&gt;openai-whisper&lt;/a&gt;. For a while
212 I also believed
213 &lt;a href=&quot;https://bugs.debian.org/1034286&quot;&gt;ffmpeg-python&lt;/a&gt; was
214 needed, but as its
215 &lt;a href=&quot;https://github.com/kkroening/ffmpeg-python/issues/760&quot;&gt;upstream
216 seem to have vanished&lt;/a&gt; I found it safer
217 &lt;a href=&quot;https://github.com/openai/whisper/pull/1242&quot;&gt;to rewrite
218 whisper&lt;/a&gt; to stop depending on in than to introduce ffmpeg-python
219 into Debian. I decided to place these packages under the umbrella of
220 &lt;a href=&quot;https://salsa.debian.org/deeplearning-team&quot;&gt;the Debian Deep
221 Learning Team&lt;/a&gt;, which seem like the best team to look after such
222 packages. Discussing the topic within the group also made me aware
223 that the triton package was already a future dependency of newer
224 versions of the torch package being planned, and would be needed after
225 Bookworm is released.&lt;/p&gt;
226
227 &lt;p&gt;All required code packages have been now waiting in
228 &lt;a href=&quot;https://ftp-master.debian.org/new.html&quot;&gt;the Debian NEW
229 queue&lt;/a&gt; since Wednesday, heading for Debian Experimental until
230 Bookworm is released. An unsolved issue is how to handle the neural
231 network models used by Whisper. The default behaviour of Whisper is
232 to require Internet connectivity and download the model requested to
233 &lt;tt&gt;~/.cache/whisper/&lt;/tt&gt; on first invocation. This obviously would
234 fail &lt;a href=&quot;https://people.debian.org/~bap/dfsg-faq.html&quot;&gt;the
235 deserted island test of free software&lt;/a&gt; as the Debian packages would
236 be unusable for someone stranded with only the Debian archive and solar
237 powered computer on a deserted island.&lt;/p&gt;
238
239 &lt;p&gt;Because of this, I would love to include the models in the Debian
240 mirror system. This is problematic, as the models are very large
241 files, which would put a heavy strain on the Debian mirror
242 infrastructure around the globe. The strain would be even higher if
243 the models change often, which luckily as far as I can tell they do
244 not. The small model, which according to its creator is most useful
245 for English and in my experience is not doing a great job there
246 either, is 462 MiB (deb is 414 MiB). The medium model, which to me
247 seem to handle English speech fairly well is 1.5 GiB (deb is 1.3 GiB)
248 and the large model is 2.9 GiB (deb is 2.6 GiB). I would assume
249 everyone with enough resources would prefer to use the large model for
250 highest quality. I believe the models themselves would have to go
251 into the non-free part of the Debian archive, as they are not really
252 including any useful source code for updating the models. The
253 &quot;source&quot;, aka the model training set, according to the creators
254 consist of &quot;680,000 hours of multilingual and multitask supervised
255 data collected from the web&quot;, which to me reads material with both
256 unknown copyright terms, unavailable to the general public. In other
257 words, the source is not available according to the Debian Free
258 Software Guidelines and the model should be considered non-free.&lt;/p&gt;
259
260 &lt;p&gt;I asked the Debian FTP masters for advice regarding uploading a
261 model package on their IRC channel, and based on the feedback there it
262 is still unclear to me if such package would be accepted into the
263 archive. In any case I wrote build rules for a
264 &lt;a href=&quot;https://salsa.debian.org/deeplearning-team/openai-whisper-model&quot;&gt;OpenAI
265 Whisper model package&lt;/a&gt; and
266 &lt;a href=&quot;https://github.com/openai/whisper/pull/1257&quot;&gt;modified the
267 Whisper code base&lt;/a&gt; to prefer shared files under &lt;tt&gt;/usr/&lt;/tt&gt; and
268 &lt;tt&gt;/var/&lt;/tt&gt; over user specific files in &lt;tt&gt;~/.cache/whisper/&lt;/tt&gt;
269 to be able to use these model packages, to prepare for such
270 possibility. One solution might be to include only one of the models
271 (small or medium, I guess) in the Debian archive, and ask people to
272 download the others from the Internet. Not quite sure what to do
273 here, and advice is most welcome (use the debian-ai mailing list).&lt;/p&gt;
274
275 &lt;p&gt;To make it easier to test the new packages while I wait for them to
276 clear the NEW queue, I created an APT source targeting bookworm. I
277 selected Bookworm instead of Bullseye, even though I know the latter
278 would reach more users, is that some of the required dependencies are
279 missing from Bullseye and I during this phase of testing did not want
280 to backport a lot of packages just to get up and running.&lt;/p&gt;
281
282 &lt;p&gt;Here is a recipe to run as user root if you want to test OpenAI
283 Whisper using Debian packages on your Debian Bookworm installation,
284 first adding the APT repository GPG key to the list of trusted keys,
285 then setting up the APT repository and finally installing the packages
286 and one of the models:&lt;/p&gt;
287
288 &lt;p&gt;&lt;pre&gt;
289 curl https://geekbay.nuug.no/~pere/openai-whisper/D78F5C4796F353D211B119E28200D9B589641240.asc \
290 -o /etc/apt/trusted.gpg.d/pere-whisper.asc
291 mkdir -p /etc/apt/sources.list.d
292 cat &gt; /etc/apt/sources.list.d/pere-whisper.list &amp;lt;&amp;lt;EOF
293 deb https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
294 deb-src https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
295 EOF
296 apt update
297 apt install openai-whisper
298 &lt;/pre&gt;&lt;/p&gt;
299
300 &lt;p&gt;The package work for me, but have not yet been tested on any other
301 computer than my own. With it, I have been able to (badly) transcribe
302 a 2 minute 40 second Norwegian audio clip to test using the small
303 model. This took 11 minutes and around 2.2 GiB of RAM. Transcribing
304 the same file with the medium model gave a accurate text in 77 minutes
305 using around 5.2 GiB of RAM. My test machine had too little memory to
306 test the large model, which I believe require 11 GiB of RAM. In
307 short, this now work for me using Debian packages, and I hope it will
308 for you and everyone else once the packages enter Debian.&lt;/p&gt;
309
310 &lt;p&gt;Now I can start on the audio recording part of this project.&lt;/p&gt;
311
312 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
313 activities, please send Bitcoin donations to my address
314 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
315 </description>
316 </item>
317
318 <item>
319 <title>rtlsdr-scanner, software defined radio frequency scanner for Linux - nice free software</title>
320 <link>https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html</link>
321 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html</guid>
322 <pubDate>Fri, 7 Apr 2023 23:10:00 +0200</pubDate>
323 <description>&lt;p&gt;Today I finally found time to track down a useful radio frequency
324 scanner for my software defined radio. Just for fun I tried to locate
325 the radios used in the areas, and a good start would be to scan all
326 the frequencies to see what is in use. I&#39;ve tried to find a useful
327 program earlier, but ran out of time before I managed to find a useful
328 tool. This time I was more successful, and after a few false leads I
329 found a description of
330 &lt;a href=&quot;https://www.kali.org/tools/rtlsdr-scanner/&quot;&gt;rtlsdr-scanner
331 over at the Kali site&lt;/a&gt;, and was able to track down
332 &lt;a href=&quot;https://gitlab.com/kalilinux/packages/rtlsdr-scanner.git&quot;&gt;the
333 Kali package git repository&lt;/a&gt; to build a deb package for the
334 scanner. Sadly the package is missing from the Debian project itself,
335 at least in Debian Bullseye. Two runtime dependencies,
336 &lt;a href=&quot;https://gitlab.com/kalilinux/packages/python-visvis.git&quot;&gt;python-visvis&lt;/a&gt;
337 and
338 &lt;a href=&quot;https://gitlab.com/kalilinux/packages/python-rtlsdr.git&quot;&gt;python-rtlsdr&lt;/a&gt;
339 had to be built and installed separately. Luckily &#39;&lt;tt&gt;gbp
340 buildpackage&lt;/tt&gt;&#39; handled them just fine and no further packages had
341 to be manually built. The end result worked out of the box after
342 installation.&lt;/p&gt;
343
344 &lt;p&gt;My initial scans for FM channels worked just fine, so I knew the
345 scanner was functioning. But when I tried to scan every frequency
346 from 100 to 1000 MHz, the program stopped unexpectedly near the
347 completion. After some debugging I discovered USB software radio I
348 used rejected frequencies above 948 MHz, triggering a unreported
349 exception breaking the scan. Changing the scan to end at 957 worked
350 better. I similarly found the lower limit to be around 15, and ended
351 up with the following full scan:&lt;/p&gt;
352
353 &lt;p&gt;&lt;a href=&quot;https://people.skolelinux.org/pere/blog/images/2023-04-07-radio-freq-scanning.png&quot;&gt;&lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2023-04-07-radio-freq-scanning.png&quot; width=&quot;100%&quot;&gt;&lt;/a&gt;&lt;/p&gt;
354
355 &lt;p&gt;Saving the scan did not work, but exporting it as a CSV file worked
356 just fine. I ended up with around 477k CVS lines with dB level for
357 the given frequency.&lt;/p&gt;
358
359 &lt;p&gt;The save failure seem to be a missing UTF-8 encoding issue in the
360 python code. Will see if I can find time to send a patch
361 &lt;a href=&quot;https://github.com/CdeMills/RTLSDR-Scanner/&quot;&gt;upstream&lt;/a&gt;
362 later to fix this exception:&lt;/p&gt;
363
364 &lt;pre&gt;
365 Traceback (most recent call last):
366 File &quot;/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py&quot;, line 485, in __on_save
367 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
368 File &quot;/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py&quot;, line 408, in save_plot
369 handle.write(json.dumps(data, indent=4))
370 TypeError: a bytes-like object is required, not &#39;str&#39;
371 Traceback (most recent call last):
372 File &quot;/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py&quot;, line 485, in __on_save
373 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
374 File &quot;/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py&quot;, line 408, in save_plot
375 handle.write(json.dumps(data, indent=4))
376 TypeError: a bytes-like object is required, not &#39;str&#39;
377 &lt;/pre&gt;
378
379 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
380 activities, please send Bitcoin donations to my address
381 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
382 </description>
383 </item>
384
385 <item>
386 <title>OpenSnitch available in Debian Sid and Bookworm</title>
387 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html</link>
388 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html</guid>
389 <pubDate>Sat, 25 Feb 2023 20:30:00 +0100</pubDate>
390 <description>&lt;p&gt;Thanks to the efforts of the OpenSnitch lead developer Gustavo
391 Iñiguez Goya allowing me to sponsor the upload,
392 &lt;a href=&quot;https://tracker.debian.org/pkg/opensnitch&quot;&gt;the interactive
393 application firewall OpenSnitch&lt;/a&gt; is now available in Debian
394 Testing, soon to become the next stable release of Debian.&lt;/p&gt;
395
396 &lt;p&gt;This is a package which set up a network firewall on one or more
397 machines, which is controlled by a graphical user interface that will
398 ask the user if a program should be allowed to connect to the local
399 network or the Internet. If some background daemon is trying to dial
400 home, it can be blocked from doing so with a simple mouse click, or by
401 default simply by not doing anything when the GUI question dialog pop
402 up. A list of all programs discovered using the network is provided
403 in the GUI, giving the user an overview of how the machine(s) programs
404 use the network.&lt;/p&gt;
405
406 &lt;p&gt;OpenSnitch was uploaded for NEW processing about a month ago, and I
407 had little hope of it getting accepted and shaping up in time for the
408 package freeze, but the Debian ftpmasters proved to be amazingly quick
409 at checking out the package and it was accepted into the archive about
410 week after the first upload. It is now team maintained under the Go
411 language team umbrella. A few fixes to the default setup is only in
412 Sid, and should migrate to Testing/Bookworm in a week.&lt;/p&gt;
413
414 &lt;p&gt;During testing I ran into an
415 &lt;a href=&quot;https://github.com/evilsocket/opensnitch/issues/813&quot;&gt;issue
416 with Minecraft server broadcasts disappearing&lt;/a&gt;, which was quickly
417 resolved by the developer with a patch and a proposed configuration
418 change. I&#39;ve been told this was caused by the Debian packages default
419 use if /proc/ information to track down kernel status, instead of the
420 newer eBPF module that can be used. The reason is simply that
421 upstream and I have failed to find a way to build the eBPF modules for
422 OpenSnitch without a complete configured Linux kernel source tree,
423 which as far as we can tell is unavailable as a build dependency in
424 Debian. We tried unsuccessfully so far to use the kernel-headers
425 package. It would be great if someone could provide some clues how to
426 build eBPF modules on build daemons in Debian, possibly without the full
427 kernel source.&lt;/p&gt;
428
429 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
430 activities, please send Bitcoin donations to my address
431 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
432 </description>
433 </item>
434
435 <item>
436 <title>Is the desktop recommending your program for opening its files?</title>
437 <link>https://people.skolelinux.org/pere/blog/Is_the_desktop_recommending_your_program_for_opening_its_files_.html</link>
438 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Is_the_desktop_recommending_your_program_for_opening_its_files_.html</guid>
439 <pubDate>Sun, 29 Jan 2023 11:00:00 +0100</pubDate>
440 <description>&lt;p&gt;Linux desktop systems
441 &lt;a href=&quot;https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html&quot;&gt;have
442 standardized&lt;/a&gt; how programs present themselves to the desktop
443 system. If a package include a .desktop file in
444 /usr/share/applications/, Gnome, KDE, LXDE, Xfce and the other desktop
445 environments will pick up the file and use its content to generate the
446 menu of available programs in the system. A lesser known fact is that
447 a package can also explain to the desktop system how to recognize the
448 files created by the program in question, and use it to open these
449 files on request, for example via a GUI file browser.&lt;/p&gt;
450
451 &lt;p&gt;A while back I ran into a package that did not tell the desktop
452 system how to recognize its files and was not used to open its files
453 in the file browser and fixed it. In the process I wrote a simple
454 debian/tests/ script to ensure the setup keep working. It might be
455 useful for other packages too, to ensure any future version of the
456 package keep handling its own files.&lt;/p&gt;
457
458 &lt;p&gt;For this to work the file format need a useful MIME type that can
459 be used to identify the format. If the file format do not yet have a
460 MIME type, it should define one and preferably also
461 &lt;a href=&quot;https://www.iana.org/assignments/media-types/media-types.xhtml&quot;&gt;register
462 it with IANA&lt;/a&gt; to ensure the MIME type string is reserved.&lt;/p&gt;
463
464 &lt;p&gt;The script uses the &lt;tt&gt;xdg-mime&lt;/tt&gt; program from xdg-utils to
465 query the database of standardized package information and ensure it
466 return sensible values. It also need the location of an example file
467 for xdg-mime to guess the format of.&lt;/p&gt;
468
469 &lt;pre&gt;
470 #!/bin/sh
471 #
472 # Author: Petter Reinholdtsen
473 # License: GPL v2 or later at your choice.
474 #
475 # Validate the MIME setup, making sure motor types have
476 # application/vnd.openmotor+yaml associated with them and is connected
477 # to the openmotor desktop file.
478
479 retval=0
480
481 mimetype=&quot;application/vnd.openmotor+yaml&quot;
482 testfile=&quot;test/data/real/o3100/motor.ric&quot;
483 mydesktopfile=&quot;openmotor.desktop&quot;
484
485 filemime=&quot;$(xdg-mime query filetype &quot;$testfile&quot;)&quot;
486
487 if [ &quot;$mimetype&quot; != &quot;$filemime&quot; ] ; then
488 retval=1
489 echo &quot;error: xdg-mime claim motor file MIME type is $filemine, not $mimetype&quot;
490 else
491 echo &quot;success: xdg-mime report correct mime type $mimetype for motor file&quot;
492 fi
493
494 desktop=$(xdg-mime query default &quot;$mimetype&quot;)
495
496 if [ &quot;$mydesktopfile&quot; != &quot;$desktop&quot; ]; then
497 retval=1
498 echo &quot;error: xdg-mime claim motor file should be handled by $desktop, not $mydesktopfile&quot;
499 else
500 echo &quot;success: xdg-mime agree motor file should be handled by $mydesktopfile&quot;
501 fi
502
503 exit $retval
504 &lt;/pre&gt;
505
506 &lt;p&gt;It is a simple way to ensure your users are not very surprised when
507 they try to open one of your file formats in their file browser.&lt;/p&gt;
508
509 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
510 activities, please send Bitcoin donations to my address
511 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
512 </description>
513 </item>
514
515 <item>
516 <title>Opensnitch, the application level interactive firewall, heading into the Debian archive</title>
517 <link>https://people.skolelinux.org/pere/blog/Opensnitch__the_application_level_interactive_firewall__heading_into_the_Debian_archive.html</link>
518 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Opensnitch__the_application_level_interactive_firewall__heading_into_the_Debian_archive.html</guid>
519 <pubDate>Sun, 22 Jan 2023 23:55:00 +0100</pubDate>
520 <description>&lt;p&gt;While reading a
521 &lt;a href=&quot;https://sneak.berlin/20230115/macos-scans-your-local-files-now/&quot;&gt;blog
522 post claiming MacOS X recently started scanning local files and
523 reporting information about them to Apple&lt;/a&gt;, even on a machine where
524 all such callback features had been disabled, I came across a
525 description of the Little Snitch application for MacOS X. It seemed
526 like a very nice tool to have in the tool box, and I decided to see if
527 something similar was available for Linux.&lt;/p&gt;
528
529 &lt;p&gt;It did not take long to find
530 &lt;a href=&quot;https://github.com/evilsocket/opensnitch&quot;&gt;the OpenSnitch
531 package&lt;/a&gt;, which has been in development since 2017, and now is in
532 version 1.5.0. It has had a
533 &lt;a href=&quot;https://bugs.debian.org/909567&quot;&gt;request for Debian
534 packaging&lt;/a&gt; since 2018, but no-one completed the job so far. Just
535 for fun, I decided to see if I could help, and I was very happy to
536 discover that
537 &lt;a href=&quot;https://github.com/evilsocket/opensnitch/issues/304&quot;&gt;upstream
538 want a Debian package too&lt;/a&gt;.&lt;/p&gt;
539
540 &lt;p&gt;After struggling a bit with getting the program to run, figuring
541 out building Go programs (and a little failed detour to look at eBPF
542 builds too - help needed), I am very happy to report that I am
543 sponsoring upstream to maintain the package in Debian, and it has
544 since this morning been waiting in NEW for the ftpmasters to have a
545 look. Perhaps it can get into the archive in time for the Bookworm
546 release?&lt;/p&gt;
547
548 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
549 activities, please send Bitcoin donations to my address
550 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
551 </description>
552 </item>
553
554 <item>
555 <title>LinuxCNC MQTT publisher component</title>
556 <link>https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html</link>
557 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html</guid>
558 <pubDate>Sun, 8 Jan 2023 19:30:00 +0100</pubDate>
559 <description>&lt;p&gt;I watched &lt;a href=&quot;https://yewtu.be/watch?v=jmKUV3aNLjk&quot;&gt;a 2015
560 video from Andreas Schiffler&lt;/a&gt; the other day, where he set up
561 &lt;a href=&quot;https://linuxcnc.org/&quot;&gt;LinuxCNC&lt;/a&gt; to send status
562 information to the MQTT broker IBM Bluemix. As I also use MQTT for
563 graphing, it occured to me that a generic MQTT LinuxCNC component
564 would be useful and I set out to implement it. Today I got the first
565 draft limping along and submitted as
566 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/pull/2253&quot;&gt;a patch to the
567 LinuxCNC project&lt;/a&gt;.&lt;/p&gt;
568
569 &lt;p&gt;The simple part was setting up the MQTT publishing code in Python.
570 I already have set up other parts submitting data to my Mosquito MQTT
571 broker, so I could reuse that code. Writing a LinuxCNC component in
572 Python as new to me, but using existing examples in the code
573 repository and the extensive documentation, this was fairly straight
574 forward. The hardest part was creating a automated test for the
575 component to ensure it was working. Testing it in a simulated
576 LinuxCNC machine proved very useful, as I discovered features I needed
577 that I had not thought of yet, and adjusted the code quite a bit to
578 make it easier to test without a operational MQTT broker
579 available.&lt;/p&gt;
580
581 &lt;p&gt;The draft is ready and working, but I am unsure which LinuxCNC HAL
582 pins I should collect and publish by default (in other words, the
583 default set of information pieces published), and how to get the
584 machine name from the LinuxCNC INI file. The latter is a minor
585 detail, but I expect it would be useful in a setup with several
586 machines available. I am hoping for feedback from the experienced
587 LinuxCNC developers and users, to make the component even better
588 before it can go into the mainland LinuxCNC code base.&lt;/p&gt;
589
590 &lt;p&gt;Since I started on the MQTT component, I came across
591 &lt;a href=&quot;https://yewtu.be/watch?v=Bqa2grG0XtA&quot;&gt;another video from Kent
592 VanderVelden&lt;/a&gt; where he combine LinuxCNC with a set of screen glasses
593 controlled by a Raspberry Pi, and it occured to me that it would
594 be useful for such use cases if LinuxCNC also provided a REST API for
595 querying its status. I hope to start on such component once the MQTT
596 component is working well.&lt;/p&gt;
597
598 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
599 activities, please send Bitcoin donations to my address
600 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
601 </description>
602 </item>
603
604 </channel>
605 </rss>