1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from January
2013</title>
5 <description>Entries from January
2013</description>
6 <link>http://www.hungry.com/~pere/blog/
</link>
10 <title>Welcome to the world, Isenkram!
</title>
11 <link>http://www.hungry.com/~pere/blog/Welcome_to_the_world__Isenkram_.html
</link>
12 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Welcome_to_the_world__Isenkram_.html
</guid>
13 <pubDate>Tue,
22 Jan
2013 22:
00:
00 +
0100</pubDate>
14 <description><p
>Yesterday, I
15 <a href=
"https://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
">asked
16 for testers
</a
> for my prototype for making Debian better at handling
17 pluggable hardware devices, which I
18 <a href=
"https://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">set
19 out to create
</a
> earlier this month. Several valuable testers showed
20 up, and caused me to really want to to open up the development to more
21 people. But before I did this, I want to come up with a sensible name
22 for this project. Today I finally decided on a new name, and I have
23 renamed the project from hw-support-handler to this new name. In the
24 process, I moved the source to git and made it available as a
25 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git
">collab-maint
</a
>
26 repository in Debian. The new name? It is
<strong
>Isenkram
</strong
>.
27 To fetch and build the latest version of the source, use
</p
>
30 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
31 cd isenkram
&& git-buildpackage -us -uc
34 <p
>I have not yet adjusted all files to use the new name yet. If you
35 want to hack on the source or improve the package, please go ahead.
36 But please talk to me first on IRC or via email before you do major
37 changes, to make sure we do not step on each others toes. :)
</p
>
39 <p
>If you wonder what
'isenkram
' is, it is a Norwegian word for iron
40 stuff, typically meaning tools, nails, screws, etc. Typical hardware
41 stuff, in other words. I
've been told it is the Norwegian variant of
42 the German word eisenkram, for those that are familiar with that
45 <p
><strong
>Update
2013-
01-
26</strong
>: Added -us -us to build
46 instructions, to avoid confusing people with an error from the signing
49 <p
><strong
>Update
2013-
01-
27</strong
>: Switch to HTTP URL for the git
50 clone argument to avoid the need for authentication.
</p
>
55 <title>First prototype ready making hardware easier to use in Debian
</title>
56 <link>http://www.hungry.com/~pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
</link>
57 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
</guid>
58 <pubDate>Mon,
21 Jan
2013 12:
00:
00 +
0100</pubDate>
59 <description><p
>Early this month I set out to try to
60 <a href=
"https://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">improve
61 the Debian support for pluggable hardware devices
</a
>. Now my
62 prototype is working, and it is ready for a larger audience. To test
64 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">source
65 from the Debian Edu subversion repository
</a
>, build and install the
66 package. You might have to log out and in again activate the
67 autostart script.
</p
>
69 <p
>The design is simple:
</p
>
73 <li
>Add desktop entry in /usr/share/autostart/ causing a program
74 hw-support-handlerd to start when the user log in.
</li
>
76 <li
>This program listen for kernel events about new hardware (directly
77 from the kernel like udev does), not using HAL dbus events as I
78 initially did.
</li
>
80 <li
>When new hardware is inserted, look up the hardware modalias in
81 the APT database, a database
82 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup
">available
83 via HTTP
</a
> and a database available as part of the package.
</li
>
85 <li
>If a package is mapped to the hardware in question, the package
86 isn
't installed yet and this is the first time the hardware was
87 plugged in, show a desktop notification suggesting to install the
88 package or packages.
</li
>
90 <li
>If the user click on the
'install package now
' button, ask
91 aptdaemon via the PackageKit API to install the requrired package.
</li
>
93 <li
>aptdaemon ask for root password or sudo password, and install the
94 package while showing progress information in a window.
</li
>
98 <p
>I still need to come up with a better name for the system. Here
99 are some screen shots showing the prototype in action. First the
100 notification, then the password request, and finally the request to
101 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.
</p
>
103 <p
><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
1-notification.png
">
104 <br
><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
2-password.png
">
105 <br
><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
3-dependencies.png
">
106 <br
><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
4-installing.png
">
107 <br
><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
5-installing-details.png
" width=
"70%
"></p
>
109 <p
>The prototype still need to be improved with longer timeouts, but
110 is already useful. The database of hardware to package mappings also
111 need more work. It is currently compatible with the Ubuntu way of
112 storing such information in the package control file, but could be
113 changed to use other formats instead or in addition to the current
114 method. I
've dropped the use of discover for this mapping, as the
115 modalias approach is more flexible and easier to use on Linux as long
116 as the Linux kernel expose its modalias strings directly.
</p
>
118 <p
><strong
>Update
2013-
01-
21 16:
50</strong
>: Due to popular demand,
119 here is the command required to check out and build the source: Use
120 '<tt
>svn checkout
121 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
122 hw-support-handler; debuild
</tt
>'. If you lack debuild, install the
123 devscripts package.
</p
>
125 <p
><strong
>Update
2013-
01-
23 12:
00</strong
>: The project is now
126 renamed to Isenkram and the source moved from the Debian Edu
127 subversion repository to a Debian collab-maint git repository. See
128 <a href=
"https://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html
">build
129 instructions
</a
> for details.
</p
>
134 <title>Thank you Thinkpad X41, for your long and trustworthy service
</title>
135 <link>http://www.hungry.com/~pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html
</link>
136 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html
</guid>
137 <pubDate>Sat,
19 Jan
2013 09:
20:
00 +
0100</pubDate>
138 <description><p
>This Christmas my trusty old laptop died. It died quietly and
139 suddenly in bed. With a quiet whimper, it went completely quiet and
140 black. The power button was no longer able to turn it on. It was a
141 IBM Thinkpad X41, and the best laptop I ever had. Better than both
142 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
143 Compaq I had before that. Now I need to find a replacement. To keep
144 going during Christmas, I moved the one year old SSD disk to my old
145 X40 where it fitted (only one I had left that could use it), but it is
146 not a durable solution.
148 <p
>My laptop needs are fairly modest. This is my wishlist from when I
149 got a new one more than
10 years ago. It still holds true.:)
</p
>
153 <li
>Lightweight (around
1 kg) and small volume (preferably smaller
155 <li
>Robust, it will be in my backpack every day.
</li
>
156 <li
>Three button mouse and a mouse pin instead of touch pad.
</li
>
157 <li
>Long battery life time. Preferable a week.
</li
>
158 <li
>Internal WIFI network card.
</li
>
159 <li
>Internal Twisted Pair network card.
</li
>
160 <li
>Some USB slots (
2-
3 is plenty)
</li
>
161 <li
>Good keyboard - similar to the Thinkpad.
</li
>
162 <li
>Video resolution at least
1024x768, with size around
12" (A4 paper
164 <li
>Hardware supported by Debian Stable, ie the default kernel and
165 X.org packages.
</li
>
166 <li
>Quiet, preferably fan free (or at least not using the fan most of
171 <p
>You will notice that there are no RAM and CPU requirements in the
172 list. The reason is simply that the specifications on laptops the
173 last
10-
15 years have been sufficient for my needs, and I have to look
174 at other features to choose my laptop. But are there still made as
175 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
176 robust, and Thinkpads seem to be heading in the wrong direction since
177 Lenovo took over. But I
've been told that X220 and X1 Carbon might
178 still be useful.
</p
>
180 <p
>Perhaps I should rethink my needs, and look for a pad with an
181 external keyboard? I
'll have to check the
182 <a href=
"http://www.linux-laptop.net/
">Linux Laptops site
</a
> for
183 well-supported laptops, or perhaps just buy one preinstalled from one
184 of the vendors listed on the
<a href=
"http://linuxpreloaded.com/
">Linux
185 Pre-loaded site
</a
>.
</p
>
190 <title>How to find a browser plugin supporting a given MIME type
</title>
191 <link>http://www.hungry.com/~pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html
</link>
192 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html
</guid>
193 <pubDate>Fri,
18 Jan
2013 10:
40:
00 +
0100</pubDate>
194 <description><p
>Some times I try to figure out which Iceweasel browser plugin to
195 install to get support for a given MIME type. Thanks to
196 <a href=
"https://wiki.ubuntu.com/MozillaTeam/Plugins
">specifications
197 done by Ubuntu
</a
> and Mozilla, it is possible to do this in Debian.
198 Unfortunately, not very many packages provide the needed meta
199 information, Anyway, here is a small script to look up all browser
200 plugin packages announcing ther MIME support using this specification:
</p
>
206 def pkgs_handling_mimetype(mimetype):
211 version = pkg.candidate
213 version = pkg.installed
216 record = version.record
217 if not record.has_key(
'Npp-MimeType
'):
219 mime_types = record[
'Npp-MimeType
'].split(
',
')
221 t = t.rstrip().strip()
223 thepkgs.append(pkg.name)
225 mimetype =
"audio/ogg
"
226 if
1 < len(sys.argv):
227 mimetype = sys.argv[
1]
228 print
"Browser plugin packages supporting %s:
" % mimetype
229 for pkg in pkgs_handling_mimetype(mimetype):
230 print
" %s
" %pkg
233 <p
>It can be used like this to look up a given MIME type:
</p
>
236 % ./apt-find-browserplug-for-mimetype
237 Browser plugin packages supporting audio/ogg:
239 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
240 Browser plugin packages supporting application/x-shockwave-flash:
245 <p
>In Ubuntu this mechanism is combined with support in the browser
246 itself to query for plugins and propose to install the needed
247 packages. It would be great if Debian supported such feature too. Is
248 anyone working on adding it?
</p
>
250 <p
><strong
>Update
2013-
01-
18 14:
20</strong
>: The Debian BTS
251 request for icweasel support for this feature is
252 <a href=
"http://bugs.debian.org/
484010">#
484010</a
> from
2008 (and
253 <a href=
"http://bugs.debian.org/
698426">#
698426</a
> from today). Lack
254 of manpower and wish for a different design is the reason thus feature
255 is not yet in iceweasel from Debian.
</p
>
260 <title>What is the most supported MIME type in Debian?
</title>
261 <link>http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
</link>
262 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
</guid>
263 <pubDate>Wed,
16 Jan
2013 10:
10:
00 +
0100</pubDate>
264 <description><p
>The
<a href=
"http://wiki.debian.org/AppStreamDebianProposal
">DEP-
11
265 proposal to add AppStream information to the Debian archive
</a
>, is a
266 proposal to make it possible for a Desktop application to propose to
267 the user some package to install to gain support for a given MIME
268 type, font, library etc. that is currently missing. With such
269 mechanism in place, it would be possible for the desktop to
270 automatically propose and install leocad if some LDraw file is
271 downloaded by the browser.
</p
>
273 <p
>To get some idea about the current content of the archive, I decided
274 to write a simple program to extract all .desktop files from the
275 Debian archive and look up the claimed MIME support there. The result
277 <a href=
"http://ftp.skolelinux.org/pub/AppStreamTest
">Skolelinux FTP
278 site
</a
>. Using the collected information, it become possible to
279 answer the question in the title. Here are the
20 most supported MIME
280 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
281 The complete list is available from the link above.
</p
>
283 <p
><strong
>Debian Stable:
</strong
></p
>
287 ----- -----------------------
310 <p
><strong
>Debian Testing:
</strong
></p
>
314 ----- -----------------------
337 <p
><strong
>Debian Unstable:
</strong
></p
>
341 ----- -----------------------
364 <p
>I am told that PackageKit can provide an API to access the kind of
365 information mentioned in DEP-
11. I have not yet had time to look at
366 it, but hope the PackageKit people in Debian are on top of these
369 <p
><strong
>Update
2013-
01-
16 13:
35</strong
>: Updated numbers after
370 discovering a typo in my script.
</p
>
375 <title>Using modalias info to find packages handling my hardware
</title>
376 <link>http://www.hungry.com/~pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html
</link>
377 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html
</guid>
378 <pubDate>Tue,
15 Jan
2013 08:
00:
00 +
0100</pubDate>
379 <description><p
>Yesterday, I wrote about the
380 <a href=
"https://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
">modalias
381 values provided by the Linux kernel
</a
> following my hope for
382 <a href=
"https://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">better
383 dongle support in Debian
</a
>. Using this knowledge, I have tested how
384 modalias values attached to package names can be used to map packages
385 to hardware. This allow the system to look up and suggest relevant
386 packages when I plug in some new hardware into my machine, and replace
387 discover and discover-data as the database used to map hardware to
390 <p
>I create a modaliases file with entries like the following,
391 containing package name, kernel module name (if relevant, otherwise
392 the package name) and globs matching the relevant hardware
395 <p
><blockquote
>
396 Package: package-name
397 <br
>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)
</p
>
398 </blockquote
></p
>
400 <p
>It is fairly trivial to write code to find the relevant packages
401 for a given modalias value using this file.
</p
>
403 <p
>An entry like this would suggest the video and picture application
404 cheese for many USB web cameras (interface bus class
0E01):
</p
>
406 <p
><blockquote
>
408 <br
>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)
</p
>
409 </blockquote
></p
>
411 <p
>An entry like this would suggest the pcmciautils package when a
412 CardBus bridge (bus class
0607) PCI device is present:
</p
>
414 <p
><blockquote
>
416 <br
>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
417 </blockquote
></p
>
419 <p
>An entry like this would suggest the package colorhug-client when
420 plugging in a ColorHug with USB IDs
04D8:F8DA:
</p
>
422 <p
><blockquote
>
423 Package: colorhug-client
424 <br
>Modaliases: colorhug-client(usb:v04D8pF8DAd*)
</p
>
425 </blockquote
></p
>
427 <p
>I believe the format is compatible with the format of the Packages
428 file in the Debian archive. Ubuntu already uses their Packages file
429 to store their mappings from packages to hardware.
</p
>
431 <p
>By adding a XB-Modaliases: header in debian/control, any .deb can
432 announce the hardware it support in a way my prototype understand.
433 This allow those publishing packages in an APT source outside the
434 Debian archive as well as those backporting packages to make sure the
435 hardware mapping are included in the package meta information. I
've
436 tested such header in the pymissile package, and its modalias mapping
437 is working as it should with my prototype. It even made it to Ubuntu
440 <p
>To test if it was possible to look up supported hardware using only
441 the shell tools available in the Debian installer, I wrote a shell
442 implementation of the lookup code. The idea is to create files for
443 each modalias and let the shell do the matching. Please check out and
445 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co
">hw-support-lookup
</a
>
446 shell script. It run without any extra dependencies and fetch the
447 hardware mappings from the Debian archive and the subversion
448 repository where I currently work on my prototype.
</p
>
450 <p
>When I use it on a machine with a yubikey inserted, it suggest to
451 install yubikey-personalization:
</p
>
453 <p
><blockquote
>
454 % ./hw-support-lookup
455 <br
>yubikey-personalization
457 </blockquote
></p
>
459 <p
>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
460 propose to install the pcmciautils package:
</p
>
462 <p
><blockquote
>
463 % ./hw-support-lookup
464 <br
>pcmciautils
466 </blockquote
></p
>
468 <p
>If you know of any hardware-package mapping that should be added to
469 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co
">my
470 database
</a
>, please tell me about it.
</p
>
472 <p
>It could be possible to generate several of the mappings between
473 packages and hardware. One source would be to look at packages with
474 kernel modules, ie packages with *.ko files in /lib/modules/, and
475 extract their modalias information. Another would be to look at
476 packages with udev rules, ie packages with files in
477 /lib/udev/rules.d/, and extract their vendor/model information to
478 generate a modalias matching rule. I have not tested any of these to
479 see if it work.
</p
>
481 <p
>If you want to help implementing a system to let us propose what
482 packages to install when new hardware is plugged into a Debian
483 machine, please send me an email or talk to me on
484 <a href=
"irc://irc.debian.org/%
23debian-devel
">#debian-devel
</a
>.
</p
>
489 <title>Modalias strings - a practical way to map
"stuff
" to hardware
</title>
490 <link>http://www.hungry.com/~pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
</link>
491 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
</guid>
492 <pubDate>Mon,
14 Jan
2013 11:
20:
00 +
0100</pubDate>
493 <description><p
>While looking into how to look up Debian packages based on hardware
494 information, to find the packages that support a given piece of
495 hardware, I refreshed my memory regarding modalias values, and decided
496 to document the details. Here are my findings so far, also available
498 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">the
499 Debian Edu subversion repository
</a
>:
501 <p
><strong
>Modalias decoded
</strong
></p
>
503 <p
>This document try to explain what the different types of modalias
504 values stands for. It is in part based on information from
505 &lt;URL:
<a href=
"https://wiki.archlinux.org/index.php/Modalias
">https://wiki.archlinux.org/index.php/Modalias
</a
> &gt;,
506 &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;,
507 &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
508 &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;.
510 <p
>The modalias entries for a given Linux machine can be found using
511 this shell script:
</p
>
514 find /sys -name modalias -print0 | xargs -
0 cat | sort -u
517 <p
>The supported modalias globs for a given kernel module can be found
518 using modinfo:
</p
>
521 % /sbin/modinfo psmouse | grep alias:
522 alias: serio:ty05pr*id*ex*
523 alias: serio:ty01pr*id*ex*
527 <p
><strong
>PCI subtype
</strong
></p
>
529 <p
>A typical PCI entry can look like this. This is an Intel Host
530 Bridge memory controller:
</p
>
532 <p
><blockquote
>
533 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
534 </blockquote
></p
>
536 <p
>This represent these values:
</p
>
541 sv
00001028 (subvendor)
542 sd
000001AD (subdevice)
548 <p
>The vendor/device values are the same values outputted from
'lspci
549 -n
' as
8086:
2770. The bus class/subclass is also shown by lspci as
550 0600. The
0600 class is a host bridge. Other useful bus values are
551 0300 (VGA compatible card) and
0200 (Ethernet controller).
</p
>
553 <p
>Not sure how to figure out the interface value, nor what it
556 <p
><strong
>USB subtype
</strong
></p
>
558 <p
>Some typical USB entries can look like this. This is an internal
559 USB hub in a laptop:
</p
>
561 <p
><blockquote
>
562 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
563 </blockquote
></p
>
565 <p
>Here is the values included in this alias:
</p
>
568 v
1D6B (device vendor)
569 p
0001 (device product)
572 dsc
00 (device subclass)
573 dp
00 (device protocol)
574 ic
09 (interface class)
575 isc
00 (interface subclass)
576 ip
00 (interface protocol)
579 <p
>The
0900 device class/subclass means hub. Some times the relevant
580 class is in the interface class section. For a simple USB web camera,
581 these alias entries show up:
</p
>
583 <p
><blockquote
>
584 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
585 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
586 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
587 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
588 </blockquote
></p
>
590 <p
>Interface class
0E01 is video control,
0E02 is video streaming (aka
591 camera),
0101 is audio control device and
0102 is audio streaming (aka
592 microphone). Thus this is a camera with microphone included.
</p
>
594 <p
><strong
>ACPI subtype
</strong
></p
>
596 <p
>The ACPI type is used for several non-PCI/USB stuff. This is an IR
597 receiver in a Thinkpad X40:
</p
>
599 <p
><blockquote
>
600 acpi:IBM0071:PNP0511:
601 </blockquote
></p
>
603 <p
>The values between the colons are IDs.
</p
>
605 <p
><strong
>DMI subtype
</strong
></p
>
607 <p
>The DMI table contain lots of information about the computer case
608 and model. This is an entry for a IBM Thinkpad X40, fetched from
609 /sys/devices/virtual/dmi/id/modalias:
</p
>
611 <p
><blockquote
>
612 dmi:bvnIBM:bvr1UETB6WW(
1.66):bd06/
15/
2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
613 </blockquote
></p
>
615 <p
>The values present are
</p
>
618 bvn IBM (BIOS vendor)
619 bvr
1UETB
6WW(
1.66) (BIOS version)
620 bd
06/
15/
2005 (BIOS date)
621 svn IBM (system vendor)
622 pn
2371H4G (product name)
623 pvr ThinkPadX40 (product version)
624 rvn IBM (board vendor)
625 rn
2371H4G (board name)
626 rvr NotAvailable (board version)
627 cvn IBM (chassis vendor)
629 cvr NotAvailable (chassis version)
632 <p
>The chassis type
10 is Notebook. Other interesting values can be
633 found in the dmidecode source:
</p
>
637 4 Low Profile Desktop
650 17 Main Server Chassis
653 20 Bus Expansion Chassis
654 21 Peripheral Chassis
656 23 Rack Mount Chassis
665 <p
>The chassis type values are not always accurately set in the DMI
666 table. For example my home server is a tower, but the DMI modalias
667 claim it is a desktop.
</p
>
669 <p
><strong
>SerIO subtype
</strong
></p
>
671 <p
>This type is used for PS/
2 mouse plugs. One example is from my
672 test machine:
</p
>
674 <p
><blockquote
>
675 serio:ty01pr00id00ex00
676 </blockquote
></p
>
678 <p
>The values present are
</p
>
687 <p
>This type is supported by the psmouse driver. I am not sure what
688 the valid values are.
</p
>
690 <p
><strong
>Other subtypes
</strong
></p
>
692 <p
>There are heaps of other modalias subtypes according to
693 file2alias.c. There is the rest of the list from that source: amba,
694 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
695 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
696 vmbus, x86cpu and zorro. I did not spend time documenting all of
697 these, as they do not seem relevant for my intended use with mapping
698 hardware to packages when new stuff is inserted during run time.
</p
>
700 <p
><strong
>Looking up kernel modules using modalias values
</strong
></p
>
702 <p
>To check which kernel modules provide support for a given modalias,
703 one can use the following shell script:
</p
>
706 for id in $(find /sys -name modalias -print0 | xargs -
0 cat | sort -u); do \
707 echo
"$id
" ; \
708 /sbin/modprobe --show-depends
"$id
"|sed
's/^/ /
' ; \
712 <p
>The output can look like this (only the first few entries as the
713 list is very long on my test machine):
</p
>
717 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/acpi/ac.ko
719 FATAL: Module acpi:device: not found.
721 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/char/nvram.ko
722 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/leds/led-class.ko
723 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/rfkill/rfkill.ko
724 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/platform/x86/thinkpad_acpi.ko
725 acpi:IBM0071:PNP0511:
726 insmod /lib/modules/
2.6.32-
5-
686/kernel/lib/crc-ccitt.ko
727 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/irda/irda.ko
728 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/net/irda/nsc-ircc.ko
732 <p
>If you want to help implementing a system to let us propose what
733 packages to install when new hardware is plugged into a Debian
734 machine, please send me an email or talk to me on
735 <a href=
"irc://irc.debian.org/%
23debian-devel
">#debian-devel
</a
>.
</p
>
737 <p
><strong
>Update
2013-
01-
15:
</strong
> Rewrite
"cat $(find ...)
" to
738 "find ... -print0 | xargs -
0 cat
" to make sure it handle directories
739 in /sys/ with space in them.
</p
>
744 <title>Moved the pymissile Debian packaging to collab-maint
</title>
745 <link>http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html
</link>
746 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html
</guid>
747 <pubDate>Thu,
10 Jan
2013 20:
40:
00 +
0100</pubDate>
748 <description><p
>As part of my investigation on how to improve the support in Debian
749 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
750 Launcher and updated the Debian package
751 <a href=
"http://packages.qa.debian.org/pymissile
">pymissile
</a
> to make
752 sure udev will fix the device permissions when it is plugged in. I
753 also added a
"Modaliases
" header to test it in the Debian archive and
754 hopefully make the package be proposed by jockey in Ubuntu when a user
755 plug in his rocket launcher. In the process I moved the source to a
756 git repository under collab-maint, to make it easier for any DD to
757 contribute.
<a href=
"http://code.google.com/p/pymissile/
">Upstream
</a
>
758 is not very active, but the software still work for me even after five
759 years of relative silence. The new git repository is not listed in
760 the uploaded package yet, because I want to test the other changes a
761 bit more before I upload the new version. If you want to check out
762 the new version with a .desktop file included, visit the
763 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git
">gitweb
764 view
</a
> or use
"<tt
>git clone
765 git://anonscm.debian.org/collab-maint/pymissile.git
</tt
>".
</p
>
770 <title>Lets make hardware dongles easier to use in Debian
</title>
771 <link>http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
</link>
772 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
</guid>
773 <pubDate>Wed,
9 Jan
2013 15:
40:
00 +
0100</pubDate>
774 <description><p
>One thing that annoys me with Debian and Linux distributions in
775 general, is that there is a great package management system with the
776 ability to automatically install software packages by downloading them
777 from the distribution mirrors, but no way to get it to automatically
778 install the packages I need to use the hardware I plug into my
779 machine. Even if the package to use it is easily available from the
780 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
781 suggest to automatically install the python-nxt, nbc and t2n packages
782 I need to talk to it. When I plug in a Yubikey, it could propose the
783 yubikey-personalization package. The information required to do this
784 is available, but no-one have pulled all the pieces together.
</p
>
786 <p
>Some years ago, I proposed to
787 <a href=
"http://lists.debian.org/debian-devel/
2010/
05/msg01206.html
">use
788 the discover subsystem to implement this
</a
>. The idea is fairly
793 <li
>Add a desktop entry in /usr/share/autostart/ pointing to a program
794 starting when a user log in.
</li
>
796 <li
>Set this program up to listen for kernel events emitted when new
797 hardware is inserted into the computer.
</li
>
799 <li
>When new hardware is inserted, look up the hardware ID in a
800 database mapping to packages, and take note of any non-installed
803 <li
>Show a message to the user proposing to install the discovered
804 package, and make it easy to install it.
</li
>
808 <p
>I am not sure what the best way to implement this is, but my
809 initial idea was to use dbus events to discover new hardware, the
810 discover database to find packages and
811 <a href=
"http://www.packagekit.org/
">PackageKit
</a
> to install
814 <p
>Yesterday, I found time to try to implement this idea, and the
815 draft package is now checked into
816 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">the
817 Debian Edu subversion repository
</a
>. In the process, I updated the
818 <a href=
"http://packages.qa.debian.org/d/discover-data.html
">discover-data
</a
>
819 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
820 the relevant packages in Debian, and uploaded a new version
821 2.2013.01.09 to unstable. I also discovered that the current
822 <a href=
"http://packages.qa.debian.org/d/discover.html
">discover
</a
>
823 package in Debian no longer discovered any USB devices, because
824 /proc/bus/usb/devices is no longer present. I ported it to use
825 libusb as a fall back option to get it working. The fixed package
826 version
2.1.2-
6 is now in experimental (didn
't upload it to unstable
827 because of the freeze).
</p
>
829 <p
>With this prototype in place, I can insert my Yubikey, and get this
830 desktop notification to show up (only once, the first time it is
833 <p align=
"center
"><img src=
"https://people.skolelinux.org/pere/blog/images/
2013-
01-
09-hw-autoinstall.png
"></p
>
835 <p
>For this prototype to be really useful, some way to automatically
836 install the proposed packages by pressing the
"Please install
837 program(s)
" button should to be implemented.
</p
>
839 <p
>If this idea seem useful to you, and you want to help make it
840 happen, please help me update the discover-data database with mappings
841 from hardware to Debian packages. Check if
'discover-pkginstall -l
'
842 list the package you would like to have installed when a given
843 hardware device is inserted into your computer, and report bugs using
844 reportbug if it isn
't. Or, if you know of a better way to provide
845 such mapping, please let me know.
</p
>
847 <p
>This prototype need more work, and there are several questions that
848 should be considered before it is ready for production use. Is dbus
849 the correct way to detect new hardware? At the moment I look for HAL
850 dbus events on the system bus, because that is the events I could see
851 on my Debian Squeeze KDE desktop. Are there better events to use?
852 How should the user be notified? Is the desktop notification
853 mechanism the best option, or should the background daemon raise a
854 popup instead? How should packages be installed? When should they
855 not be installed?
</p
>
857 <p
>If you want to help getting such feature implemented in Debian,
858 please send me an email. :)
</p
>
863 <title>New IRC channel for LEGO designers using Debian
</title>
864 <link>http://www.hungry.com/~pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html
</link>
865 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html
</guid>
866 <pubDate>Wed,
2 Jan
2013 15:
40:
00 +
0100</pubDate>
867 <description><p
>During Christmas, I have worked a bit on the Debian support for
868 <a href=
"http://mindstorms.lego.com/en-us/Default.aspx
">LEGO Mindstorm
869 NXT
</a
>. My son and I have played a bit with my NXT set, and I
870 discovered I had to build all the tools myself because none were
871 already in Debian Squeeze. If Debian support for LEGO is something
872 you care about, please join me on the IRC channel
873 <a href=
"irc://irc.debian.org/%
23debian-lego
">#debian-lego
</a
> (server
874 irc.debian.org). There is a lot that could be done to improve the
875 Debian support for LEGO designers. For example both CAD software
876 and Mindstorm compilers are missing. :)
</p
>
878 <p
>Update
2012-
01-
03: A
879 <a href=
"http://wiki.debian.org/LegoDesigners
">project page
</a
>
880 including links to Lego related packages is now available.
</p
>
885 <title>Lenker for
2013-
01-
01</title>
886 <link>http://www.hungry.com/~pere/blog/Lenker_for_2013_01_01.html
</link>
887 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Lenker_for_2013_01_01.html
</guid>
888 <pubDate>Tue,
1 Jan
2013 09:
20:
00 +
0100</pubDate>
889 <description><p
>Her er noen lenker til tekster jeg har satt pris på å lese den
890 siste måneden.
</p
>
895 <a href=
"http://www.idg.no/computerworld/article262047.ece
">Myter og
896 FUD om fri programvare
</a
> av min venn Christer Gundersen som
897 kommenterer noen av de påstandene som er spredt via Computerworld
898 Norge de siste månedene.
</li
>
900 <li
>BankID er et opplegg der utsteder (dvs. banken eller dens
901 leverandør) sitter på alt som trengs for å bruke BankID, men har
902 lovet å ikke bruke den unntatt på oppdrag fra deg. Det er greit nok
903 for banktjenester, der banken allerede har full kontroll over
904 resultatet, men problematisk når det gjelder tilgang til
905 helseopplysninger og avtaleinngåelse med andre enn banken. Jeg
906 håper protestene brer om seg.
910 <li
>2012-
12-
11 <a href=
"http://www.aftenposten.no/meninger/debatt/BankID-blottlegger-helseopplysninger-
7067148.html
">BankID
911 blottlegger helseopplysninger
</a
></li
>
913 <li
>2012-
12-
07 <a href=
"http://www.nrk.no/nyheter/norge/
1.9695027">-
914 Helseopplysningene ikke sikre med Bank-ID
</a
></li
>
917 <a href=
"https://www.bankid.no/Presse-og-nyheter/Nyhetsarkiv/
2012/Papeker-alvorlige-men-kjente-utfordringer/
">Påpeker
918 alvorlige, men kjente utfordringer
</a
> er den offisielle
919 holdningen til de som lager BankID.
</li
>
922 <a href=
"http://www.tnp.no/norway/panorama/
3419-ntnu-researcher-warns-against-security-of-bank-id-password
">NTNU
923 Researcher Warns against Security of Bank ID Password
</a
>
927 <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
>
930 <a href=
"http://www.aftenposten.no/meninger/debatt/Realfagsdodaren-
7067173.html
">Realfagsdødaren
</a
>
933 <a href=
"http://www.bt.no/nyheter/innenriks/
112/--Forventningene-er-for-hoye-
2816450.html
">-
934 Noen må bli skuffet
</a
> - Politiet i Bergen forteller hvor lavt de
935 prioriterer hverdagskriminalitet.
</li
>
938 <a href=
"http://e24.no/jobb/kripos-ansatt-doemt-for-snoking-for-venn/
20208585">
939 Kripos-ansatt dømt for snoking for venn
</A
> - viser hvor svak
940 reaksjonen blir når politiet misbruker innsamlet informasjon. En
941 forvarsel på konsekvensene av nasjonal brev- og besøkskontroll -
942 ofte kalt Datalagringsdirektivet.
</li
>
945 <a href=
"http://www.dagbladet.no/
2012/
12/
14/kultur/debatt/kronikk/jul/ensomhet/
24838541/
">Å
946 smøre en forskjell
</a
> - om ensomhet og jul.
</li
>
949 <a href=
"http://www.aftenposten.no/meninger/kronikker/n-krise-av-gangen_-takk-
7072452.html
">Én
950 krise av gangen, takk!
</a
>
954 <a href=
"http://www.aftenposten.no/meninger/NAV-Et-mangehodet-monster--
7072165.html
">NAV:
955 Et mangehodet monster
</a
></li
>
958 <a href=
"http://www.dagbladet.no/
2011/
01/
12/kultur/debatt/kronikk/personvern/
15027203/
">Pasienter
959 uten vern
</a
> - forteller litt om hvordan Norsk Pasientregister og
960 andre helseregister raderer bort pasienters privatsfære.
</li
>
964 <a href=
"http://www.aftenposten.no/meninger/debatt/Hvorfor-er-barnefamilier-fattige-
7073951.html
">Hvorfor
965 er barnefamilier fattige?
</a
></li
>
968 <a href=
"http://www.aftenposten.no/meninger/spaltister/Den-skjulte-minoriteten--konservative-kristne-i-Norge-
7075518.html
">Den
969 skjulte minoriteten – konservative kristne i Norge
</a
> - kronikk av
970 Bjørn Stærk fra aftenposten
</li
>
973 <a href=
"http://deltemeninger.no/-/bulletin/show/
303429_folkebiblioteket-
2-
0?ref=checkpoint
">Folkebiblioteket
974 2.0</a
> - Min venn Sturle om opphavsrett og Internett, i debatt med
975 Olav Torvund.
</li
>
979 <p
>Og et godt nytt år til dere alle!
</p
>