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">
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" />
15 <a href=
"http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen
</a>
22 <h3>Entries from January
2013.
</h3>
26 <a href=
"http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html">First prototype ready making hardware easier to use in Debian
</a>
32 <p>Early this month I set out to try to
33 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">improve
34 the Debian support for pluggable hardware devices
</a>. Now my
35 prototype is working, and it is ready for a larger audience. To test
37 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">source
38 from the Debian Edu subversion repository
</a>, build and install the
39 package. You might have to log out and in again activate the
42 <p>The design is simple:
</p>
46 <li>Add desktop entry in /usr/share/autostart/ causing a program
47 hw-support-handlerd to start when the user log in.
</li>
49 <li>This program listen for kernel events about new hardware (directly
50 from the kernel like udev does), not using HAL dbus events as I
53 <li>When new hardware is inserted, look up the hardware modalias in
54 the APT database, a database
55 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup">available
56 via HTTP
</a> and a database available as part of the package.
</li>
58 <li>If a package is mapped to the hardware in question, the package
59 isn't installed yet and this is the first time the hardware was
60 plugged in, show a desktop notification suggesting to install the
61 package or packages.
</li>
63 <li>If the user click on the 'install package now' button, ask
64 aptdaemon via the PackageKit API to install the requrired package.
</li>
66 <li>aptdaemon ask for root password or sudo password, and install the
67 package while showing progress information in a window.
</li>
71 <p>I still need to come up with a better name for the system. Here
72 are some screen shots showing the prototype in action. First the
73 notification, then the password request, and finally the request to
74 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.
</p>
76 <p><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png">
77 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png">
78 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png">
79 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png">
80 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png" width=
"70%"></p>
82 <p>The prototype still need to be improved with longer timeouts, but
83 is already useful. The database of hardware to package mappings also
84 need more work. It is currently compatible with the Ubuntu way of
85 storing such information in the package control file, but could be
86 changed to use other formats instead or in addition to the current
87 method. I've dropped the use of discover for this mapping, as the
88 modalias approach is more flexible and easier to use on Linux as long
89 as the Linux kernel expose its modalias strings directly.
</p>
91 <p><strong>Update
2013-
01-
21 16:
50</strong>: Due to popular demand,
92 here is the command required to check out and build the source: Use
94 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
95 hw-support-handler; debuild
</tt>'. If you lack debuild, install the
96 devscripts package.
</p>
102 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>.
107 <div class=
"padding"></div>
111 <a href=
"http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">Thank you Thinkpad X41, for your long and trustworthy service
</a>
117 <p>This Christmas my trusty old laptop died. It died quietly and
118 suddenly in bed. With a quiet whimper, it went completely quiet and
119 black. The power button was no longer able to turn it on. It was a
120 IBM Thinkpad X41, and the best laptop I ever had. Better than both
121 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
122 Compaq I had before that. Now I need to find a replacement. To keep
123 going during Christmas, I moved the one year old SSD disk to my old
124 X40 where it fitted (only one I had left that could use it), but it is
125 not a durable solution.
127 <p>My laptop needs are fairly modest. This is my wishlist from when I
128 got a new one more than
10 years ago. It still holds true.:)
</p>
132 <li>Lightweight (around
1 kg) and small volume (preferably smaller
134 <li>Robust, it will be in my backpack every day.
</li>
135 <li>Three button mouse and a mouse pin instead of touch pad.
</li>
136 <li>Long battery life time. Preferable a week.
</li>
137 <li>Internal WIFI network card.
</li>
138 <li>Internal Twisted Pair network card.
</li>
139 <li>Some USB slots (
2-
3 is plenty)
</li>
140 <li>Good keyboard - similar to the Thinkpad.
</li>
141 <li>Video resolution at least
1024x768, with size around
12" (A4 paper
143 <li>Hardware supported by Debian Stable, ie the default kernel and
145 <li>Quiet, preferably fan free (or at least not using the fan most of
150 <p>You will notice that there are no RAM and CPU requirements in the
151 list. The reason is simply that the specifications on laptops the
152 last
10-
15 years have been sufficient for my needs, and I have to look
153 at other features to choose my laptop. But are there still made as
154 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
155 robust, and Thinkpads seem to be heading in the wrong direction since
156 Lenovo took over. But I've been told that X220 and X1 Carbon might
159 <p>Perhaps I should rethink my needs, and look for a pad with an
160 external keyboard? I'll have to check the
161 <a href=
"http://www.linux-laptop.net/">Linux Laptops site
</a> for
162 well-supported laptops, or perhaps just buy one preinstalled from one
163 of the vendors listed on the
<a href=
"http://linuxpreloaded.com/">Linux
164 Pre-loaded site
</a>.
</p>
170 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>.
175 <div class=
"padding"></div>
179 <a href=
"http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html">How to find a browser plugin supporting a given MIME type
</a>
185 <p>Some times I try to figure out which Iceweasel browser plugin to
186 install to get support for a given MIME type. Thanks to
187 <a href=
"https://wiki.ubuntu.com/MozillaTeam/Plugins">specifications
188 done by Ubuntu
</a> and Mozilla, it is possible to do this in Debian.
189 Unfortunately, not very many packages provide the needed meta
190 information, Anyway, here is a small script to look up all browser
191 plugin packages announcing ther MIME support using this specification:
</p>
197 def pkgs_handling_mimetype(mimetype):
202 version = pkg.candidate
204 version = pkg.installed
207 record = version.record
208 if not record.has_key('Npp-MimeType'):
210 mime_types = record['Npp-MimeType'].split(',')
212 t = t.rstrip().strip()
214 thepkgs.append(pkg.name)
216 mimetype = "audio/ogg"
217 if
1 < len(sys.argv):
218 mimetype = sys.argv[
1]
219 print "Browser plugin packages supporting %s:" % mimetype
220 for pkg in pkgs_handling_mimetype(mimetype):
224 <p>It can be used like this to look up a given MIME type:
</p>
227 % ./apt-find-browserplug-for-mimetype
228 Browser plugin packages supporting audio/ogg:
230 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
231 Browser plugin packages supporting application/x-shockwave-flash:
236 <p>In Ubuntu this mechanism is combined with support in the browser
237 itself to query for plugins and propose to install the needed
238 packages. It would be great if Debian supported such feature too. Is
239 anyone working on adding it?
</p>
241 <p><strong>Update
2013-
01-
18 14:
20</strong>: The Debian BTS
242 request for icweasel support for this feature is
243 <a href=
"http://bugs.debian.org/484010">#
484010</a> from
2008 (and
244 <a href=
"http://bugs.debian.org/698426">#
698426</a> from today). Lack
245 of manpower and wish for a different design is the reason thus feature
246 is not yet in iceweasel from Debian.
</p>
252 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>.
257 <div class=
"padding"></div>
261 <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>
267 <p>The
<a href=
"http://wiki.debian.org/AppStreamDebianProposal">DEP-
11
268 proposal to add AppStream information to the Debian archive
</a>, is a
269 proposal to make it possible for a Desktop application to propose to
270 the user some package to install to gain support for a given MIME
271 type, font, library etc. that is currently missing. With such
272 mechanism in place, it would be possible for the desktop to
273 automatically propose and install leocad if some LDraw file is
274 downloaded by the browser.
</p>
276 <p>To get some idea about the current content of the archive, I decided
277 to write a simple program to extract all .desktop files from the
278 Debian archive and look up the claimed MIME support there. The result
280 <a href=
"http://ftp.skolelinux.org/pub/AppStreamTest">Skolelinux FTP
281 site
</a>. Using the collected information, it become possible to
282 answer the question in the title. Here are the
20 most supported MIME
283 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
284 The complete list is available from the link above.
</p>
286 <p><strong>Debian Stable:
</strong></p>
290 ----- -----------------------
313 <p><strong>Debian Testing:
</strong></p>
317 ----- -----------------------
340 <p><strong>Debian Unstable:
</strong></p>
344 ----- -----------------------
367 <p>I am told that PackageKit can provide an API to access the kind of
368 information mentioned in DEP-
11. I have not yet had time to look at
369 it, but hope the PackageKit people in Debian are on top of these
372 <p><strong>Update
2013-
01-
16 13:
35</strong>: Updated numbers after
373 discovering a typo in my script.
</p>
379 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>.
384 <div class=
"padding"></div>
388 <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>
394 <p>Yesterday, I wrote about the
395 <a href=
"http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">modalias
396 values provided by the Linux kernel
</a> following my hope for
397 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">better
398 dongle support in Debian
</a>. Using this knowledge, I have tested how
399 modalias values attached to package names can be used to map packages
400 to hardware. This allow the system to look up and suggest relevant
401 packages when I plug in some new hardware into my machine, and replace
402 discover and discover-data as the database used to map hardware to
405 <p>I create a modaliases file with entries like the following,
406 containing package name, kernel module name (if relevant, otherwise
407 the package name) and globs matching the relevant hardware
411 Package: package-name
412 <br>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)
</p>
415 <p>It is fairly trivial to write code to find the relevant packages
416 for a given modalias value using this file.
</p>
418 <p>An entry like this would suggest the video and picture application
419 cheese for many USB web cameras (interface bus class
0E01):
</p>
423 <br>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)
</p>
426 <p>An entry like this would suggest the pcmciautils package when a
427 CardBus bridge (bus class
0607) PCI device is present:
</p>
431 <br>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
434 <p>An entry like this would suggest the package colorhug-client when
435 plugging in a ColorHug with USB IDs
04D8:F8DA:
</p>
438 Package: colorhug-client
439 <br>Modaliases: colorhug-client(usb:v04D8pF8DAd*)
</p>
442 <p>I believe the format is compatible with the format of the Packages
443 file in the Debian archive. Ubuntu already uses their Packages file
444 to store their mappings from packages to hardware.
</p>
446 <p>By adding a XB-Modaliases: header in debian/control, any .deb can
447 announce the hardware it support in a way my prototype understand.
448 This allow those publishing packages in an APT source outside the
449 Debian archive as well as those backporting packages to make sure the
450 hardware mapping are included in the package meta information. I've
451 tested such header in the pymissile package, and its modalias mapping
452 is working as it should with my prototype. It even made it to Ubuntu
455 <p>To test if it was possible to look up supported hardware using only
456 the shell tools available in the Debian installer, I wrote a shell
457 implementation of the lookup code. The idea is to create files for
458 each modalias and let the shell do the matching. Please check out and
460 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co">hw-support-lookup
</a>
461 shell script. It run without any extra dependencies and fetch the
462 hardware mappings from the Debian archive and the subversion
463 repository where I currently work on my prototype.
</p>
465 <p>When I use it on a machine with a yubikey inserted, it suggest to
466 install yubikey-personalization:
</p>
469 % ./hw-support-lookup
470 <br>yubikey-personalization
474 <p>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
475 propose to install the pcmciautils package:
</p>
478 % ./hw-support-lookup
483 <p>If you know of any hardware-package mapping that should be added to
484 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co">my
485 database
</a>, please tell me about it.
</p>
487 <p>It could be possible to generate several of the mappings between
488 packages and hardware. One source would be to look at packages with
489 kernel modules, ie packages with *.ko files in /lib/modules/, and
490 extract their modalias information. Another would be to look at
491 packages with udev rules, ie packages with files in
492 /lib/udev/rules.d/, and extract their vendor/model information to
493 generate a modalias matching rule. I have not tested any of these to
496 <p>If you want to help implementing a system to let us propose what
497 packages to install when new hardware is plugged into a Debian
498 machine, please send me an email or talk to me on
499 <a href=
"irc://irc.debian.org/%23debian-devel">#debian-devel
</a>.
</p>
505 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>.
510 <div class=
"padding"></div>
514 <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>
520 <p>While looking into how to look up Debian packages based on hardware
521 information, to find the packages that support a given piece of
522 hardware, I refreshed my memory regarding modalias values, and decided
523 to document the details. Here are my findings so far, also available
525 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
526 Debian Edu subversion repository
</a>:
528 <p><strong>Modalias decoded
</strong></p>
530 <p>This document try to explain what the different types of modalias
531 values stands for. It is in part based on information from
532 <URL:
<a href=
"https://wiki.archlinux.org/index.php/Modalias">https://wiki.archlinux.org/index.php/Modalias
</a> >,
533 <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> >,
534 <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> > and
535 <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> >.
537 <p>The modalias entries for a given Linux machine can be found using
538 this shell script:
</p>
541 find /sys -name modalias -print0 | xargs -
0 cat | sort -u
544 <p>The supported modalias globs for a given kernel module can be found
548 % /sbin/modinfo psmouse | grep alias:
549 alias: serio:ty05pr*id*ex*
550 alias: serio:ty01pr*id*ex*
554 <p><strong>PCI subtype
</strong></p>
556 <p>A typical PCI entry can look like this. This is an Intel Host
557 Bridge memory controller:
</p>
560 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
563 <p>This represent these values:
</p>
568 sv
00001028 (subvendor)
569 sd
000001AD (subdevice)
575 <p>The vendor/device values are the same values outputted from 'lspci
576 -n' as
8086:
2770. The bus class/subclass is also shown by lspci as
577 0600. The
0600 class is a host bridge. Other useful bus values are
578 0300 (VGA compatible card) and
0200 (Ethernet controller).
</p>
580 <p>Not sure how to figure out the interface value, nor what it
583 <p><strong>USB subtype
</strong></p>
585 <p>Some typical USB entries can look like this. This is an internal
586 USB hub in a laptop:
</p>
589 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
592 <p>Here is the values included in this alias:
</p>
595 v
1D6B (device vendor)
596 p
0001 (device product)
599 dsc
00 (device subclass)
600 dp
00 (device protocol)
601 ic
09 (interface class)
602 isc
00 (interface subclass)
603 ip
00 (interface protocol)
606 <p>The
0900 device class/subclass means hub. Some times the relevant
607 class is in the interface class section. For a simple USB web camera,
608 these alias entries show up:
</p>
611 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
612 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
613 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
614 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
617 <p>Interface class
0E01 is video control,
0E02 is video streaming (aka
618 camera),
0101 is audio control device and
0102 is audio streaming (aka
619 microphone). Thus this is a camera with microphone included.
</p>
621 <p><strong>ACPI subtype
</strong></p>
623 <p>The ACPI type is used for several non-PCI/USB stuff. This is an IR
624 receiver in a Thinkpad X40:
</p>
627 acpi:IBM0071:PNP0511:
630 <p>The values between the colons are IDs.
</p>
632 <p><strong>DMI subtype
</strong></p>
634 <p>The DMI table contain lots of information about the computer case
635 and model. This is an entry for a IBM Thinkpad X40, fetched from
636 /sys/devices/virtual/dmi/id/modalias:
</p>
639 dmi:bvnIBM:bvr1UETB6WW(
1.66):bd06/
15/
2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
642 <p>The values present are
</p>
645 bvn IBM (BIOS vendor)
646 bvr
1UETB
6WW(
1.66) (BIOS version)
647 bd
06/
15/
2005 (BIOS date)
648 svn IBM (system vendor)
649 pn
2371H4G (product name)
650 pvr ThinkPadX40 (product version)
651 rvn IBM (board vendor)
652 rn
2371H4G (board name)
653 rvr NotAvailable (board version)
654 cvn IBM (chassis vendor)
656 cvr NotAvailable (chassis version)
659 <p>The chassis type
10 is Notebook. Other interesting values can be
660 found in the dmidecode source:
</p>
664 4 Low Profile Desktop
677 17 Main Server Chassis
680 20 Bus Expansion Chassis
681 21 Peripheral Chassis
683 23 Rack Mount Chassis
692 <p>The chassis type values are not always accurately set in the DMI
693 table. For example my home server is a tower, but the DMI modalias
694 claim it is a desktop.
</p>
696 <p><strong>SerIO subtype
</strong></p>
698 <p>This type is used for PS/
2 mouse plugs. One example is from my
702 serio:ty01pr00id00ex00
705 <p>The values present are
</p>
714 <p>This type is supported by the psmouse driver. I am not sure what
715 the valid values are.
</p>
717 <p><strong>Other subtypes
</strong></p>
719 <p>There are heaps of other modalias subtypes according to
720 file2alias.c. There is the rest of the list from that source: amba,
721 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
722 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
723 vmbus, x86cpu and zorro. I did not spend time documenting all of
724 these, as they do not seem relevant for my intended use with mapping
725 hardware to packages when new stuff is inserted during run time.
</p>
727 <p><strong>Looking up kernel modules using modalias values
</strong></p>
729 <p>To check which kernel modules provide support for a given modalias,
730 one can use the following shell script:
</p>
733 for id in $(find /sys -name modalias -print0 | xargs -
0 cat | sort -u); do \
735 /sbin/modprobe --show-depends "$id"|sed 's/^/ /' ; \
739 <p>The output can look like this (only the first few entries as the
740 list is very long on my test machine):
</p>
744 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/acpi/ac.ko
746 FATAL: Module acpi:device: not found.
748 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/char/nvram.ko
749 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/leds/led-class.ko
750 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/rfkill/rfkill.ko
751 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/platform/x86/thinkpad_acpi.ko
752 acpi:IBM0071:PNP0511:
753 insmod /lib/modules/
2.6.32-
5-
686/kernel/lib/crc-ccitt.ko
754 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/irda/irda.ko
755 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/net/irda/nsc-ircc.ko
759 <p>If you want to help implementing a system to let us propose what
760 packages to install when new hardware is plugged into a Debian
761 machine, please send me an email or talk to me on
762 <a href=
"irc://irc.debian.org/%23debian-devel">#debian-devel
</a>.
</p>
764 <p><strong>Update
2013-
01-
15:
</strong> Rewrite "cat $(find ...)" to
765 "find ... -print0 | xargs -
0 cat" to make sure it handle directories
766 in /sys/ with space in them.
</p>
772 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>.
777 <div class=
"padding"></div>
781 <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>
787 <p>As part of my investigation on how to improve the support in Debian
788 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
789 Launcher and updated the Debian package
790 <a href=
"http://packages.qa.debian.org/pymissile">pymissile
</a> to make
791 sure udev will fix the device permissions when it is plugged in. I
792 also added a "Modaliases" header to test it in the Debian archive and
793 hopefully make the package be proposed by jockey in Ubuntu when a user
794 plug in his rocket launcher. In the process I moved the source to a
795 git repository under collab-maint, to make it easier for any DD to
796 contribute.
<a href=
"http://code.google.com/p/pymissile/">Upstream
</a>
797 is not very active, but the software still work for me even after five
798 years of relative silence. The new git repository is not listed in
799 the uploaded package yet, because I want to test the other changes a
800 bit more before I upload the new version. If you want to check out
801 the new version with a .desktop file included, visit the
802 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git">gitweb
803 view
</a> or use "
<tt>git clone
804 git://anonscm.debian.org/collab-maint/pymissile.git
</tt>".</p>
810 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>.
815 <div class="padding
"></div>
819 <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>
825 <p>One thing that annoys me with Debian and Linux distributions in
826 general, is that there is a great package management system with the
827 ability to automatically install software packages by downloading them
828 from the distribution mirrors, but no way to get it to automatically
829 install the packages I need to use the hardware I plug into my
830 machine. Even if the package to use it is easily available from the
831 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
832 suggest to automatically install the python-nxt, nbc and t2n packages
833 I need to talk to it. When I plug in a Yubikey, it could propose the
834 yubikey-personalization package. The information required to do this
835 is available, but no-one have pulled all the pieces together.</p>
837 <p>Some years ago, I proposed to
838 <a href="http://lists.debian.org/debian-devel/
2010/
05/msg01206.html
">use
839 the discover subsystem to implement this</a>. The idea is fairly
844 <li>Add a desktop entry in /usr/share/autostart/ pointing to a program
845 starting when a user log in.</li>
847 <li>Set this program up to listen for kernel events emitted when new
848 hardware is inserted into the computer.</li>
850 <li>When new hardware is inserted, look up the hardware ID in a
851 database mapping to packages, and take note of any non-installed
854 <li>Show a message to the user proposing to install the discovered
855 package, and make it easy to install it.</li>
859 <p>I am not sure what the best way to implement this is, but my
860 initial idea was to use dbus events to discover new hardware, the
861 discover database to find packages and
862 <a href="http://www.packagekit.org/
">PackageKit</a> to install
865 <p>Yesterday, I found time to try to implement this idea, and the
866 draft package is now checked into
867 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">the
868 Debian Edu subversion repository</a>. In the process, I updated the
869 <a href="http://packages.qa.debian.org/d/discover-data.html
">discover-data</a>
870 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
871 the relevant packages in Debian, and uploaded a new version
872 2.2013.01.09 to unstable. I also discovered that the current
873 <a href="http://packages.qa.debian.org/d/discover.html
">discover</a>
874 package in Debian no longer discovered any USB devices, because
875 /proc/bus/usb/devices is no longer present. I ported it to use
876 libusb as a fall back option to get it working. The fixed package
877 version 2.1.2-6 is now in experimental (didn't upload it to unstable
878 because of the freeze).</p>
880 <p>With this prototype in place, I can insert my Yubikey, and get this
881 desktop notification to show up (only once, the first time it is
884 <p align="center
"><img src="http://people.skolelinux.org/pere/blog/images/
2013-
01-
09-hw-autoinstall.png
"></p>
886 <p>For this prototype to be really useful, some way to automatically
887 install the proposed packages by pressing the "Please install
888 program(s)" button should to be implemented.
</p>
890 <p>If this idea seem useful to you, and you want to help make it
891 happen, please help me update the discover-data database with mappings
892 from hardware to Debian packages. Check if 'discover-pkginstall -l'
893 list the package you would like to have installed when a given
894 hardware device is inserted into your computer, and report bugs using
895 reportbug if it isn't. Or, if you know of a better way to provide
896 such mapping, please let me know.
</p>
898 <p>This prototype need more work, and there are several questions that
899 should be considered before it is ready for production use. Is dbus
900 the correct way to detect new hardware? At the moment I look for HAL
901 dbus events on the system bus, because that is the events I could see
902 on my Debian Squeeze KDE desktop. Are there better events to use?
903 How should the user be notified? Is the desktop notification
904 mechanism the best option, or should the background daemon raise a
905 popup instead? How should packages be installed? When should they
906 not be installed?
</p>
908 <p>If you want to help getting such feature implemented in Debian,
909 please send me an email. :)
</p>
915 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>.
920 <div class=
"padding"></div>
924 <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>
930 <p>During Christmas, I have worked a bit on the Debian support for
931 <a href=
"http://mindstorms.lego.com/en-us/Default.aspx">LEGO Mindstorm
932 NXT
</a>. My son and I have played a bit with my NXT set, and I
933 discovered I had to build all the tools myself because none were
934 already in Debian Squeeze. If Debian support for LEGO is something
935 you care about, please join me on the IRC channel
936 <a href=
"irc://irc.debian.org/%23debian-lego">#debian-lego
</a> (server
937 irc.debian.org). There is a lot that could be done to improve the
938 Debian support for LEGO designers. For example both CAD software
939 and Mindstorm compilers are missing. :)
</p>
941 <p>Update
2012-
01-
03: A
942 <a href=
"http://wiki.debian.org/LegoDesigners">project page
</a>
943 including links to Lego related packages is now available.
</p>
949 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>.
954 <div class=
"padding"></div>
958 <a href=
"http://people.skolelinux.org/pere/blog/Lenker_for_2013_01_01.html">Lenker for
2013-
01-
01</a>
964 <p>Her er noen lenker til tekster jeg har satt pris på å lese den
970 <a href=
"http://www.idg.no/computerworld/article262047.ece">Myter og
971 FUD om fri programvare
</a> av min venn Christer Gundersen som
972 kommenterer noen av de påstandene som er spredt via Computerworld
973 Norge de siste månedene.
</li>
975 <li>BankID er et opplegg der utsteder (dvs. banken eller dens
976 leverandør) sitter på alt som trengs for å bruke BankID, men har
977 lovet å ikke bruke den unntatt på oppdrag fra deg. Det er greit nok
978 for banktjenester, der banken allerede har full kontroll over
979 resultatet, men problematisk når det gjelder tilgang til
980 helseopplysninger og avtaleinngåelse med andre enn banken. Jeg
981 håper protestene brer om seg.
985 <li>2012-
12-
11 <a href=
"http://www.aftenposten.no/meninger/debatt/BankID-blottlegger-helseopplysninger-7067148.html">BankID
986 blottlegger helseopplysninger
</a></li>
988 <li>2012-
12-
07 <a href=
"http://www.nrk.no/nyheter/norge/1.9695027">-
989 Helseopplysningene ikke sikre med Bank-ID
</a></li>
992 <a href=
"https://www.bankid.no/Presse-og-nyheter/Nyhetsarkiv/2012/Papeker-alvorlige-men-kjente-utfordringer/">PÃ¥peker
993 alvorlige, men kjente utfordringer
</a> er den offisielle
994 holdningen til de som lager BankID.
</li>
997 <a href=
"http://www.tnp.no/norway/panorama/3419-ntnu-researcher-warns-against-security-of-bank-id-password">NTNU
998 Researcher Warns against Security of Bank ID Password
</a>
1002 <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>
1005 <a href=
"http://www.aftenposten.no/meninger/debatt/Realfagsdodaren-7067173.html">Realfagsdødaren
</a>
1008 <a href=
"http://www.bt.no/nyheter/innenriks/112/--Forventningene-er-for-hoye-2816450.html">-
1009 Noen må bli skuffet
</a> - Politiet i Bergen forteller hvor lavt de
1010 prioriterer hverdagskriminalitet.
</li>
1013 <a href=
"http://e24.no/jobb/kripos-ansatt-doemt-for-snoking-for-venn/20208585">
1014 Kripos-ansatt dømt for snoking for venn
</A> - viser hvor svak
1015 reaksjonen blir når politiet misbruker innsamlet informasjon. En
1016 forvarsel på konsekvensene av nasjonal brev- og besøkskontroll -
1017 ofte kalt Datalagringsdirektivet.
</li>
1020 <a href=
"http://www.dagbladet.no/2012/12/14/kultur/debatt/kronikk/jul/ensomhet/24838541/">Ã…
1021 smøre en forskjell
</a> - om ensomhet og jul.
</li>
1024 <a href=
"http://www.aftenposten.no/meninger/kronikker/n-krise-av-gangen_-takk-7072452.html">Én
1025 krise av gangen, takk!
</a>
1029 <a href=
"http://www.aftenposten.no/meninger/NAV-Et-mangehodet-monster--7072165.html">NAV:
1030 Et mangehodet monster
</a></li>
1033 <a href=
"http://www.dagbladet.no/2011/01/12/kultur/debatt/kronikk/personvern/15027203/">Pasienter
1034 uten vern
</a> - forteller litt om hvordan Norsk Pasientregister og
1035 andre helseregister raderer bort pasienters privatsfære.
</li>
1039 <a href=
"http://www.aftenposten.no/meninger/debatt/Hvorfor-er-barnefamilier-fattige-7073951.html">Hvorfor
1040 er barnefamilier fattige?
</a></li>
1043 <a href=
"http://www.aftenposten.no/meninger/spaltister/Den-skjulte-minoriteten--konservative-kristne-i-Norge-7075518.html">Den
1044 skjulte minoriteten – konservative kristne i Norge
</a> - kronikk av
1045 Bjørn Stærk fra aftenposten
</li>
1048 <a href=
"http://deltemeninger.no/-/bulletin/show/303429_folkebiblioteket-2-0?ref=checkpoint">Folkebiblioteket
1049 2.0</a> - Min venn Sturle om opphavsrett og Internett, i debatt med
1054 <p>Og et godt nytt år til dere alle!
</p>
1060 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>.
1065 <div class=
"padding"></div>
1067 <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>
1078 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/01/">January (
10)
</a></li>
1085 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/01/">January (
7)
</a></li>
1087 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/02/">February (
10)
</a></li>
1089 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/03/">March (
17)
</a></li>
1091 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/04/">April (
12)
</a></li>
1093 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/05/">May (
12)
</a></li>
1095 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/06/">June (
20)
</a></li>
1097 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/07/">July (
17)
</a></li>
1099 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/08/">August (
6)
</a></li>
1101 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/09/">September (
9)
</a></li>
1103 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/10/">October (
17)
</a></li>
1105 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/11/">November (
10)
</a></li>
1107 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/12/">December (
7)
</a></li>
1114 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/01/">January (
16)
</a></li>
1116 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/02/">February (
6)
</a></li>
1118 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/03/">March (
6)
</a></li>
1120 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/04/">April (
7)
</a></li>
1122 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/05/">May (
3)
</a></li>
1124 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/06/">June (
2)
</a></li>
1126 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/07/">July (
7)
</a></li>
1128 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/08/">August (
6)
</a></li>
1130 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/09/">September (
4)
</a></li>
1132 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/10/">October (
2)
</a></li>
1134 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/11/">November (
3)
</a></li>
1136 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/12/">December (
1)
</a></li>
1143 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/01/">January (
2)
</a></li>
1145 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/02/">February (
1)
</a></li>
1147 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/03/">March (
3)
</a></li>
1149 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/04/">April (
3)
</a></li>
1151 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/05/">May (
9)
</a></li>
1153 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/06/">June (
14)
</a></li>
1155 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/07/">July (
12)
</a></li>
1157 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/08/">August (
13)
</a></li>
1159 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/09/">September (
7)
</a></li>
1161 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/10/">October (
9)
</a></li>
1163 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/11/">November (
13)
</a></li>
1165 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/12/">December (
12)
</a></li>
1172 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/01/">January (
8)
</a></li>
1174 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/02/">February (
8)
</a></li>
1176 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/03/">March (
12)
</a></li>
1178 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/04/">April (
10)
</a></li>
1180 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/05/">May (
9)
</a></li>
1182 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/06/">June (
3)
</a></li>
1184 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/07/">July (
4)
</a></li>
1186 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/08/">August (
3)
</a></li>
1188 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/09/">September (
1)
</a></li>
1190 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/10/">October (
2)
</a></li>
1192 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/11/">November (
3)
</a></li>
1194 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/12/">December (
3)
</a></li>
1201 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/11/">November (
5)
</a></li>
1203 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/12/">December (
7)
</a></li>
1214 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (
13)
</a></li>
1216 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/amiga">amiga (
1)
</a></li>
1218 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/aros">aros (
1)
</a></li>
1220 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bankid">bankid (
4)
</a></li>
1222 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (
5)
</a></li>
1224 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (
12)
</a></li>
1226 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bsa">bsa (
2)
</a></li>
1228 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian (
68)
</a></li>
1230 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (
118)
</a></li>
1232 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/digistan">digistan (
9)
</a></li>
1234 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook (
7)
</a></li>
1236 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (
4)
</a></li>
1238 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/english">english (
174)
</a></li>
1240 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (
21)
</a></li>
1242 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (
12)
</a></li>
1244 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (
10)
</a></li>
1246 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (
9)
</a></li>
1248 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/intervju">intervju (
32)
</a></li>
1250 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/kart">kart (
17)
</a></li>
1252 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ldap">ldap (
8)
</a></li>
1254 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/lenker">lenker (
6)
</a></li>
1256 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (
1)
</a></li>
1258 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (
25)
</a></li>
1260 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk (
219)
</a></li>
1262 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug (
148)
</a></li>
1264 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (
6)
</a></li>
1266 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/open311">open311 (
2)
</a></li>
1268 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (
41)
</a></li>
1270 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern (
61)
</a></li>
1272 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/raid">raid (
1)
</a></li>
1274 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/reprap">reprap (
11)
</a></li>
1276 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rfid">rfid (
2)
</a></li>
1278 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/robot">robot (
6)
</a></li>
1280 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rss">rss (
1)
</a></li>
1282 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ruter">ruter (
4)
</a></li>
1284 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (
2)
</a></li>
1286 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (
28)
</a></li>
1288 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (
4)
</a></li>
1290 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (
4)
</a></li>
1292 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/standard">standard (
39)
</a></li>
1294 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (
3)
</a></li>
1296 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (
5)
</a></li>
1298 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (
12)
</a></li>
1300 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (
1)
</a></li>
1302 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/valg">valg (
7)
</a></li>
1304 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/video">video (
35)
</a></li>
1306 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (
4)
</a></li>
1308 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/web">web (
26)
</a></li>
1314 <p style=
"text-align: right">
1315 Created by
<a href=
"http://steve.org.uk/Software/chronicle">Chronicle v4.4
</a>