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