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