]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Typo.
[homepage.git] / blog / index.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Petter Reinholdtsen</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
8
9 <item>
10 <title>Thank you Thinkpad X41, for your long and trustworthy service</title>
11 <link>http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</guid>
13 <pubDate>Sat, 19 Jan 2013 09:20:00 +0100</pubDate>
14 <description>&lt;p&gt;This Christmas my trusty old laptop died. It died quietly and
15 suddenly in bed. With a quiet whimper, it went completely quiet and
16 black. The power button was no longer able to turn it on. It was a
17 IBM Thinkpad X41, and the best laptop I ever had. Better than both
18 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
19 Compaq I had before that. Now I need to find a replacement. To keep
20 going during Christmas, I moved the one year old SSD disk to my old
21 X40 where it fitted (only one I had left that could use it), but it is
22 not a durable solution.
23
24 &lt;p&gt;My laptop needs are fairly modest. This is my wishlist from when I
25 got a new one more than 10 years ago. It still holds true.:)&lt;/p&gt;
26
27 &lt;ul&gt;
28
29 &lt;li&gt;Lightweight (around 1 kg) and small volume (preferably smaller
30 than A4).&lt;/li&gt;
31 &lt;li&gt;Robust, it will be in my backpack every day.&lt;/li&gt;
32 &lt;li&gt;Three button mouse and a mouse pin instead of touch pad.&lt;/li&gt;
33 &lt;li&gt;Long battery life time. Preferable a week.&lt;/li&gt;
34 &lt;li&gt;Internal WIFI network card.&lt;/li&gt;
35 &lt;li&gt;Internal Twisted Pair network card.&lt;/li&gt;
36 &lt;li&gt;Some USB slots (2-3 is plenty)&lt;/li&gt;
37 &lt;li&gt;Good keyboard - similar to the Thinkpad.&lt;/li&gt;
38 &lt;li&gt;Video resolution at least 1024x768, with size around 12&quot; (A4 paper
39 size).&lt;/li&gt;
40 &lt;li&gt;Hardware supported by Debian Stable, ie the default kernel and
41 X.org packages.&lt;/li&gt;
42 &lt;li&gt;Quiet, preferably fan free (or at least not using the fan most of
43 the time).
44
45 &lt;/ul&gt;
46
47 &lt;p&gt;You will notice that there are no RAM and CPU requirements in the
48 list. The reason is simply that the specifications on laptops the
49 last 10-15 years have been sufficient for my needs, and I have to look
50 at other features to choose my laptop. But are there still made as
51 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
52 robust, and Thinkpads seem to be heading in the wrong direction since
53 Lenovo took over. But I&#39;ve been told that X220 and X1 Carbon might
54 still be useful.&lt;/p&gt;
55
56 &lt;p&gt;Perhaps I should rethink my needs, and look for a pad with an
57 external keyboard? I&#39;ll have to check the
58 &lt;a href=&quot;http://www.linux-laptop.net/&quot;&gt;Linux Laptops site&lt;/a&gt; for
59 well-supported laptops, or perhaps just buy one preinstalled from one
60 of the vendors listed on the &lt;a href=&quot;http://linuxpreloaded.com/&quot;&gt;Linux
61 Pre-loaded site&lt;/a&gt;.&lt;/p&gt;
62 </description>
63 </item>
64
65 <item>
66 <title>How to find a browser plugin supporting a given MIME type</title>
67 <link>http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</link>
68 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</guid>
69 <pubDate>Fri, 18 Jan 2013 10:40:00 +0100</pubDate>
70 <description>&lt;p&gt;Some times I try to figure out which Iceweasel browser plugin to
71 install to get support for a given MIME type. Thanks to
72 &lt;a href=&quot;https://wiki.ubuntu.com/MozillaTeam/Plugins&quot;&gt;specifications
73 done by Ubuntu&lt;/a&gt; and Mozilla, it is possible to do this in Debian.
74 Unfortunately, not very many packages provide the needed meta
75 information, Anyway, here is a small script to look up all browser
76 plugin packages announcing ther MIME support using this specification:&lt;/p&gt;
77
78 &lt;pre&gt;
79 #!/usr/bin/python
80 import sys
81 import apt
82 def pkgs_handling_mimetype(mimetype):
83 cache = apt.Cache()
84 cache.open(None)
85 thepkgs = []
86 for pkg in cache:
87 version = pkg.candidate
88 if version is None:
89 version = pkg.installed
90 if version is None:
91 continue
92 record = version.record
93 if not record.has_key(&#39;Npp-MimeType&#39;):
94 continue
95 mime_types = record[&#39;Npp-MimeType&#39;].split(&#39;,&#39;)
96 for t in mime_types:
97 t = t.rstrip().strip()
98 if t == mimetype:
99 thepkgs.append(pkg.name)
100 return thepkgs
101 mimetype = &quot;audio/ogg&quot;
102 if 1 &lt; len(sys.argv):
103 mimetype = sys.argv[1]
104 print &quot;Browser plugin packages supporting %s:&quot; % mimetype
105 for pkg in pkgs_handling_mimetype(mimetype):
106 print &quot; %s&quot; %pkg
107 &lt;/pre&gt;
108
109 &lt;p&gt;It can be used like this to look up a given MIME type:&lt;/p&gt;
110
111 &lt;pre&gt;
112 % ./apt-find-browserplug-for-mimetype
113 Browser plugin packages supporting audio/ogg:
114 gecko-mediaplayer
115 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
116 Browser plugin packages supporting application/x-shockwave-flash:
117 browser-plugin-gnash
118 %
119 &lt;/pre&gt;
120
121 &lt;p&gt;In Ubuntu this mechanism is combined with support in the browser
122 itself to query for plugins and propose to install the needed
123 packages. It would be great if Debian supported such feature too. Is
124 anyone working on adding it?&lt;/p&gt;
125
126 &lt;p&gt;&lt;strong&gt;Update 2013-01-18 14:20&lt;/strong&gt;: The Debian BTS
127 request for icweasel support for this feature is
128 &lt;a href=&quot;http://bugs.debian.org/484010&quot;&gt;#484010&lt;/a&gt; from 2008 (and
129 &lt;a href=&quot;http://bugs.debian.org/698426&quot;&gt;#698426&lt;/a&gt; from today). Lack
130 of manpower and wish for a different design is the reason thus feature
131 is not yet in iceweasel from Debian.&lt;/p&gt;
132 </description>
133 </item>
134
135 <item>
136 <title>What is the most supported MIME type in Debian?</title>
137 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</link>
138 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</guid>
139 <pubDate>Wed, 16 Jan 2013 10:10:00 +0100</pubDate>
140 <description>&lt;p&gt;The &lt;a href=&quot;http://wiki.debian.org/AppStreamDebianProposal&quot;&gt;DEP-11
141 proposal to add AppStream information to the Debian archive&lt;/a&gt;, is a
142 proposal to make it possible for a Desktop application to propose to
143 the user some package to install to gain support for a given MIME
144 type, font, library etc. that is currently missing. With such
145 mechanism in place, it would be possible for the desktop to
146 automatically propose and install leocad if some LDraw file is
147 downloaded by the browser.&lt;/p&gt;
148
149 &lt;p&gt;To get some idea about the current content of the archive, I decided
150 to write a simple program to extract all .desktop files from the
151 Debian archive and look up the claimed MIME support there. The result
152 can be found on the
153 &lt;a href=&quot;http://ftp.skolelinux.org/pub/AppStreamTest&quot;&gt;Skolelinux FTP
154 site&lt;/a&gt;. Using the collected information, it become possible to
155 answer the question in the title. Here are the 20 most supported MIME
156 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
157 The complete list is available from the link above.&lt;/p&gt;
158
159 &lt;p&gt;&lt;strong&gt;Debian Stable:&lt;/strong&gt;&lt;/p&gt;
160
161 &lt;pre&gt;
162 count MIME type
163 ----- -----------------------
164 32 text/plain
165 30 audio/mpeg
166 29 image/png
167 28 image/jpeg
168 27 application/ogg
169 26 audio/x-mp3
170 25 image/tiff
171 25 image/gif
172 22 image/bmp
173 22 audio/x-wav
174 20 audio/x-flac
175 19 audio/x-mpegurl
176 18 video/x-ms-asf
177 18 audio/x-musepack
178 18 audio/x-mpeg
179 18 application/x-ogg
180 17 video/mpeg
181 17 audio/x-scpls
182 17 audio/ogg
183 16 video/x-ms-wmv
184 &lt;/pre&gt;
185
186 &lt;p&gt;&lt;strong&gt;Debian Testing:&lt;/strong&gt;&lt;/p&gt;
187
188 &lt;pre&gt;
189 count MIME type
190 ----- -----------------------
191 33 text/plain
192 32 image/png
193 32 image/jpeg
194 29 audio/mpeg
195 27 image/gif
196 26 image/tiff
197 26 application/ogg
198 25 audio/x-mp3
199 22 image/bmp
200 21 audio/x-wav
201 19 audio/x-mpegurl
202 19 audio/x-mpeg
203 18 video/mpeg
204 18 audio/x-scpls
205 18 audio/x-flac
206 18 application/x-ogg
207 17 video/x-ms-asf
208 17 text/html
209 17 audio/x-musepack
210 16 image/x-xbitmap
211 &lt;/pre&gt;
212
213 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
214
215 &lt;pre&gt;
216 count MIME type
217 ----- -----------------------
218 31 text/plain
219 31 image/png
220 31 image/jpeg
221 29 audio/mpeg
222 28 application/ogg
223 27 image/gif
224 26 image/tiff
225 26 audio/x-mp3
226 23 audio/x-wav
227 22 image/bmp
228 21 audio/x-flac
229 20 audio/x-mpegurl
230 19 audio/x-mpeg
231 18 video/x-ms-asf
232 18 video/mpeg
233 18 audio/x-scpls
234 18 application/x-ogg
235 17 audio/x-musepack
236 16 video/x-ms-wmv
237 16 video/x-msvideo
238 &lt;/pre&gt;
239
240 &lt;p&gt;I am told that PackageKit can provide an API to access the kind of
241 information mentioned in DEP-11. I have not yet had time to look at
242 it, but hope the PackageKit people in Debian are on top of these
243 issues.&lt;/p&gt;
244
245 &lt;p&gt;&lt;strong&gt;Update 2013-01-16 13:35&lt;/strong&gt;: Updated numbers after
246 discovering a typo in my script.&lt;/p&gt;
247 </description>
248 </item>
249
250 <item>
251 <title>Using modalias info to find packages handling my hardware</title>
252 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
253 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
254 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
255 <description>&lt;p&gt;Yesterday, I wrote about the
256 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
257 values provided by the Linux kernel&lt;/a&gt; following my hope for
258 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
259 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
260 modalias values attached to package names can be used to map packages
261 to hardware. This allow the system to look up and suggest relevant
262 packages when I plug in some new hardware into my machine, and replace
263 discover and discover-data as the database used to map hardware to
264 packages.&lt;/p&gt;
265
266 &lt;p&gt;I create a modaliases file with entries like the following,
267 containing package name, kernel module name (if relevant, otherwise
268 the package name) and globs matching the relevant hardware
269 modalias.&lt;/p&gt;
270
271 &lt;p&gt;&lt;blockquote&gt;
272 Package: package-name
273 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
274 &lt;/blockquote&gt;&lt;/p&gt;
275
276 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
277 for a given modalias value using this file.&lt;/p&gt;
278
279 &lt;p&gt;An entry like this would suggest the video and picture application
280 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
281
282 &lt;p&gt;&lt;blockquote&gt;
283 Package: cheese
284 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
285 &lt;/blockquote&gt;&lt;/p&gt;
286
287 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
288 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
289
290 &lt;p&gt;&lt;blockquote&gt;
291 Package: pcmciautils
292 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
293 &lt;/blockquote&gt;&lt;/p&gt;
294
295 &lt;p&gt;An entry like this would suggest the package colorhug-client when
296 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
297
298 &lt;p&gt;&lt;blockquote&gt;
299 Package: colorhug-client
300 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
301 &lt;/blockquote&gt;&lt;/p&gt;
302
303 &lt;p&gt;I believe the format is compatible with the format of the Packages
304 file in the Debian archive. Ubuntu already uses their Packages file
305 to store their mappings from packages to hardware.&lt;/p&gt;
306
307 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
308 announce the hardware it support in a way my prototype understand.
309 This allow those publishing packages in an APT source outside the
310 Debian archive as well as those backporting packages to make sure the
311 hardware mapping are included in the package meta information. I&#39;ve
312 tested such header in the pymissile package, and its modalias mapping
313 is working as it should with my prototype. It even made it to Ubuntu
314 Raring.&lt;/p&gt;
315
316 &lt;p&gt;To test if it was possible to look up supported hardware using only
317 the shell tools available in the Debian installer, I wrote a shell
318 implementation of the lookup code. The idea is to create files for
319 each modalias and let the shell do the matching. Please check out and
320 try the
321 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co&quot;&gt;hw-support-lookup&lt;/a&gt;
322 shell script. It run without any extra dependencies and fetch the
323 hardware mappings from the Debian archive and the subversion
324 repository where I currently work on my prototype.&lt;/p&gt;
325
326 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
327 install yubikey-personalization:&lt;/p&gt;
328
329 &lt;p&gt;&lt;blockquote&gt;
330 % ./hw-support-lookup
331 &lt;br&gt;yubikey-personalization
332 &lt;br&gt;%
333 &lt;/blockquote&gt;&lt;/p&gt;
334
335 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
336 propose to install the pcmciautils package:&lt;/p&gt;
337
338 &lt;p&gt;&lt;blockquote&gt;
339 % ./hw-support-lookup
340 &lt;br&gt;pcmciautils
341 &lt;br&gt;%
342 &lt;/blockquote&gt;&lt;/p&gt;
343
344 &lt;p&gt;If you know of any hardware-package mapping that should be added to
345 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
346 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
347
348 &lt;p&gt;It could be possible to generate several of the mappings between
349 packages and hardware. One source would be to look at packages with
350 kernel modules, ie packages with *.ko files in /lib/modules/, and
351 extract their modalias information. Another would be to look at
352 packages with udev rules, ie packages with files in
353 /lib/udev/rules.d/, and extract their vendor/model information to
354 generate a modalias matching rule. I have not tested any of these to
355 see if it work.&lt;/p&gt;
356
357 &lt;p&gt;If you want to help implementing a system to let us propose what
358 packages to install when new hardware is plugged into a Debian
359 machine, please send me an email or talk to me on
360 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
361 </description>
362 </item>
363
364 <item>
365 <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
366 <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
367 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
368 <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
369 <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
370 information, to find the packages that support a given piece of
371 hardware, I refreshed my memory regarding modalias values, and decided
372 to document the details. Here are my findings so far, also available
373 in
374 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
375 Debian Edu subversion repository&lt;/a&gt;:
376
377 &lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
378
379 &lt;p&gt;This document try to explain what the different types of modalias
380 values stands for. It is in part based on information from
381 &amp;lt;URL: &lt;a href=&quot;https://wiki.archlinux.org/index.php/Modalias&quot;&gt;https://wiki.archlinux.org/index.php/Modalias&lt;/a&gt; &amp;gt;,
382 &amp;lt;URL: &lt;a href=&quot;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&quot;&gt;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&lt;/a&gt; &amp;gt;,
383 &amp;lt;URL: &lt;a href=&quot;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&quot;&gt;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&lt;/a&gt; &amp;gt; and
384 &amp;lt;URL: &lt;a href=&quot;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&quot;&gt;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&lt;/a&gt; &amp;gt;.
385
386 &lt;p&gt;The modalias entries for a given Linux machine can be found using
387 this shell script:&lt;/p&gt;
388
389 &lt;pre&gt;
390 find /sys -name modalias -print0 | xargs -0 cat | sort -u
391 &lt;/pre&gt;
392
393 &lt;p&gt;The supported modalias globs for a given kernel module can be found
394 using modinfo:&lt;/p&gt;
395
396 &lt;pre&gt;
397 % /sbin/modinfo psmouse | grep alias:
398 alias: serio:ty05pr*id*ex*
399 alias: serio:ty01pr*id*ex*
400 %
401 &lt;/pre&gt;
402
403 &lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
404
405 &lt;p&gt;A typical PCI entry can look like this. This is an Intel Host
406 Bridge memory controller:&lt;/p&gt;
407
408 &lt;p&gt;&lt;blockquote&gt;
409 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
410 &lt;/blockquote&gt;&lt;/p&gt;
411
412 &lt;p&gt;This represent these values:&lt;/p&gt;
413
414 &lt;pre&gt;
415 v 00008086 (vendor)
416 d 00002770 (device)
417 sv 00001028 (subvendor)
418 sd 000001AD (subdevice)
419 bc 06 (bus class)
420 sc 00 (bus subclass)
421 i 00 (interface)
422 &lt;/pre&gt;
423
424 &lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
425 -n&#39; as 8086:2770. The bus class/subclass is also shown by lspci as
426 0600. The 0600 class is a host bridge. Other useful bus values are
427 0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
428
429 &lt;p&gt;Not sure how to figure out the interface value, nor what it
430 means.&lt;/p&gt;
431
432 &lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
433
434 &lt;p&gt;Some typical USB entries can look like this. This is an internal
435 USB hub in a laptop:&lt;/p&gt;
436
437 &lt;p&gt;&lt;blockquote&gt;
438 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
439 &lt;/blockquote&gt;&lt;/p&gt;
440
441 &lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
442
443 &lt;pre&gt;
444 v 1D6B (device vendor)
445 p 0001 (device product)
446 d 0206 (bcddevice)
447 dc 09 (device class)
448 dsc 00 (device subclass)
449 dp 00 (device protocol)
450 ic 09 (interface class)
451 isc 00 (interface subclass)
452 ip 00 (interface protocol)
453 &lt;/pre&gt;
454
455 &lt;p&gt;The 0900 device class/subclass means hub. Some times the relevant
456 class is in the interface class section. For a simple USB web camera,
457 these alias entries show up:&lt;/p&gt;
458
459 &lt;p&gt;&lt;blockquote&gt;
460 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
461 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
462 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
463 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
464 &lt;/blockquote&gt;&lt;/p&gt;
465
466 &lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
467 camera), 0101 is audio control device and 0102 is audio streaming (aka
468 microphone). Thus this is a camera with microphone included.&lt;/p&gt;
469
470 &lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
471
472 &lt;p&gt;The ACPI type is used for several non-PCI/USB stuff. This is an IR
473 receiver in a Thinkpad X40:&lt;/p&gt;
474
475 &lt;p&gt;&lt;blockquote&gt;
476 acpi:IBM0071:PNP0511:
477 &lt;/blockquote&gt;&lt;/p&gt;
478
479 &lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
480
481 &lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
482
483 &lt;p&gt;The DMI table contain lots of information about the computer case
484 and model. This is an entry for a IBM Thinkpad X40, fetched from
485 /sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
486
487 &lt;p&gt;&lt;blockquote&gt;
488 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
489 &lt;/blockquote&gt;&lt;/p&gt;
490
491 &lt;p&gt;The values present are&lt;/p&gt;
492
493 &lt;pre&gt;
494 bvn IBM (BIOS vendor)
495 bvr 1UETB6WW(1.66) (BIOS version)
496 bd 06/15/2005 (BIOS date)
497 svn IBM (system vendor)
498 pn 2371H4G (product name)
499 pvr ThinkPadX40 (product version)
500 rvn IBM (board vendor)
501 rn 2371H4G (board name)
502 rvr NotAvailable (board version)
503 cvn IBM (chassis vendor)
504 ct 10 (chassis type)
505 cvr NotAvailable (chassis version)
506 &lt;/pre&gt;
507
508 &lt;p&gt;The chassis type 10 is Notebook. Other interesting values can be
509 found in the dmidecode source:&lt;/p&gt;
510
511 &lt;pre&gt;
512 3 Desktop
513 4 Low Profile Desktop
514 5 Pizza Box
515 6 Mini Tower
516 7 Tower
517 8 Portable
518 9 Laptop
519 10 Notebook
520 11 Hand Held
521 12 Docking Station
522 13 All In One
523 14 Sub Notebook
524 15 Space-saving
525 16 Lunch Box
526 17 Main Server Chassis
527 18 Expansion Chassis
528 19 Sub Chassis
529 20 Bus Expansion Chassis
530 21 Peripheral Chassis
531 22 RAID Chassis
532 23 Rack Mount Chassis
533 24 Sealed-case PC
534 25 Multi-system
535 26 CompactPCI
536 27 AdvancedTCA
537 28 Blade
538 29 Blade Enclosing
539 &lt;/pre&gt;
540
541 &lt;p&gt;The chassis type values are not always accurately set in the DMI
542 table. For example my home server is a tower, but the DMI modalias
543 claim it is a desktop.&lt;/p&gt;
544
545 &lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
546
547 &lt;p&gt;This type is used for PS/2 mouse plugs. One example is from my
548 test machine:&lt;/p&gt;
549
550 &lt;p&gt;&lt;blockquote&gt;
551 serio:ty01pr00id00ex00
552 &lt;/blockquote&gt;&lt;/p&gt;
553
554 &lt;p&gt;The values present are&lt;/p&gt;
555
556 &lt;pre&gt;
557 ty 01 (type)
558 pr 00 (prototype)
559 id 00 (id)
560 ex 00 (extra)
561 &lt;/pre&gt;
562
563 &lt;p&gt;This type is supported by the psmouse driver. I am not sure what
564 the valid values are.&lt;/p&gt;
565
566 &lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
567
568 &lt;p&gt;There are heaps of other modalias subtypes according to
569 file2alias.c. There is the rest of the list from that source: amba,
570 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
571 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
572 vmbus, x86cpu and zorro. I did not spend time documenting all of
573 these, as they do not seem relevant for my intended use with mapping
574 hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
575
576 &lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
577
578 &lt;p&gt;To check which kernel modules provide support for a given modalias,
579 one can use the following shell script:&lt;/p&gt;
580
581 &lt;pre&gt;
582 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
583 echo &quot;$id&quot; ; \
584 /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/ /&#39; ; \
585 done
586 &lt;/pre&gt;
587
588 &lt;p&gt;The output can look like this (only the first few entries as the
589 list is very long on my test machine):&lt;/p&gt;
590
591 &lt;pre&gt;
592 acpi:ACPI0003:
593 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
594 acpi:device:
595 FATAL: Module acpi:device: not found.
596 acpi:IBM0068:
597 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
598 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
599 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
600 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
601 acpi:IBM0071:PNP0511:
602 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
603 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
604 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
605 [...]
606 &lt;/pre&gt;
607
608 &lt;p&gt;If you want to help implementing a system to let us propose what
609 packages to install when new hardware is plugged into a Debian
610 machine, please send me an email or talk to me on
611 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
612
613 &lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
614 &quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
615 in /sys/ with space in them.&lt;/p&gt;
616 </description>
617 </item>
618
619 <item>
620 <title>Moved the pymissile Debian packaging to collab-maint</title>
621 <link>http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</link>
622 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</guid>
623 <pubDate>Thu, 10 Jan 2013 20:40:00 +0100</pubDate>
624 <description>&lt;p&gt;As part of my investigation on how to improve the support in Debian
625 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
626 Launcher and updated the Debian package
627 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;pymissile&lt;/a&gt; to make
628 sure udev will fix the device permissions when it is plugged in. I
629 also added a &quot;Modaliases&quot; header to test it in the Debian archive and
630 hopefully make the package be proposed by jockey in Ubuntu when a user
631 plug in his rocket launcher. In the process I moved the source to a
632 git repository under collab-maint, to make it easier for any DD to
633 contribute. &lt;a href=&quot;http://code.google.com/p/pymissile/&quot;&gt;Upstream&lt;/a&gt;
634 is not very active, but the software still work for me even after five
635 years of relative silence. The new git repository is not listed in
636 the uploaded package yet, because I want to test the other changes a
637 bit more before I upload the new version. If you want to check out
638 the new version with a .desktop file included, visit the
639 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git&quot;&gt;gitweb
640 view&lt;/a&gt; or use &quot;&lt;tt&gt;git clone
641 git://anonscm.debian.org/collab-maint/pymissile.git&lt;/tt&gt;&quot;.&lt;/p&gt;
642 </description>
643 </item>
644
645 <item>
646 <title>Lets make hardware dongles easier to use in Debian</title>
647 <link>http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</link>
648 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</guid>
649 <pubDate>Wed, 9 Jan 2013 15:40:00 +0100</pubDate>
650 <description>&lt;p&gt;One thing that annoys me with Debian and Linux distributions in
651 general, is that there is a great package management system with the
652 ability to automatically install software packages by downloading them
653 from the distribution mirrors, but no way to get it to automatically
654 install the packages I need to use the hardware I plug into my
655 machine. Even if the package to use it is easily available from the
656 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
657 suggest to automatically install the python-nxt, nbc and t2n packages
658 I need to talk to it. When I plug in a Yubikey, it could propose the
659 yubikey-personalization package. The information required to do this
660 is available, but no-one have pulled all the pieces together.&lt;/p&gt;
661
662 &lt;p&gt;Some years ago, I proposed to
663 &lt;a href=&quot;http://lists.debian.org/debian-devel/2010/05/msg01206.html&quot;&gt;use
664 the discover subsystem to implement this&lt;/a&gt;. The idea is fairly
665 simple:
666
667 &lt;ul&gt;
668
669 &lt;li&gt;Add a desktop entry in /usr/share/autostart/ pointing to a program
670 starting when a user log in.&lt;/li&gt;
671
672 &lt;li&gt;Set this program up to listen for kernel events emitted when new
673 hardware is inserted into the computer.&lt;/li&gt;
674
675 &lt;li&gt;When new hardware is inserted, look up the hardware ID in a
676 database mapping to packages, and take note of any non-installed
677 packages.&lt;/li&gt;
678
679 &lt;li&gt;Show a message to the user proposing to install the discovered
680 package, and make it easy to install it.&lt;/li&gt;
681
682 &lt;/ul&gt;
683
684 &lt;p&gt;I am not sure what the best way to implement this is, but my
685 initial idea was to use dbus events to discover new hardware, the
686 discover database to find packages and
687 &lt;a href=&quot;http://www.packagekit.org/&quot;&gt;PackageKit&lt;/a&gt; to install
688 packages.&lt;/p&gt;
689
690 &lt;p&gt;Yesterday, I found time to try to implement this idea, and the
691 draft package is now checked into
692 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
693 Debian Edu subversion repository&lt;/a&gt;. In the process, I updated the
694 &lt;a href=&quot;http://packages.qa.debian.org/d/discover-data.html&quot;&gt;discover-data&lt;/a&gt;
695 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
696 the relevant packages in Debian, and uploaded a new version
697 2.2013.01.09 to unstable. I also discovered that the current
698 &lt;a href=&quot;http://packages.qa.debian.org/d/discover.html&quot;&gt;discover&lt;/a&gt;
699 package in Debian no longer discovered any USB devices, because
700 /proc/bus/usb/devices is no longer present. I ported it to use
701 libusb as a fall back option to get it working. The fixed package
702 version 2.1.2-6 is now in experimental (didn&#39;t upload it to unstable
703 because of the freeze).&lt;/p&gt;
704
705 &lt;p&gt;With this prototype in place, I can insert my Yubikey, and get this
706 desktop notification to show up (only once, the first time it is
707 inserted):&lt;/p&gt;
708
709 &lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png&quot;&gt;&lt;/p&gt;
710
711 &lt;p&gt;For this prototype to be really useful, some way to automatically
712 install the proposed packages by pressing the &quot;Please install
713 program(s)&quot; button should to be implemented.&lt;/p&gt;
714
715 &lt;p&gt;If this idea seem useful to you, and you want to help make it
716 happen, please help me update the discover-data database with mappings
717 from hardware to Debian packages. Check if &#39;discover-pkginstall -l&#39;
718 list the package you would like to have installed when a given
719 hardware device is inserted into your computer, and report bugs using
720 reportbug if it isn&#39;t. Or, if you know of a better way to provide
721 such mapping, please let me know.&lt;/p&gt;
722
723 &lt;p&gt;This prototype need more work, and there are several questions that
724 should be considered before it is ready for production use. Is dbus
725 the correct way to detect new hardware? At the moment I look for HAL
726 dbus events on the system bus, because that is the events I could see
727 on my Debian Squeeze KDE desktop. Are there better events to use?
728 How should the user be notified? Is the desktop notification
729 mechanism the best option, or should the background daemon raise a
730 popup instead? How should packages be installed? When should they
731 not be installed?&lt;/p&gt;
732
733 &lt;p&gt;If you want to help getting such feature implemented in Debian,
734 please send me an email. :)&lt;/p&gt;
735 </description>
736 </item>
737
738 <item>
739 <title>New IRC channel for LEGO designers using Debian</title>
740 <link>http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html</link>
741 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html</guid>
742 <pubDate>Wed, 2 Jan 2013 15:40:00 +0100</pubDate>
743 <description>&lt;p&gt;During Christmas, I have worked a bit on the Debian support for
744 &lt;a href=&quot;http://mindstorms.lego.com/en-us/Default.aspx&quot;&gt;LEGO Mindstorm
745 NXT&lt;/a&gt;. My son and I have played a bit with my NXT set, and I
746 discovered I had to build all the tools myself because none were
747 already in Debian Squeeze. If Debian support for LEGO is something
748 you care about, please join me on the IRC channel
749 &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;#debian-lego&lt;/a&gt; (server
750 irc.debian.org). There is a lot that could be done to improve the
751 Debian support for LEGO designers. For example both CAD software
752 and Mindstorm compilers are missing. :)&lt;/p&gt;
753
754 &lt;p&gt;Update 2012-01-03: A
755 &lt;a href=&quot;http://wiki.debian.org/LegoDesigners&quot;&gt;project page&lt;/a&gt;
756 including links to Lego related packages is now available.&lt;/p&gt;
757 </description>
758 </item>
759
760 <item>
761 <title>Lenker for 2013-01-01</title>
762 <link>http://people.skolelinux.org/pere/blog/Lenker_for_2013_01_01.html</link>
763 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Lenker_for_2013_01_01.html</guid>
764 <pubDate>Tue, 1 Jan 2013 09:20:00 +0100</pubDate>
765 <description>&lt;p&gt;Her er noen lenker til tekster jeg har satt pris på å lese den
766 siste måneden.&lt;/p&gt;
767
768 &lt;ul&gt;
769
770 &lt;li&gt;2012-12-07
771 &lt;a href=&quot;http://www.idg.no/computerworld/article262047.ece&quot;&gt;Myter og
772 FUD om fri programvare&lt;/a&gt; av min venn Christer Gundersen som
773 kommenterer noen av de påstandene som er spredt via Computerworld
774 Norge de siste månedene.&lt;/li&gt;
775
776 &lt;li&gt;BankID er et opplegg der utsteder (dvs. banken eller dens
777 leverandør) sitter på alt som trengs for å bruke BankID, men har
778 lovet å ikke bruke den unntatt på oppdrag fra deg. Det er greit nok
779 for banktjenester, der banken allerede har full kontroll over
780 resultatet, men problematisk når det gjelder tilgang til
781 helseopplysninger og avtaleinngåelse med andre enn banken. Jeg
782 håper protestene brer om seg.
783
784 &lt;ul&gt;
785
786 &lt;li&gt;2012-12-11 &lt;a href=&quot;http://www.aftenposten.no/meninger/debatt/BankID-blottlegger-helseopplysninger-7067148.html&quot;&gt;BankID
787 blottlegger helseopplysninger&lt;/a&gt;&lt;/li&gt;
788
789 &lt;li&gt;2012-12-07 &lt;a href=&quot;http://www.nrk.no/nyheter/norge/1.9695027&quot;&gt;-
790 Helseopplysningene ikke sikre med Bank-ID&lt;/a&gt;&lt;/li&gt;
791
792 &lt;li&gt;2012-12-07
793 &lt;a href=&quot;https://www.bankid.no/Presse-og-nyheter/Nyhetsarkiv/2012/Papeker-alvorlige-men-kjente-utfordringer/&quot;&gt;Påpeker
794 alvorlige, men kjente utfordringer&lt;/a&gt; er den offisielle
795 holdningen til de som lager BankID.&lt;/li&gt;
796
797 &lt;li&gt;2012-12-08
798 &lt;a href=&quot;http://www.tnp.no/norway/panorama/3419-ntnu-researcher-warns-against-security-of-bank-id-password&quot;&gt;NTNU
799 Researcher Warns against Security of Bank ID Password&lt;/a&gt;
800
801 &lt;/ul&gt;
802
803 &lt;li&gt;2012-12-11 &lt;a href=&quot;http://www.aftenposten.no/nyheter/iriks/Norske-elever-er-darligst-i-Europa-pa-algebra-7066752.html&quot;&gt;Norske elever er dårligst i Europa på algebra&lt;/a&gt;
804
805 &lt;li&gt;2012-12-11
806 &lt;a href=&quot;http://www.aftenposten.no/meninger/debatt/Realfagsdodaren-7067173.html&quot;&gt;Realfagsdødaren&lt;/a&gt;
807
808 &lt;li&gt;2012-12-21
809 &lt;a href=&quot;http://www.bt.no/nyheter/innenriks/112/--Forventningene-er-for-hoye-2816450.html&quot;&gt;-
810 Noen må bli skuffet&lt;/a&gt; - Politiet i Bergen forteller hvor lavt de
811 prioriterer hverdagskriminalitet.&lt;/li&gt;
812
813 &lt;li&gt;2012-05-03
814 &lt;a href=&quot;http://e24.no/jobb/kripos-ansatt-doemt-for-snoking-for-venn/20208585&quot;&gt;
815 Kripos-ansatt dømt for snoking for venn&lt;/A&gt; - viser hvor svak
816 reaksjonen blir når politiet misbruker innsamlet informasjon. En
817 forvarsel på konsekvensene av nasjonal brev- og besøkskontroll -
818 ofte kalt Datalagringsdirektivet.&lt;/li&gt;
819
820 &lt;li&gt;2012-12-14
821 &lt;a href=&quot;http://www.dagbladet.no/2012/12/14/kultur/debatt/kronikk/jul/ensomhet/24838541/&quot;&gt;Å
822 smøre en forskjell&lt;/a&gt; - om ensomhet og jul.&lt;/li&gt;
823
824 &lt;li&gt;2012-12-18
825 &lt;a href=&quot;http://www.aftenposten.no/meninger/kronikker/n-krise-av-gangen_-takk-7072452.html&quot;&gt;Én
826 krise av gangen, takk!&lt;/a&gt;
827
828
829 &lt;li&gt;2012-12-17
830 &lt;a href=&quot;http://www.aftenposten.no/meninger/NAV-Et-mangehodet-monster--7072165.html&quot;&gt;NAV:
831 Et mangehodet monster&lt;/a&gt;&lt;/li&gt;
832
833 &lt;li&gt;2011-01-12
834 &lt;a href=&quot;http://www.dagbladet.no/2011/01/12/kultur/debatt/kronikk/personvern/15027203/&quot;&gt;Pasienter
835 uten vern&lt;/a&gt; - forteller litt om hvordan Norsk Pasientregister og
836 andre helseregister raderer bort pasienters privatsfære.&lt;/li&gt;
837
838
839 &lt;li&gt;2012-12-19
840 &lt;a href=&quot;http://www.aftenposten.no/meninger/debatt/Hvorfor-er-barnefamilier-fattige-7073951.html&quot;&gt;Hvorfor
841 er barnefamilier fattige?&lt;/a&gt;&lt;/li&gt;
842
843 &lt;li&gt;2012-12-25
844 &lt;a href=&quot;http://www.aftenposten.no/meninger/spaltister/Den-skjulte-minoriteten--konservative-kristne-i-Norge-7075518.html&quot;&gt;Den
845 skjulte minoriteten – konservative kristne i Norge&lt;/a&gt; - kronikk av
846 Bjørn Stærk fra aftenposten&lt;/li&gt;
847
848 &lt;li&gt;2009-05-04
849 &lt;a href=&quot;http://deltemeninger.no/-/bulletin/show/303429_folkebiblioteket-2-0?ref=checkpoint&quot;&gt;Folkebiblioteket
850 2.0&lt;/a&gt; - Min venn Sturle om opphavsrett og Internett, i debatt med
851 Olav Torvund.&lt;/li&gt;
852
853 &lt;/ul&gt;
854
855 &lt;p&gt;Og et godt nytt år til dere alle!&lt;/p&gt;
856 </description>
857 </item>
858
859 <item>
860 <title>A Christmas present for Skolelinux / Debian Edu</title>
861 <link>http://people.skolelinux.org/pere/blog/A_Christmas_present_for_Skolelinux___Debian_Edu.html</link>
862 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/A_Christmas_present_for_Skolelinux___Debian_Edu.html</guid>
863 <pubDate>Fri, 28 Dec 2012 09:20:00 +0100</pubDate>
864 <description>&lt;p&gt;I was happy to discover a few days ago that the
865 &lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Skolelinux / Debian Edu&lt;/a&gt;
866 project also this year received a Christmas present from Another
867 Agency in Trondheim. NOK 1000,- showed up on our donation account
868 December 24th. I want to express our thanks for this very welcome
869 present. As the Debian Edu / Skolelinux project is very short on
870 funding these days, and thus lack the money to do regular developer
871 gatherings, this donation was most welcome. One developer gathering
872 cost around NOK 15&amp;nbsp;000,-, so we need quite a lot more to keep the
873 development pace we want. Thus, I hope their example this year is
874 followed by many others. :)&lt;/p&gt;
875
876 &lt;p&gt;The public list of donors can be found on
877 &lt;a href=&quot;http://www.linuxiskolen.no/slxdebianlabs/donations.html&quot;&gt;the
878 donation page&lt;/a&gt; for the project, which also contain instructions if
879 you want to donate to the project.&lt;/p&gt;
880 </description>
881 </item>
882
883 </channel>
884 </rss>