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