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>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" />
10 <title>The
2023 LinuxCNC Norwegian developer gathering
</title>
11 <link>https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</guid>
13 <pubDate>Sun,
14 May
2023 20:
30:
00 +
0200</pubDate>
14 <description><p
>The LinuxCNC project is making headway these days. A lot of
15 patches and issues have seen activity on
16 <a href=
"https://github.com/LinuxCNC/linuxcnc/
">the project github
17 pages
</a
> recently. A few weeks ago there was a developer gathering
18 over at the
<a href=
"https://tormach.com/
">Tormach
</a
> headquarter in
19 Wisconsin, and now we are planning a new gathering in Norway. If you
20 wonder what LinuxCNC is, lets quote Wikipedia:
</p
>
23 "LinuxCNC is a software system for numerical control of
24 machines such as milling machines, lathes, plasma cutters, routers,
25 cutting machines, robots and hexapods. It can control up to
9 axes or
26 joints of a CNC machine using G-code (RS-
274NGC) as input. It has
27 several GUIs suited to specific kinds of usage (touch screen,
28 interactive development).
"
31 <p
>The Norwegian developer gathering take place the weekend June
16th
32 to
18th this year, and is open for everyone interested in contributing
33 to LinuxCNC. Up to date information about the gathering can be found
35 <a href=
"https://sourceforge.net/p/emc/mailman/emc-developers/thread/sa64jp06nob.fsf%
40hjemme.reinholdtsen.name/#msg37837251
">the
36 developer mailing list thread
</a
> where the gathering was announced.
37 Thanks to the good people at
38 <a href=
"https://www.debian.org/
">Debian
</a
>,
39 <a href=
"https://www.redpill-linpro.com/
">Redpill-Linpro
</a
> and
40 <a href=
"https://www.nuugfoundation.no/no/
">NUUG Foundation
</a
>, we
41 have enough sponsor funds to pay for food, and shelter for the people
42 traveling from afar to join us. If you would like to join the
43 gathering, get in touch.
</p
>
45 <p
>As usual, if you use Bitcoin and want to show your support of my
46 activities, please send Bitcoin donations to my address
47 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
52 <title>OpenSnitch in Debian ready for prime time
</title>
53 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</link>
54 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</guid>
55 <pubDate>Sat,
13 May
2023 12:
10:
00 +
0200</pubDate>
56 <description><p
>A bit delayed,
57 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
58 application firewall OpenSnitch
</a
> package in Debian now got the
59 latest fixes ready for Debian Bookworm. Because it depend on a
60 package missing on some architectures, the autopkgtest check of the
61 testing migration script did not understand that the tests were
62 actually working, so the migration was delayed. A bug in the package
63 dependencies is also fixed, so those installing the firewall package
64 (opensnitch) now also get the GUI admin tool (python3-opensnitch-ui)
65 installed by default. I am very grateful to Gustavo IƱiguez Goya for
66 his work on getting the package ready for Debian Bookworm.
</p
>
68 <p
>Armed with this package I have discovered some surprising
69 connections from programs I believed were able to work completly
70 offline, and it has already proven its worth, at least to me. If you
71 too want to get more familiar with the kind of programs using
72 Internett connections on your machine, I recommend testing
<tt
>apt
73 install opensnitch
</tt
> in Bookworm and see what you think.
</p
>
75 <p
>The package is still not able to build its eBPF module within
76 Debian. Not sure how much work it would be to get it working, but
77 suspect some kernel related packages need to be extended with more
78 header files to get it working.
</p
>
80 <p
>As usual, if you use Bitcoin and want to show your support of my
81 activities, please send Bitcoin donations to my address
82 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
87 <title>Speech to text, she APTly whispered, how hard can it be?
</title>
88 <link>https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html
</link>
89 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html
</guid>
90 <pubDate>Sun,
23 Apr
2023 09:
40:
00 +
0200</pubDate>
91 <description><p
>While visiting a convention during Easter, it occurred to me that
92 it would be great if I could have a digital Dictaphone with
93 transcribing capabilities, providing me with texts to cut-n-paste into
94 stuff I need to write. The background is that long drives often bring
95 up the urge to write on texts I am working on, which of course is out
96 of the question while driving. With the release of
97 <a href=
"https://github.com/openai/whisper/
">OpenAI Whisper
</a
>, this
98 seem to be within reach with Free Software, so I decided to give it a
99 go. OpenAI Whisper is a Linux based neural network system to read in
100 audio files and provide text representation of the speech in that
101 audio recording. It handle multiple languages and according to its
102 creators even can translate into a different language than the spoken
103 one. I have not tested the latter feature. It can either use the CPU
104 or a GPU with CUDA support. As far as I can tell, CUDA in practice
105 limit that feature to NVidia graphics cards. I have few of those, as
106 they do not work great with free software drivers, and have not tested
107 the GPU option. While looking into the matter, I did discover some
108 work to provide CUDA support on non-NVidia GPUs, and some work with
109 the library used by Whisper to port it to other GPUs, but have not
110 spent much time looking into GPU support yet. I
've so far used an old
111 X220 laptop as my test machine, and only transcribed using its
114 <p
>As it from a privacy standpoint is unthinkable to use computers
115 under control of someone else (aka a
"cloud
" service) to transcribe
116 ones thoughts and personal notes, I want to run the transcribing
117 system locally on my own computers. The only sensible approach to me
118 is to make the effort I put into this available for any Linux user and
119 to upload the needed packages into Debian. Looking at Debian Bookworm, I
120 discovered that only three packages were missing,
121 <a href=
"https://bugs.debian.org/
1034307">tiktoken
</a
>,
122 <a href=
"https://bugs.debian.org/
1034144">triton
</a
>, and
123 <a href=
"https://bugs.debian.org/
1034091">openai-whisper
</a
>. For a while
125 <a href=
"https://bugs.debian.org/
1034286">ffmpeg-python
</a
> was
127 <a href=
"https://github.com/kkroening/ffmpeg-python/issues/
760">upstream
128 seem to have vanished
</a
> I found it safer
129 <a href=
"https://github.com/openai/whisper/pull/
1242">to rewrite
130 whisper
</a
> to stop depending on in than to introduce ffmpeg-python
131 into Debian. I decided to place these packages under the umbrella of
132 <a href=
"https://salsa.debian.org/deeplearning-team
">the Debian Deep
133 Learning Team
</a
>, which seem like the best team to look after such
134 packages. Discussing the topic within the group also made me aware
135 that the triton package was already a future dependency of newer
136 versions of the torch package being planned, and would be needed after
137 Bookworm is released.
</p
>
139 <p
>All required code packages have been now waiting in
140 <a href=
"https://ftp-master.debian.org/new.html
">the Debian NEW
141 queue
</a
> since Wednesday, heading for Debian Experimental until
142 Bookworm is released. An unsolved issue is how to handle the neural
143 network models used by Whisper. The default behaviour of Whisper is
144 to require Internet connectivity and download the model requested to
145 <tt
>~/.cache/whisper/
</tt
> on first invocation. This obviously would
146 fail
<a href=
"https://people.debian.org/~bap/dfsg-faq.html
">the
147 deserted island test of free software
</a
> as the Debian packages would
148 be unusable for someone stranded with only the Debian archive and solar
149 powered computer on a deserted island.
</p
>
151 <p
>Because of this, I would love to include the models in the Debian
152 mirror system. This is problematic, as the models are very large
153 files, which would put a heavy strain on the Debian mirror
154 infrastructure around the globe. The strain would be even higher if
155 the models change often, which luckily as far as I can tell they do
156 not. The small model, which according to its creator is most useful
157 for English and in my experience is not doing a great job there
158 either, is
462 MiB (deb is
414 MiB). The medium model, which to me
159 seem to handle English speech fairly well is
1.5 GiB (deb is
1.3 GiB)
160 and the large model is
2.9 GiB (deb is
2.6 GiB). I would assume
161 everyone with enough resources would prefer to use the large model for
162 highest quality. I believe the models themselves would have to go
163 into the non-free part of the Debian archive, as they are not really
164 including any useful source code for updating the models. The
165 "source
", aka the model training set, according to the creators
166 consist of
"680,
000 hours of multilingual and multitask supervised
167 data collected from the web
", which to me reads material with both
168 unknown copyright terms, unavailable to the general public. In other
169 words, the source is not available according to the Debian Free
170 Software Guidelines and the model should be considered non-free.
</p
>
172 <p
>I asked the Debian FTP masters for advice regarding uploading a
173 model package on their IRC channel, and based on the feedback there it
174 is still unclear to me if such package would be accepted into the
175 archive. In any case I wrote build rules for a
176 <a href=
"https://salsa.debian.org/deeplearning-team/openai-whisper-model
">OpenAI
177 Whisper model package
</a
> and
178 <a href=
"https://github.com/openai/whisper/pull/
1257">modified the
179 Whisper code base
</a
> to prefer shared files under
<tt
>/usr/
</tt
> and
180 <tt
>/var/
</tt
> over user specific files in
<tt
>~/.cache/whisper/
</tt
>
181 to be able to use these model packages, to prepare for such
182 possibility. One solution might be to include only one of the models
183 (small or medium, I guess) in the Debian archive, and ask people to
184 download the others from the Internet. Not quite sure what to do
185 here, and advice is most welcome (use the debian-ai mailing list).
</p
>
187 <p
>To make it easier to test the new packages while I wait for them to
188 clear the NEW queue, I created an APT source targeting bookworm. I
189 selected Bookworm instead of Bullseye, even though I know the latter
190 would reach more users, is that some of the required dependencies are
191 missing from Bullseye and I during this phase of testing did not want
192 to backport a lot of packages just to get up and running.
</p
>
194 <p
>Here is a recipe to run as user root if you want to test OpenAI
195 Whisper using Debian packages on your Debian Bookworm installation,
196 first adding the APT repository GPG key to the list of trusted keys,
197 then setting up the APT repository and finally installing the packages
198 and one of the models:
</p
>
201 curl https://geekbay.nuug.no/~pere/openai-whisper/D78F5C4796F353D211B119E28200D9B589641240.asc \
202 -o /etc/apt/trusted.gpg.d/pere-whisper.asc
203 mkdir -p /etc/apt/sources.list.d
204 cat
> /etc/apt/sources.list.d/pere-whisper.list
&lt;
&lt;EOF
205 deb https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
206 deb-src https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
209 apt install openai-whisper
210 </pre
></p
>
212 <p
>The package work for me, but have not yet been tested on any other
213 computer than my own. With it, I have been able to (badly) transcribe
214 a
2 minute
40 second Norwegian audio clip to test using the small
215 model. This took
11 minutes and around
2.2 GiB of RAM. Transcribing
216 the same file with the medium model gave a accurate text in
77 minutes
217 using around
5.2 GiB of RAM. My test machine had too little memory to
218 test the large model, which I believe require
11 GiB of RAM. In
219 short, this now work for me using Debian packages, and I hope it will
220 for you and everyone else once the packages enter Debian.
</p
>
222 <p
>Now I can start on the audio recording part of this project.
</p
>
224 <p
>As usual, if you use Bitcoin and want to show your support of my
225 activities, please send Bitcoin donations to my address
226 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
231 <title>rtlsdr-scanner, software defined radio frequency scanner for Linux - nice free software
</title>
232 <link>https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html
</link>
233 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html
</guid>
234 <pubDate>Fri,
7 Apr
2023 23:
10:
00 +
0200</pubDate>
235 <description><p
>Today I finally found time to track down a useful radio frequency
236 scanner for my software defined radio. Just for fun I tried to locate
237 the radios used in the areas, and a good start would be to scan all
238 the frequencies to see what is in use. I
've tried to find a useful
239 program earlier, but ran out of time before I managed to find a useful
240 tool. This time I was more successful, and after a few false leads I
241 found a description of
242 <a href=
"https://www.kali.org/tools/rtlsdr-scanner/
">rtlsdr-scanner
243 over at the Kali site
</a
>, and was able to track down
244 <a href=
"https://gitlab.com/kalilinux/packages/rtlsdr-scanner.git
">the
245 Kali package git repository
</a
> to build a deb package for the
246 scanner. Sadly the package is missing from the Debian project itself,
247 at least in Debian Bullseye. Two runtime dependencies,
248 <a href=
"https://gitlab.com/kalilinux/packages/python-visvis.git
">python-visvis
</a
>
250 <a href=
"https://gitlab.com/kalilinux/packages/python-rtlsdr.git
">python-rtlsdr
</a
>
251 had to be built and installed separately. Luckily
'<tt
>gbp
252 buildpackage
</tt
>' handled them just fine and no further packages had
253 to be manually built. The end result worked out of the box after
254 installation.
</p
>
256 <p
>My initial scans for FM channels worked just fine, so I knew the
257 scanner was functioning. But when I tried to scan every frequency
258 from
100 to
1000 MHz, the program stopped unexpectedly near the
259 completion. After some debugging I discovered USB software radio I
260 used rejected frequencies above
948 MHz, triggering a unreported
261 exception breaking the scan. Changing the scan to end at
957 worked
262 better. I similarly found the lower limit to be around
15, and ended
263 up with the following full scan:
</p
>
265 <p
><a href=
"https://people.skolelinux.org/pere/blog/images/
2023-
04-
07-radio-freq-scanning.png
"><img src=
"https://people.skolelinux.org/pere/blog/images/
2023-
04-
07-radio-freq-scanning.png
" width=
"100%
"></a
></p
>
267 <p
>Saving the scan did not work, but exporting it as a CSV file worked
268 just fine. I ended up with around
477k CVS lines with dB level for
269 the given frequency.
</p
>
271 <p
>The save failure seem to be a missing UTF-
8 encoding issue in the
272 python code. Will see if I can find time to send a patch
273 <a href=
"https://github.com/CdeMills/RTLSDR-Scanner/
">upstream
</a
>
274 later to fix this exception:
</p
>
277 Traceback (most recent call last):
278 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py
", line
485, in __on_save
279 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
280 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py
", line
408, in save_plot
281 handle.write(json.dumps(data, indent=
4))
282 TypeError: a bytes-like object is required, not
'str
'
283 Traceback (most recent call last):
284 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py
", line
485, in __on_save
285 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
286 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py
", line
408, in save_plot
287 handle.write(json.dumps(data, indent=
4))
288 TypeError: a bytes-like object is required, not
'str
'
291 <p
>As usual, if you use Bitcoin and want to show your support of my
292 activities, please send Bitcoin donations to my address
293 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
298 <title>OpenSnitch available in Debian Sid and Bookworm
</title>
299 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html
</link>
300 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html
</guid>
301 <pubDate>Sat,
25 Feb
2023 20:
30:
00 +
0100</pubDate>
302 <description><p
>Thanks to the efforts of the OpenSnitch lead developer Gustavo
303 IƱiguez Goya allowing me to sponsor the upload,
304 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
305 application firewall OpenSnitch
</a
> is now available in Debian
306 Testing, soon to become the next stable release of Debian.
</p
>
308 <p
>This is a package which set up a network firewall on one or more
309 machines, which is controlled by a graphical user interface that will
310 ask the user if a program should be allowed to connect to the local
311 network or the Internet. If some background daemon is trying to dial
312 home, it can be blocked from doing so with a simple mouse click, or by
313 default simply by not doing anything when the GUI question dialog pop
314 up. A list of all programs discovered using the network is provided
315 in the GUI, giving the user an overview of how the machine(s) programs
316 use the network.
</p
>
318 <p
>OpenSnitch was uploaded for NEW processing about a month ago, and I
319 had little hope of it getting accepted and shaping up in time for the
320 package freeze, but the Debian ftpmasters proved to be amazingly quick
321 at checking out the package and it was accepted into the archive about
322 week after the first upload. It is now team maintained under the Go
323 language team umbrella. A few fixes to the default setup is only in
324 Sid, and should migrate to Testing/Bookworm in a week.
</p
>
326 <p
>During testing I ran into an
327 <a href=
"https://github.com/evilsocket/opensnitch/issues/
813">issue
328 with Minecraft server broadcasts disappearing
</a
>, which was quickly
329 resolved by the developer with a patch and a proposed configuration
330 change. I
've been told this was caused by the Debian packages default
331 use if /proc/ information to track down kernel status, instead of the
332 newer eBPF module that can be used. The reason is simply that
333 upstream and I have failed to find a way to build the eBPF modules for
334 OpenSnitch without a complete configured Linux kernel source tree,
335 which as far as we can tell is unavailable as a build dependency in
336 Debian. We tried unsuccessfully so far to use the kernel-headers
337 package. It would be great if someone could provide some clues how to
338 build eBPF modules on build daemons in Debian, possibly without the full
339 kernel source.
</p
>
341 <p
>As usual, if you use Bitcoin and want to show your support of my
342 activities, please send Bitcoin donations to my address
343 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
348 <title>Is the desktop recommending your program for opening its files?
</title>
349 <link>https://people.skolelinux.org/pere/blog/Is_the_desktop_recommending_your_program_for_opening_its_files_.html
</link>
350 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Is_the_desktop_recommending_your_program_for_opening_its_files_.html
</guid>
351 <pubDate>Sun,
29 Jan
2023 11:
00:
00 +
0100</pubDate>
352 <description><p
>Linux desktop systems
353 <a href=
"https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
">have
354 standardized
</a
> how programs present themselves to the desktop
355 system. If a package include a .desktop file in
356 /usr/share/applications/, Gnome, KDE, LXDE, Xfce and the other desktop
357 environments will pick up the file and use its content to generate the
358 menu of available programs in the system. A lesser known fact is that
359 a package can also explain to the desktop system how to recognize the
360 files created by the program in question, and use it to open these
361 files on request, for example via a GUI file browser.
</p
>
363 <p
>A while back I ran into a package that did not tell the desktop
364 system how to recognize its files and was not used to open its files
365 in the file browser and fixed it. In the process I wrote a simple
366 debian/tests/ script to ensure the setup keep working. It might be
367 useful for other packages too, to ensure any future version of the
368 package keep handling its own files.
</p
>
370 <p
>For this to work the file format need a useful MIME type that can
371 be used to identify the format. If the file format do not yet have a
372 MIME type, it should define one and preferably also
373 <a href=
"https://www.iana.org/assignments/media-types/media-types.xhtml
">register
374 it with IANA
</a
> to ensure the MIME type string is reserved.
</p
>
376 <p
>The script uses the
<tt
>xdg-mime
</tt
> program from xdg-utils to
377 query the database of standardized package information and ensure it
378 return sensible values. It also need the location of an example file
379 for xdg-mime to guess the format of.
</p
>
384 # Author: Petter Reinholdtsen
385 # License: GPL v2 or later at your choice.
387 # Validate the MIME setup, making sure motor types have
388 # application/vnd.openmotor+yaml associated with them and is connected
389 # to the openmotor desktop file.
393 mimetype=
"application/vnd.openmotor+yaml
"
394 testfile=
"test/data/real/o3100/motor.ric
"
395 mydesktopfile=
"openmotor.desktop
"
397 filemime=
"$(xdg-mime query filetype
"$testfile
")
"
399 if [
"$mimetype
" !=
"$filemime
" ] ; then
401 echo
"error: xdg-mime claim motor file MIME type is $filemine, not $mimetype
"
403 echo
"success: xdg-mime report correct mime type $mimetype for motor file
"
406 desktop=$(xdg-mime query default
"$mimetype
")
408 if [
"$mydesktopfile
" !=
"$desktop
" ]; then
410 echo
"error: xdg-mime claim motor file should be handled by $desktop, not $mydesktopfile
"
412 echo
"success: xdg-mime agree motor file should be handled by $mydesktopfile
"
418 <p
>It is a simple way to ensure your users are not very surprised when
419 they try to open one of your file formats in their file browser.
</p
>
421 <p
>As usual, if you use Bitcoin and want to show your support of my
422 activities, please send Bitcoin donations to my address
423 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
428 <title>Opensnitch, the application level interactive firewall, heading into the Debian archive
</title>
429 <link>https://people.skolelinux.org/pere/blog/Opensnitch__the_application_level_interactive_firewall__heading_into_the_Debian_archive.html
</link>
430 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Opensnitch__the_application_level_interactive_firewall__heading_into_the_Debian_archive.html
</guid>
431 <pubDate>Sun,
22 Jan
2023 23:
55:
00 +
0100</pubDate>
432 <description><p
>While reading a
433 <a href=
"https://sneak.berlin/
20230115/macos-scans-your-local-files-now/
">blog
434 post claiming MacOS X recently started scanning local files and
435 reporting information about them to Apple
</a
>, even on a machine where
436 all such callback features had been disabled, I came across a
437 description of the Little Snitch application for MacOS X. It seemed
438 like a very nice tool to have in the tool box, and I decided to see if
439 something similar was available for Linux.
</p
>
441 <p
>It did not take long to find
442 <a href=
"https://github.com/evilsocket/opensnitch
">the OpenSnitch
443 package
</a
>, which has been in development since
2017, and now is in
444 version
1.5.0. It has had a
445 <a href=
"https://bugs.debian.org/
909567">request for Debian
446 packaging
</a
> since
2018, but no-one completed the job so far. Just
447 for fun, I decided to see if I could help, and I was very happy to
449 <a href=
"https://github.com/evilsocket/opensnitch/issues/
304">upstream
450 want a Debian package too
</a
>.
</p
>
452 <p
>After struggling a bit with getting the program to run, figuring
453 out building Go programs (and a little failed detour to look at eBPF
454 builds too - help needed), I am very happy to report that I am
455 sponsoring upstream to maintain the package in Debian, and it has
456 since this morning been waiting in NEW for the ftpmasters to have a
457 look. Perhaps it can get into the archive in time for the Bookworm
460 <p
>As usual, if you use Bitcoin and want to show your support of my
461 activities, please send Bitcoin donations to my address
462 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
467 <title>LinuxCNC MQTT publisher component
</title>
468 <link>https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html
</link>
469 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html
</guid>
470 <pubDate>Sun,
8 Jan
2023 19:
30:
00 +
0100</pubDate>
471 <description><p
>I watched
<a href=
"https://yewtu.be/watch?v=jmKUV3aNLjk
">a
2015
472 video from Andreas Schiffler
</a
> the other day, where he set up
473 <a href=
"https://linuxcnc.org/
">LinuxCNC
</a
> to send status
474 information to the MQTT broker IBM Bluemix. As I also use MQTT for
475 graphing, it occured to me that a generic MQTT LinuxCNC component
476 would be useful and I set out to implement it. Today I got the first
477 draft limping along and submitted as
478 <a href=
"https://github.com/LinuxCNC/linuxcnc/pull/
2253">a patch to the
479 LinuxCNC project
</a
>.
</p
>
481 <p
>The simple part was setting up the MQTT publishing code in Python.
482 I already have set up other parts submitting data to my Mosquito MQTT
483 broker, so I could reuse that code. Writing a LinuxCNC component in
484 Python as new to me, but using existing examples in the code
485 repository and the extensive documentation, this was fairly straight
486 forward. The hardest part was creating a automated test for the
487 component to ensure it was working. Testing it in a simulated
488 LinuxCNC machine proved very useful, as I discovered features I needed
489 that I had not thought of yet, and adjusted the code quite a bit to
490 make it easier to test without a operational MQTT broker
493 <p
>The draft is ready and working, but I am unsure which LinuxCNC HAL
494 pins I should collect and publish by default (in other words, the
495 default set of information pieces published), and how to get the
496 machine name from the LinuxCNC INI file. The latter is a minor
497 detail, but I expect it would be useful in a setup with several
498 machines available. I am hoping for feedback from the experienced
499 LinuxCNC developers and users, to make the component even better
500 before it can go into the mainland LinuxCNC code base.
</p
>
502 <p
>Since I started on the MQTT component, I came across
503 <a href=
"https://yewtu.be/watch?v=Bqa2grG0XtA
">another video from Kent
504 VanderVelden
</a
> where he combine LinuxCNC with a set of screen glasses
505 controlled by a Raspberry Pi, and it occured to me that it would
506 be useful for such use cases if LinuxCNC also provided a REST API for
507 querying its status. I hope to start on such component once the MQTT
508 component is working well.
</p
>
510 <p
>As usual, if you use Bitcoin and want to show your support of my
511 activities, please send Bitcoin donations to my address
512 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
517 <title>ONVIF IP camera management tool finally in Debian
</title>
518 <link>https://people.skolelinux.org/pere/blog/ONVIF_IP_camera_management_tool_finally_in_Debian.html
</link>
519 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/ONVIF_IP_camera_management_tool_finally_in_Debian.html
</guid>
520 <pubDate>Sat,
24 Dec
2022 08:
00:
00 +
0100</pubDate>
521 <description><p
>Merry Christmas to you all. Here is a small gift to all those with
522 IP cameras following the
<a href=
"https://www.onvif.org/
">ONVIF
523 specification
</a
>. There is finally a nice command line and GUI tool
524 in Debian to manage ONVIF IP cameras. After working with upstream for
525 a few months and sponsoring the upload, I am very happy to report that
526 the
<a href=
"https://tracker.debian.org/libonvif
">libonvif package
</a
>
527 entered Debian Sid last night.
</p
>
529 <p
>The package provide a C library to communicate with such cameras, a
530 command line tool to locate and update settings of (like password) the
531 cameras and a GUI tool to configure and control the units as well as
532 preview the video from the camera. Libonvif is available on Both
533 Linux and Windows and the GUI tool uses the Qt library. The main
534 competitors are non-free software, while libonvif is GNU GPL licensed.
535 I am very glad Debian users in the future can control their cameras
536 using a free software system provided by Debian. But the ONVIF world
537 is full of slightly broken firmware, where the cameras pretend to
538 follow the ONVIF specification but fail to set some configuration
539 values or refuse to provide video to more than one recipient at the
540 time, and the onvif project is quite young and might take a while
541 before it completely work with your camera. Upstream seem eager to
542 improve the library, so handling any broken camera might be just
<a
543 href=
"https://github.com/sr99622/libonvif/
">a bug report away
</a
>.
</p
>
545 <p
>The package just cleared NEW, and need a new source only upload
546 before it can enter testing. This will happen in the next few
549 <p
>As usual, if you use Bitcoin and want to show your support of my
550 activities, please send Bitcoin donations to my address
551 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
556 <title>Managing and using ONVIF IP cameras with Linux
</title>
557 <link>https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html
</link>
558 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html
</guid>
559 <pubDate>Wed,
19 Oct
2022 12:
30:
00 +
0200</pubDate>
560 <description><p
>Recently I have been looking at how to control and collect data
561 from a handful IP cameras using Linux. I both wanted to change their
562 settings and to make their imagery available via a free software
563 service under my control. Here is a summary of the tools I found.
</p
>
565 <p
>First I had to identify the cameras and their protocols. As far as
566 I could tell, they were using some SOAP looking protocol and their
567 internal web server seem to only work with Microsoft Internet Explorer
568 with some proprietary binary plugin, which in these days of course is
569 a security disaster and also made it impossible for me to use the
570 camera web interface. Luckily I discovered that the SOAP looking
571 protocol is actually following
<a href=
"https://www.onvif.org/
">the
572 ONVIF specification
</a
>, which seem to be supported by a lot of IP
573 cameras these days.
</p
>
575 <p
>Once the protocol was identified, I was able to find what appear to
576 be the most popular way to configure ONVIF cameras, the free software
578 <a href=
"https://sourceforge.net/projects/onvifdm/
">ONVIF Device
579 Manager
</a
>. Lacking any other options at the time, I tried
580 unsuccessfully to get it running using Wine, but was missing a dotnet
581 40 library and I found no way around it to run it on Linux.
</p
>
583 <p
>The next tool I found to configure the cameras were a non-free Linux Qt
584 client
<a href=
"https://www.lingodigit.com/onvif_nvcdemo.html
">ONVIF
585 Device Tool
</a
>. I did not like its terms of use, so did not spend
586 much time on it.
</p
>
588 <p
>To collect the video and make it available in a web interface, I
589 found the Zoneminder tool in Debian. A recent version was able to
590 automatically detect and configure ONVIF devices, so I could use it to
591 set up motion detection in and collection of the camera output. I had
592 initial problems getting the ONVIF autodetection to work, as both
593 Firefox and Chromium
<a href=
"https://bugs.debian.org/
1001188">refused
594 the inter-tab communication
</a
> being used by the Zoneminder web
595 pages, but managed to get konqueror to work. Apparently the
"Enhanced
596 Tracking Protection
" in Firefox cause the problem. I ended up
597 upgrading to the Bookworm edition of Zoneminder in the process to try
598 to fix the issue, and believe the problem might be solved now.
</p
>
600 <p
>In the process I came across the nice Linux GUI tool
601 <a href=
"https://gitlab.com/caspermeijn/onvifviewer/
">ONVIF Viewer
</a
>
602 allowing me to preview the camera output and validate the login
603 passwords required. Sadly its author has grown tired of maintaining
604 the software, so it might not see any future updates. Which is sad,
605 as the viewer is sightly unstable and the picture tend to lock up.
606 Note, this lockup might be due to limitations in the cameras and not
607 the viewer implementation. I suspect the camera is only able to
608 provide pictures to one client at the time, and the Zoneminder feed
609 might interfere with the GUI viewer. I have
610 <a href=
"https://bugs.debian.org/
1000820">asked for the tool to be
611 included in Debian
</a
>.
</p
>
613 <p
>Finally, I found what appear to be very nice Linux free software
614 replacement for the Windows tool, named
615 <a href=
"https://github.com/sr99622/libonvif/
">libonvif
</a
>. It
616 provide a C library to talk to ONVIF devices as well as a command line
617 and GUI tool using the library. Using the GUI tool I was able to change
618 the admin passwords and update other settings of the cameras. I have
619 <a href=
"https://bugs.debian.org/
1021980">asked for the package to be
620 included in Debian
</a
>.
</p
>
622 <p
>As usual, if you use Bitcoin and want to show your support of my
623 activities, please send Bitcoin donations to my address
624 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
626 <p
><strong
>Update
2022-
10-
20</strong
>: Since my initial publication of
627 this text, I got several suggestions for more free software Linux
628 tools. There is
<a href=
"https://github.com/quatanium/python-onvif
">a
629 ONVIF python library
</a
> (already
630 <a href=
"https://bugs.debian.org/
824240">requested into Debian
</a
>) and
631 <a href=
"https://github.com/FalkTannhaeuser/python-onvif-zeep
">a python
3
632 fork
</a
> using a different SOAP dependency. There is also
633 <a href=
"https://www.home-assistant.io/integrations/onvif/
">support for
634 ONVIF in Home Assistant
</a
>, and there is an alternative to Zoneminder
635 called
<a href=
"https://www.shinobi.video/
">Shinobi
</a
>. The latter
636 two are not included in Debian either. I have not tested any of these