]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2013/01/index.html
Generated.
[homepage.git] / blog / archive / 2013 / 01 / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen: entries from January 2013</title>
7 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel="alternate" title="RSS Feed" href="01.rss" type="application/rss+xml" />
10 </head>
11 <body>
12 <!-- XML FEED -->
13 <div class="title">
14 <h1>
15 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
16
17 </h1>
18
19 </div>
20
21
22 <h3>Entries from January 2013.</h3>
23
24 <div class="entry">
25 <div class="title">
26 <a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">What is the most supported MIME type in Debian?</a>
27 </div>
28 <div class="date">
29 16th January 2013
30 </div>
31 <div class="body">
32 <p>The <a href="http://wiki.debian.org/AppStreamDebianProposal">DEP-11
33 proposal to add AppStream information to the Debian archive</a>, is a
34 proposal to make it possible for a Desktop application to propose to
35 the user some package to install to gain support for a given MIME
36 type, font, library etc. that is currently missing. With such
37 mechanism in place, it would be possible for the desktop to
38 automatically propose and install leocad if some LDraw file is
39 downloaded by the browser.</p>
40
41 <p>To get some idea about the current content of the archive, I decided
42 to write a simple program to extract all .desktop files from the
43 Debian archive and look up the claimed MIME support there. The result
44 can be found on the
45 <a href="http://ftp.skolelinux.org/pub/AppStreamTest">Skolelinux FTP
46 site</a>. Using the collected information, it become possible to
47 answer the question in the title. Here are the 20 most supported MIME
48 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
49 The complete list is available from the link above.</p>
50
51 <p><strong>Debian Stable:</strong></p>
52
53 <pre>
54 count MIME type
55 ----- -----------------------
56 32 text/plain
57 30 audio/mpeg
58 29 image/png
59 28 image/jpeg
60 27 application/ogg
61 26 audio/x-mp3
62 25 image/tiff
63 25 image/gif
64 22 image/bmp
65 22 audio/x-wav
66 20 audio/x-flac
67 19 audio/x-mpegurl
68 18 video/x-ms-asf
69 18 audio/x-musepack
70 18 audio/x-mpeg
71 18 application/x-ogg
72 17 video/mpeg
73 17 audio/x-scpls
74 17 audio/ogg
75 16 video/x-ms-wmv
76 </pre>
77
78 <p><strong>Debian Testing:</strong></p>
79
80 <pre>
81 count MIME type
82 ----- -----------------------
83 33 text/plain
84 32 image/png
85 32 image/jpeg
86 29 audio/mpeg
87 27 image/gif
88 26 image/tiff
89 26 application/ogg
90 25 audio/x-mp3
91 22 image/bmp
92 21 audio/x-wav
93 19 audio/x-mpegurl
94 19 audio/x-mpeg
95 18 video/mpeg
96 18 audio/x-scpls
97 18 audio/x-flac
98 18 application/x-ogg
99 17 video/x-ms-asf
100 17 text/html
101 17 audio/x-musepack
102 16 image/x-xbitmap
103 </pre>
104
105 <p><strong>Debian Unstable:</strong></p>
106
107 <pre>
108 count MIME type
109 ----- -----------------------
110 31 text/plain
111 31 image/png
112 31 image/jpeg
113 29 audio/mpeg
114 28 application/ogg
115 27 image/gif
116 26 image/tiff
117 26 audio/x-mp3
118 23 audio/x-wav
119 22 image/bmp
120 21 audio/x-flac
121 20 audio/x-mpegurl
122 19 audio/x-mpeg
123 18 video/x-ms-asf
124 18 video/mpeg
125 18 audio/x-scpls
126 18 application/x-ogg
127 17 audio/x-musepack
128 16 video/x-ms-wmv
129 16 video/x-msvideo
130 </pre>
131
132 <p>I am told that PackageKit can provide an API to access the kind of
133 information mentioned in DEP-11. I have not yet had time to look at
134 it, but hope the PackageKit people in Debian are on top of these
135 issues.</p>
136
137 <p><strong>Update 2013-01-16 13:35</strong>: Updated numbers after
138 discovering a typo in my script.</p>
139
140 </div>
141 <div class="tags">
142
143
144 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
145
146
147 </div>
148 </div>
149 <div class="padding"></div>
150
151 <div class="entry">
152 <div class="title">
153 <a href="http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html">Using modalias info to find packages handling my hardware</a>
154 </div>
155 <div class="date">
156 15th January 2013
157 </div>
158 <div class="body">
159 <p>Yesterday, I wrote about the
160 <a href="http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">modalias
161 values provided by the Linux kernel</a> following my hope for
162 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">better
163 dongle support in Debian</a>. Using this knowledge, I have tested how
164 modalias values attached to package names can be used to map packages
165 to hardware. This allow the system to look up and suggest relevant
166 packages when I plug in some new hardware into my machine, and replace
167 discover and discover-data as the database used to map hardware to
168 packages.</p>
169
170 <p>I create a modaliases file with entries like the following,
171 containing package name, kernel module name (if relevant, otherwise
172 the package name) and globs matching the relevant hardware
173 modalias.</p>
174
175 <p><blockquote>
176 Package: package-name
177 <br>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)</p>
178 </blockquote></p>
179
180 <p>It is fairly trivial to write code to find the relevant packages
181 for a given modalias value using this file.</p>
182
183 <p>An entry like this would suggest the video and picture application
184 cheese for many USB web cameras (interface bus class 0E01):</p>
185
186 <p><blockquote>
187 Package: cheese
188 <br>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)</p>
189 </blockquote></p>
190
191 <p>An entry like this would suggest the pcmciautils package when a
192 CardBus bridge (bus class 0607) PCI device is present:</p>
193
194 <p><blockquote>
195 Package: pcmciautils
196 <br>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
197 </blockquote></p>
198
199 <p>An entry like this would suggest the package colorhug-client when
200 plugging in a ColorHug with USB IDs 04D8:F8DA:</p>
201
202 <p><blockquote>
203 Package: colorhug-client
204 <br>Modaliases: colorhug-client(usb:v04D8pF8DAd*)</p>
205 </blockquote></p>
206
207 <p>I believe the format is compatible with the format of the Packages
208 file in the Debian archive. Ubuntu already uses their Packages file
209 to store their mappings from packages to hardware.</p>
210
211 <p>By adding a XB-Modaliases: header in debian/control, any .deb can
212 announce the hardware it support in a way my prototype understand.
213 This allow those publishing packages in an APT source outside the
214 Debian archive as well as those backporting packages to make sure the
215 hardware mapping are included in the package meta information. I've
216 tested such header in the pymissile package, and its modalias mapping
217 is working as it should with my prototype. It even made it to Ubuntu
218 Raring.</p>
219
220 <p>To test if it was possible to look up supported hardware using only
221 the shell tools available in the Debian installer, I wrote a shell
222 implementation of the lookup code. The idea is to create files for
223 each modalias and let the shell do the matching. Please check out and
224 try the
225 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co">hw-support-lookup</a>
226 shell script. It run without any extra dependencies and fetch the
227 hardware mappings from the Debian archive and the subversion
228 repository where I currently work on my prototype.</p>
229
230 <p>When I use it on a machine with a yubikey inserted, it suggest to
231 install yubikey-personalization:</p>
232
233 <p><blockquote>
234 % ./hw-support-lookup
235 <br>yubikey-personalization
236 <br>%
237 </blockquote></p>
238
239 <p>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
240 propose to install the pcmciautils package:</p>
241
242 <p><blockquote>
243 % ./hw-support-lookup
244 <br>pcmciautils
245 <br>%
246 </blockquote></p>
247
248 <p>If you know of any hardware-package mapping that should be added to
249 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co">my
250 database</a>, please tell me about it.</p>
251
252 <p>It could be possible to generate several of the mappings between
253 packages and hardware. One source would be to look at packages with
254 kernel modules, ie packages with *.ko files in /lib/modules/, and
255 extract their modalias information. Another would be to look at
256 packages with udev rules, ie packages with files in
257 /lib/udev/rules.d/, and extract their vendor/model information to
258 generate a modalias matching rule. I have not tested any of these to
259 see if it work.</p>
260
261 <p>If you want to help implementing a system to let us propose what
262 packages to install when new hardware is plugged into a Debian
263 machine, please send me an email or talk to me on
264 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
265
266 </div>
267 <div class="tags">
268
269
270 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
271
272
273 </div>
274 </div>
275 <div class="padding"></div>
276
277 <div class="entry">
278 <div class="title">
279 <a href="http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">Modalias strings - a practical way to map "stuff" to hardware</a>
280 </div>
281 <div class="date">
282 14th January 2013
283 </div>
284 <div class="body">
285 <p>While looking into how to look up Debian packages based on hardware
286 information, to find the packages that support a given piece of
287 hardware, I refreshed my memory regarding modalias values, and decided
288 to document the details. Here are my findings so far, also available
289 in
290 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
291 Debian Edu subversion repository</a>:
292
293 <p><strong>Modalias decoded</strong></p>
294
295 <p>This document try to explain what the different types of modalias
296 values stands for. It is in part based on information from
297 &lt;URL: <a href="https://wiki.archlinux.org/index.php/Modalias">https://wiki.archlinux.org/index.php/Modalias</a> &gt;,
298 &lt;URL: <a href="http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device">http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device</a> &gt;,
299 &lt;URL: <a href="http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c">http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c</a> &gt; and
300 &lt;URL: <a href="http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&view=markup">http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&view=markup</a> &gt;.
301
302 <p>The modalias entries for a given Linux machine can be found using
303 this shell script:</p>
304
305 <pre>
306 find /sys -name modalias -print0 | xargs -0 cat | sort -u
307 </pre>
308
309 <p>The supported modalias globs for a given kernel module can be found
310 using modinfo:</p>
311
312 <pre>
313 % /sbin/modinfo psmouse | grep alias:
314 alias: serio:ty05pr*id*ex*
315 alias: serio:ty01pr*id*ex*
316 %
317 </pre>
318
319 <p><strong>PCI subtype</strong></p>
320
321 <p>A typical PCI entry can look like this. This is an Intel Host
322 Bridge memory controller:</p>
323
324 <p><blockquote>
325 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
326 </blockquote></p>
327
328 <p>This represent these values:</p>
329
330 <pre>
331 v 00008086 (vendor)
332 d 00002770 (device)
333 sv 00001028 (subvendor)
334 sd 000001AD (subdevice)
335 bc 06 (bus class)
336 sc 00 (bus subclass)
337 i 00 (interface)
338 </pre>
339
340 <p>The vendor/device values are the same values outputted from 'lspci
341 -n' as 8086:2770. The bus class/subclass is also shown by lspci as
342 0600. The 0600 class is a host bridge. Other useful bus values are
343 0300 (VGA compatible card) and 0200 (Ethernet controller).</p>
344
345 <p>Not sure how to figure out the interface value, nor what it
346 means.</p>
347
348 <p><strong>USB subtype</strong></p>
349
350 <p>Some typical USB entries can look like this. This is an internal
351 USB hub in a laptop:</p>
352
353 <p><blockquote>
354 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
355 </blockquote></p>
356
357 <p>Here is the values included in this alias:</p>
358
359 <pre>
360 v 1D6B (device vendor)
361 p 0001 (device product)
362 d 0206 (bcddevice)
363 dc 09 (device class)
364 dsc 00 (device subclass)
365 dp 00 (device protocol)
366 ic 09 (interface class)
367 isc 00 (interface subclass)
368 ip 00 (interface protocol)
369 </pre>
370
371 <p>The 0900 device class/subclass means hub. Some times the relevant
372 class is in the interface class section. For a simple USB web camera,
373 these alias entries show up:</p>
374
375 <p><blockquote>
376 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
377 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
378 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
379 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
380 </blockquote></p>
381
382 <p>Interface class 0E01 is video control, 0E02 is video streaming (aka
383 camera), 0101 is audio control device and 0102 is audio streaming (aka
384 microphone). Thus this is a camera with microphone included.</p>
385
386 <p><strong>ACPI subtype</strong></p>
387
388 <p>The ACPI type is used for several non-PCI/USB stuff. This is an IR
389 receiver in a Thinkpad X40:</p>
390
391 <p><blockquote>
392 acpi:IBM0071:PNP0511:
393 </blockquote></p>
394
395 <p>The values between the colons are IDs.</p>
396
397 <p><strong>DMI subtype</strong></p>
398
399 <p>The DMI table contain lots of information about the computer case
400 and model. This is an entry for a IBM Thinkpad X40, fetched from
401 /sys/devices/virtual/dmi/id/modalias:</p>
402
403 <p><blockquote>
404 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
405 </blockquote></p>
406
407 <p>The values present are</p>
408
409 <pre>
410 bvn IBM (BIOS vendor)
411 bvr 1UETB6WW(1.66) (BIOS version)
412 bd 06/15/2005 (BIOS date)
413 svn IBM (system vendor)
414 pn 2371H4G (product name)
415 pvr ThinkPadX40 (product version)
416 rvn IBM (board vendor)
417 rn 2371H4G (board name)
418 rvr NotAvailable (board version)
419 cvn IBM (chassis vendor)
420 ct 10 (chassis type)
421 cvr NotAvailable (chassis version)
422 </pre>
423
424 <p>The chassis type 10 is Notebook. Other interesting values can be
425 found in the dmidecode source:</p>
426
427 <pre>
428 3 Desktop
429 4 Low Profile Desktop
430 5 Pizza Box
431 6 Mini Tower
432 7 Tower
433 8 Portable
434 9 Laptop
435 10 Notebook
436 11 Hand Held
437 12 Docking Station
438 13 All In One
439 14 Sub Notebook
440 15 Space-saving
441 16 Lunch Box
442 17 Main Server Chassis
443 18 Expansion Chassis
444 19 Sub Chassis
445 20 Bus Expansion Chassis
446 21 Peripheral Chassis
447 22 RAID Chassis
448 23 Rack Mount Chassis
449 24 Sealed-case PC
450 25 Multi-system
451 26 CompactPCI
452 27 AdvancedTCA
453 28 Blade
454 29 Blade Enclosing
455 </pre>
456
457 <p>The chassis type values are not always accurately set in the DMI
458 table. For example my home server is a tower, but the DMI modalias
459 claim it is a desktop.</p>
460
461 <p><strong>SerIO subtype</strong></p>
462
463 <p>This type is used for PS/2 mouse plugs. One example is from my
464 test machine:</p>
465
466 <p><blockquote>
467 serio:ty01pr00id00ex00
468 </blockquote></p>
469
470 <p>The values present are</p>
471
472 <pre>
473 ty 01 (type)
474 pr 00 (prototype)
475 id 00 (id)
476 ex 00 (extra)
477 </pre>
478
479 <p>This type is supported by the psmouse driver. I am not sure what
480 the valid values are.</p>
481
482 <p><strong>Other subtypes</strong></p>
483
484 <p>There are heaps of other modalias subtypes according to
485 file2alias.c. There is the rest of the list from that source: amba,
486 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
487 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
488 vmbus, x86cpu and zorro. I did not spend time documenting all of
489 these, as they do not seem relevant for my intended use with mapping
490 hardware to packages when new stuff is inserted during run time.</p>
491
492 <p><strong>Looking up kernel modules using modalias values</strong></p>
493
494 <p>To check which kernel modules provide support for a given modalias,
495 one can use the following shell script:</p>
496
497 <pre>
498 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
499 echo "$id" ; \
500 /sbin/modprobe --show-depends "$id"|sed 's/^/ /' ; \
501 done
502 </pre>
503
504 <p>The output can look like this (only the first few entries as the
505 list is very long on my test machine):</p>
506
507 <pre>
508 acpi:ACPI0003:
509 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
510 acpi:device:
511 FATAL: Module acpi:device: not found.
512 acpi:IBM0068:
513 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
514 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
515 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
516 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
517 acpi:IBM0071:PNP0511:
518 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
519 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
520 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
521 [...]
522 </pre>
523
524 <p>If you want to help implementing a system to let us propose what
525 packages to install when new hardware is plugged into a Debian
526 machine, please send me an email or talk to me on
527 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
528
529 <p><strong>Update 2013-01-15:</strong> Rewrite "cat $(find ...)" to
530 "find ... -print0 | xargs -0 cat" to make sure it handle directories
531 in /sys/ with space in them.</p>
532
533 </div>
534 <div class="tags">
535
536
537 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
538
539
540 </div>
541 </div>
542 <div class="padding"></div>
543
544 <div class="entry">
545 <div class="title">
546 <a href="http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html">Moved the pymissile Debian packaging to collab-maint</a>
547 </div>
548 <div class="date">
549 10th January 2013
550 </div>
551 <div class="body">
552 <p>As part of my investigation on how to improve the support in Debian
553 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
554 Launcher and updated the Debian package
555 <a href="http://packages.qa.debian.org/pymissile">pymissile</a> to make
556 sure udev will fix the device permissions when it is plugged in. I
557 also added a "Modaliases" header to test it in the Debian archive and
558 hopefully make the package be proposed by jockey in Ubuntu when a user
559 plug in his rocket launcher. In the process I moved the source to a
560 git repository under collab-maint, to make it easier for any DD to
561 contribute. <a href="http://code.google.com/p/pymissile/">Upstream</a>
562 is not very active, but the software still work for me even after five
563 years of relative silence. The new git repository is not listed in
564 the uploaded package yet, because I want to test the other changes a
565 bit more before I upload the new version. If you want to check out
566 the new version with a .desktop file included, visit the
567 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git">gitweb
568 view</a> or use "<tt>git clone
569 git://anonscm.debian.org/collab-maint/pymissile.git</tt>".</p>
570
571 </div>
572 <div class="tags">
573
574
575 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
576
577
578 </div>
579 </div>
580 <div class="padding"></div>
581
582 <div class="entry">
583 <div class="title">
584 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">Lets make hardware dongles easier to use in Debian</a>
585 </div>
586 <div class="date">
587 9th January 2013
588 </div>
589 <div class="body">
590 <p>One thing that annoys me with Debian and Linux distributions in
591 general, is that there is a great package management system with the
592 ability to automatically install software packages by downloading them
593 from the distribution mirrors, but no way to get it to automatically
594 install the packages I need to use the hardware I plug into my
595 machine. Even if the package to use it is easily available from the
596 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
597 suggest to automatically install the python-nxt, nbc and t2n packages
598 I need to talk to it. When I plug in a Yubikey, it could propose the
599 yubikey-personalization package. The information required to do this
600 is available, but no-one have pulled all the pieces together.</p>
601
602 <p>Some years ago, I proposed to
603 <a href="http://lists.debian.org/debian-devel/2010/05/msg01206.html">use
604 the discover subsystem to implement this</a>. The idea is fairly
605 simple:
606
607 <ul>
608
609 <li>Add a desktop entry in /usr/share/autostart/ pointing to a program
610 starting when a user log in.</li>
611
612 <li>Set this program up to listen for kernel events emitted when new
613 hardware is inserted into the computer.</li>
614
615 <li>When new hardware is inserted, look up the hardware ID in a
616 database mapping to packages, and take note of any non-installed
617 packages.</li>
618
619 <li>Show a message to the user proposing to install the discovered
620 package, and make it easy to install it.</li>
621
622 </ul>
623
624 <p>I am not sure what the best way to implement this is, but my
625 initial idea was to use dbus events to discover new hardware, the
626 discover database to find packages and
627 <a href="http://www.packagekit.org/">PackageKit</a> to install
628 packages.</p>
629
630 <p>Yesterday, I found time to try to implement this idea, and the
631 draft package is now checked into
632 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
633 Debian Edu subversion repository</a>. In the process, I updated the
634 <a href="http://packages.qa.debian.org/d/discover-data.html">discover-data</a>
635 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
636 the relevant packages in Debian, and uploaded a new version
637 2.2013.01.09 to unstable. I also discovered that the current
638 <a href="http://packages.qa.debian.org/d/discover.html">discover</a>
639 package in Debian no longer discovered any USB devices, because
640 /proc/bus/usb/devices is no longer present. I ported it to use
641 libusb as a fall back option to get it working. The fixed package
642 version 2.1.2-6 is now in experimental (didn't upload it to unstable
643 because of the freeze).</p>
644
645 <p>With this prototype in place, I can insert my Yubikey, and get this
646 desktop notification to show up (only once, the first time it is
647 inserted):</p>
648
649 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png"></p>
650
651 <p>For this prototype to be really useful, some way to automatically
652 install the proposed packages by pressing the "Please install
653 program(s)" button should to be implemented.</p>
654
655 <p>If this idea seem useful to you, and you want to help make it
656 happen, please help me update the discover-data database with mappings
657 from hardware to Debian packages. Check if 'discover-pkginstall -l'
658 list the package you would like to have installed when a given
659 hardware device is inserted into your computer, and report bugs using
660 reportbug if it isn't. Or, if you know of a better way to provide
661 such mapping, please let me know.</p>
662
663 <p>This prototype need more work, and there are several questions that
664 should be considered before it is ready for production use. Is dbus
665 the correct way to detect new hardware? At the moment I look for HAL
666 dbus events on the system bus, because that is the events I could see
667 on my Debian Squeeze KDE desktop. Are there better events to use?
668 How should the user be notified? Is the desktop notification
669 mechanism the best option, or should the background daemon raise a
670 popup instead? How should packages be installed? When should they
671 not be installed?</p>
672
673 <p>If you want to help getting such feature implemented in Debian,
674 please send me an email. :)</p>
675
676 </div>
677 <div class="tags">
678
679
680 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
681
682
683 </div>
684 </div>
685 <div class="padding"></div>
686
687 <div class="entry">
688 <div class="title">
689 <a href="http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html">New IRC channel for LEGO designers using Debian</a>
690 </div>
691 <div class="date">
692 2nd January 2013
693 </div>
694 <div class="body">
695 <p>During Christmas, I have worked a bit on the Debian support for
696 <a href="http://mindstorms.lego.com/en-us/Default.aspx">LEGO Mindstorm
697 NXT</a>. My son and I have played a bit with my NXT set, and I
698 discovered I had to build all the tools myself because none were
699 already in Debian Squeeze. If Debian support for LEGO is something
700 you care about, please join me on the IRC channel
701 <a href="irc://irc.debian.org/%23debian-lego">#debian-lego</a> (server
702 irc.debian.org). There is a lot that could be done to improve the
703 Debian support for LEGO designers. For example both CAD software
704 and Mindstorm compilers are missing. :)</p>
705
706 <p>Update 2012-01-03: A
707 <a href="http://wiki.debian.org/LegoDesigners">project page</a>
708 including links to Lego related packages is now available.</p>
709
710 </div>
711 <div class="tags">
712
713
714 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
715
716
717 </div>
718 </div>
719 <div class="padding"></div>
720
721 <div class="entry">
722 <div class="title">
723 <a href="http://people.skolelinux.org/pere/blog/Lenker_for_2013_01_01.html">Lenker for 2013-01-01</a>
724 </div>
725 <div class="date">
726 1st January 2013
727 </div>
728 <div class="body">
729 <p>Her er noen lenker til tekster jeg har satt pris på å lese den
730 siste måneden.</p>
731
732 <ul>
733
734 <li>2012-12-07
735 <a href="http://www.idg.no/computerworld/article262047.ece">Myter og
736 FUD om fri programvare</a> av min venn Christer Gundersen som
737 kommenterer noen av de påstandene som er spredt via Computerworld
738 Norge de siste månedene.</li>
739
740 <li>BankID er et opplegg der utsteder (dvs. banken eller dens
741 leverandør) sitter på alt som trengs for å bruke BankID, men har
742 lovet å ikke bruke den unntatt på oppdrag fra deg. Det er greit nok
743 for banktjenester, der banken allerede har full kontroll over
744 resultatet, men problematisk når det gjelder tilgang til
745 helseopplysninger og avtaleinngåelse med andre enn banken. Jeg
746 håper protestene brer om seg.
747
748 <ul>
749
750 <li>2012-12-11 <a href="http://www.aftenposten.no/meninger/debatt/BankID-blottlegger-helseopplysninger-7067148.html">BankID
751 blottlegger helseopplysninger</a></li>
752
753 <li>2012-12-07 <a href="http://www.nrk.no/nyheter/norge/1.9695027">-
754 Helseopplysningene ikke sikre med Bank-ID</a></li>
755
756 <li>2012-12-07
757 <a href="https://www.bankid.no/Presse-og-nyheter/Nyhetsarkiv/2012/Papeker-alvorlige-men-kjente-utfordringer/">PÃ¥peker
758 alvorlige, men kjente utfordringer</a> er den offisielle
759 holdningen til de som lager BankID.</li>
760
761 <li>2012-12-08
762 <a href="http://www.tnp.no/norway/panorama/3419-ntnu-researcher-warns-against-security-of-bank-id-password">NTNU
763 Researcher Warns against Security of Bank ID Password</a>
764
765 </ul>
766
767 <li>2012-12-11 <a href="http://www.aftenposten.no/nyheter/iriks/Norske-elever-er-darligst-i-Europa-pa-algebra-7066752.html">Norske elever er dårligst i Europa på algebra</a>
768
769 <li>2012-12-11
770 <a href="http://www.aftenposten.no/meninger/debatt/Realfagsdodaren-7067173.html">Realfagsdødaren</a>
771
772 <li>2012-12-21
773 <a href="http://www.bt.no/nyheter/innenriks/112/--Forventningene-er-for-hoye-2816450.html">-
774 Noen må bli skuffet</a> - Politiet i Bergen forteller hvor lavt de
775 prioriterer hverdagskriminalitet.</li>
776
777 <li>2012-05-03
778 <a href="http://e24.no/jobb/kripos-ansatt-doemt-for-snoking-for-venn/20208585">
779 Kripos-ansatt dømt for snoking for venn</A> - viser hvor svak
780 reaksjonen blir når politiet misbruker innsamlet informasjon. En
781 forvarsel på konsekvensene av nasjonal brev- og besøkskontroll -
782 ofte kalt Datalagringsdirektivet.</li>
783
784 <li>2012-12-14
785 <a href="http://www.dagbladet.no/2012/12/14/kultur/debatt/kronikk/jul/ensomhet/24838541/">Ã…
786 smøre en forskjell</a> - om ensomhet og jul.</li>
787
788 <li>2012-12-18
789 <a href="http://www.aftenposten.no/meninger/kronikker/n-krise-av-gangen_-takk-7072452.html">Én
790 krise av gangen, takk!</a>
791
792
793 <li>2012-12-17
794 <a href="http://www.aftenposten.no/meninger/NAV-Et-mangehodet-monster--7072165.html">NAV:
795 Et mangehodet monster</a></li>
796
797 <li>2011-01-12
798 <a href="http://www.dagbladet.no/2011/01/12/kultur/debatt/kronikk/personvern/15027203/">Pasienter
799 uten vern</a> - forteller litt om hvordan Norsk Pasientregister og
800 andre helseregister raderer bort pasienters privatsfære.</li>
801
802
803 <li>2012-12-19
804 <a href="http://www.aftenposten.no/meninger/debatt/Hvorfor-er-barnefamilier-fattige-7073951.html">Hvorfor
805 er barnefamilier fattige?</a></li>
806
807 <li>2012-12-25
808 <a href="http://www.aftenposten.no/meninger/spaltister/Den-skjulte-minoriteten--konservative-kristne-i-Norge-7075518.html">Den
809 skjulte minoriteten – konservative kristne i Norge</a> - kronikk av
810 Bjørn Stærk fra aftenposten</li>
811
812 <li>2009-05-04
813 <a href="http://deltemeninger.no/-/bulletin/show/303429_folkebiblioteket-2-0?ref=checkpoint">Folkebiblioteket
814 2.0</a> - Min venn Sturle om opphavsrett og Internett, i debatt med
815 Olav Torvund.</li>
816
817 </ul>
818
819 <p>Og et godt nytt år til dere alle!</p>
820
821 </div>
822 <div class="tags">
823
824
825 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>.
826
827
828 </div>
829 </div>
830 <div class="padding"></div>
831
832 <p style="text-align: right;"><a href="01.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14" /></a></p>
833 <div id="sidebar">
834
835
836
837 <h2>Archive</h2>
838 <ul>
839
840 <li>2013
841 <ul>
842
843 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (7)</a></li>
844
845 </ul></li>
846
847 <li>2012
848 <ul>
849
850 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
851
852 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
853
854 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
855
856 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
857
858 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
859
860 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
861
862 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
863
864 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
865
866 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
867
868 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
869
870 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
871
872 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
873
874 </ul></li>
875
876 <li>2011
877 <ul>
878
879 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
880
881 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
882
883 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
884
885 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
886
887 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
888
889 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
890
891 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
892
893 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
894
895 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
896
897 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
898
899 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
900
901 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
902
903 </ul></li>
904
905 <li>2010
906 <ul>
907
908 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
909
910 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
911
912 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
913
914 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
915
916 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
917
918 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
919
920 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
921
922 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
923
924 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
925
926 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
927
928 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
929
930 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
931
932 </ul></li>
933
934 <li>2009
935 <ul>
936
937 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
938
939 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
940
941 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
942
943 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
944
945 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
946
947 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
948
949 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
950
951 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
952
953 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
954
955 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
956
957 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
958
959 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
960
961 </ul></li>
962
963 <li>2008
964 <ul>
965
966 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
967
968 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
969
970 </ul></li>
971
972 </ul>
973
974
975
976 <h2>Tags</h2>
977 <ul>
978
979 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
980
981 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
982
983 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
984
985 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
986
987 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (5)</a></li>
988
989 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (12)</a></li>
990
991 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
992
993 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (65)</a></li>
994
995 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (118)</a></li>
996
997 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (9)</a></li>
998
999 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (7)</a></li>
1000
1001 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
1002
1003 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (171)</a></li>
1004
1005 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>
1006
1007 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
1008
1009 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (10)</a></li>
1010
1011 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (9)</a></li>
1012
1013 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (32)</a></li>
1014
1015 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (17)</a></li>
1016
1017 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (8)</a></li>
1018
1019 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (6)</a></li>
1020
1021 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
1022
1023 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (25)</a></li>
1024
1025 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (219)</a></li>
1026
1027 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (148)</a></li>
1028
1029 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (6)</a></li>
1030
1031 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
1032
1033 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (41)</a></li>
1034
1035 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (61)</a></li>
1036
1037 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
1038
1039 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
1040
1041 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (2)</a></li>
1042
1043 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (6)</a></li>
1044
1045 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
1046
1047 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
1048
1049 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
1050
1051 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (28)</a></li>
1052
1053 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
1054
1055 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
1056
1057 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (39)</a></li>
1058
1059 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
1060
1061 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (5)</a></li>
1062
1063 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (12)</a></li>
1064
1065 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (1)</a></li>
1066
1067 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (7)</a></li>
1068
1069 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (35)</a></li>
1070
1071 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
1072
1073 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (26)</a></li>
1074
1075 </ul>
1076
1077
1078 </div>
1079 <p style="text-align: right">
1080 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.4</a>
1081 </p>
1082
1083 </body>
1084 </html>