]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Petter Reinholdtsen</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
8
9 <item>
10 <title>Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)</title>
11 <link>http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</guid>
13 <pubDate>Sat, 2 Feb 2013 09:00:00 +0100</pubDate>
14 <description>&lt;p&gt;My
15 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html&quot;&gt;last
16 bitcoin related blog post&lt;/a&gt; mentioned that the new
17 &lt;a href=&quot;http://packages.qa.debian.org/bitcoin&quot;&gt;bitcoin package&lt;/a&gt; for
18 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
19 2013-01-19, and have been available in unstable since then. It was
20 automatically copied to Ubuntu, and is available in their Raring
21 version too.&lt;/p&gt;
22
23 &lt;p&gt;But there is a strange problem with the build that block this new
24 version from being available on the i386 and kfreebsd-i386
25 architectures. For some strange reason, the autobuilders in Debian
26 for these architectures fail to run the test suite on these
27 architectures (&lt;a href=&quot;http://bugs.debian.org/672524&quot;&gt;BTS #672524&lt;/a&gt;).
28 We are so far unable to reproduce it when building it manually, and
29 no-one have been able to propose a fix. If you got an idea what is
30 failing, please let us know via the BTS.&lt;/p&gt;
31
32 &lt;p&gt;One feature that is annoying me with of the bitcoin client, because
33 I often run low on disk space, is the fact that the client will exit
34 if it run short on space (&lt;a href=&quot;http://bugs.debian.org/696715&quot;&gt;BTS
35 #696715&lt;/a&gt;). So make sure you have enough disk space when you run
36 it. :)&lt;/p&gt;
37
38 &lt;p&gt;As usual, if you use bitcoin and want to show your support of my
39 activities, please send Bitcoin donations to my address
40 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
41 </description>
42 </item>
43
44 <item>
45 <title>Welcome to the world, Isenkram!</title>
46 <link>http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</link>
47 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</guid>
48 <pubDate>Tue, 22 Jan 2013 22:00:00 +0100</pubDate>
49 <description>&lt;p&gt;Yesterday, I
50 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html&quot;&gt;asked
51 for testers&lt;/a&gt; for my prototype for making Debian better at handling
52 pluggable hardware devices, which I
53 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;set
54 out to create&lt;/a&gt; earlier this month. Several valuable testers showed
55 up, and caused me to really want to to open up the development to more
56 people. But before I did this, I want to come up with a sensible name
57 for this project. Today I finally decided on a new name, and I have
58 renamed the project from hw-support-handler to this new name. In the
59 process, I moved the source to git and made it available as a
60 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git&quot;&gt;collab-maint&lt;/a&gt;
61 repository in Debian. The new name? It is &lt;strong&gt;Isenkram&lt;/strong&gt;.
62 To fetch and build the latest version of the source, use&lt;/p&gt;
63
64 &lt;pre&gt;
65 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
66 cd isenkram &amp;&amp; git-buildpackage -us -uc
67 &lt;/pre&gt;
68
69 &lt;p&gt;I have not yet adjusted all files to use the new name yet. If you
70 want to hack on the source or improve the package, please go ahead.
71 But please talk to me first on IRC or via email before you do major
72 changes, to make sure we do not step on each others toes. :)&lt;/p&gt;
73
74 &lt;p&gt;If you wonder what &#39;isenkram&#39; is, it is a Norwegian word for iron
75 stuff, typically meaning tools, nails, screws, etc. Typical hardware
76 stuff, in other words. I&#39;ve been told it is the Norwegian variant of
77 the German word eisenkram, for those that are familiar with that
78 word.&lt;/p&gt;
79
80 &lt;p&gt;&lt;strong&gt;Update 2013-01-26&lt;/strong&gt;: Added -us -us to build
81 instructions, to avoid confusing people with an error from the signing
82 process.&lt;/p&gt;
83
84 &lt;p&gt;&lt;strong&gt;Update 2013-01-27&lt;/strong&gt;: Switch to HTTP URL for the git
85 clone argument to avoid the need for authentication.&lt;/p&gt;
86 </description>
87 </item>
88
89 <item>
90 <title>First prototype ready making hardware easier to use in Debian</title>
91 <link>http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</link>
92 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</guid>
93 <pubDate>Mon, 21 Jan 2013 12:00:00 +0100</pubDate>
94 <description>&lt;p&gt;Early this month I set out to try to
95 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;improve
96 the Debian support for pluggable hardware devices&lt;/a&gt;. Now my
97 prototype is working, and it is ready for a larger audience. To test
98 it, fetch the
99 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;source
100 from the Debian Edu subversion repository&lt;/a&gt;, build and install the
101 package. You might have to log out and in again activate the
102 autostart script.&lt;/p&gt;
103
104 &lt;p&gt;The design is simple:&lt;/p&gt;
105
106 &lt;ul&gt;
107
108 &lt;li&gt;Add desktop entry in /usr/share/autostart/ causing a program
109 hw-support-handlerd to start when the user log in.&lt;/li&gt;
110
111 &lt;li&gt;This program listen for kernel events about new hardware (directly
112 from the kernel like udev does), not using HAL dbus events as I
113 initially did.&lt;/li&gt;
114
115 &lt;li&gt;When new hardware is inserted, look up the hardware modalias in
116 the APT database, a database
117 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup&quot;&gt;available
118 via HTTP&lt;/a&gt; and a database available as part of the package.&lt;/li&gt;
119
120 &lt;li&gt;If a package is mapped to the hardware in question, the package
121 isn&#39;t installed yet and this is the first time the hardware was
122 plugged in, show a desktop notification suggesting to install the
123 package or packages.&lt;/li&gt;
124
125 &lt;li&gt;If the user click on the &#39;install package now&#39; button, ask
126 aptdaemon via the PackageKit API to install the requrired package.&lt;/li&gt;
127
128 &lt;li&gt;aptdaemon ask for root password or sudo password, and install the
129 package while showing progress information in a window.&lt;/li&gt;
130
131 &lt;/ul&gt;
132
133 &lt;p&gt;I still need to come up with a better name for the system. Here
134 are some screen shots showing the prototype in action. First the
135 notification, then the password request, and finally the request to
136 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.&lt;/p&gt;
137
138 &lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png&quot;&gt;
139 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png&quot;&gt;
140 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png&quot;&gt;
141 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png&quot;&gt;
142 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png&quot; width=&quot;70%&quot;&gt;&lt;/p&gt;
143
144 &lt;p&gt;The prototype still need to be improved with longer timeouts, but
145 is already useful. The database of hardware to package mappings also
146 need more work. It is currently compatible with the Ubuntu way of
147 storing such information in the package control file, but could be
148 changed to use other formats instead or in addition to the current
149 method. I&#39;ve dropped the use of discover for this mapping, as the
150 modalias approach is more flexible and easier to use on Linux as long
151 as the Linux kernel expose its modalias strings directly.&lt;/p&gt;
152
153 &lt;p&gt;&lt;strong&gt;Update 2013-01-21 16:50&lt;/strong&gt;: Due to popular demand,
154 here is the command required to check out and build the source: Use
155 &#39;&lt;tt&gt;svn checkout
156 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
157 hw-support-handler; debuild&lt;/tt&gt;&#39;. If you lack debuild, install the
158 devscripts package.&lt;/p&gt;
159
160 &lt;p&gt;&lt;strong&gt;Update 2013-01-23 12:00&lt;/strong&gt;: The project is now
161 renamed to Isenkram and the source moved from the Debian Edu
162 subversion repository to a Debian collab-maint git repository. See
163 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html&quot;&gt;build
164 instructions&lt;/a&gt; for details.&lt;/p&gt;
165 </description>
166 </item>
167
168 <item>
169 <title>Thank you Thinkpad X41, for your long and trustworthy service</title>
170 <link>http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</link>
171 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</guid>
172 <pubDate>Sat, 19 Jan 2013 09:20:00 +0100</pubDate>
173 <description>&lt;p&gt;This Christmas my trusty old laptop died. It died quietly and
174 suddenly in bed. With a quiet whimper, it went completely quiet and
175 black. The power button was no longer able to turn it on. It was a
176 IBM Thinkpad X41, and the best laptop I ever had. Better than both
177 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
178 Compaq I had before that. Now I need to find a replacement. To keep
179 going during Christmas, I moved the one year old SSD disk to my old
180 X40 where it fitted (only one I had left that could use it), but it is
181 not a durable solution.
182
183 &lt;p&gt;My laptop needs are fairly modest. This is my wishlist from when I
184 got a new one more than 10 years ago. It still holds true.:)&lt;/p&gt;
185
186 &lt;ul&gt;
187
188 &lt;li&gt;Lightweight (around 1 kg) and small volume (preferably smaller
189 than A4).&lt;/li&gt;
190 &lt;li&gt;Robust, it will be in my backpack every day.&lt;/li&gt;
191 &lt;li&gt;Three button mouse and a mouse pin instead of touch pad.&lt;/li&gt;
192 &lt;li&gt;Long battery life time. Preferable a week.&lt;/li&gt;
193 &lt;li&gt;Internal WIFI network card.&lt;/li&gt;
194 &lt;li&gt;Internal Twisted Pair network card.&lt;/li&gt;
195 &lt;li&gt;Some USB slots (2-3 is plenty)&lt;/li&gt;
196 &lt;li&gt;Good keyboard - similar to the Thinkpad.&lt;/li&gt;
197 &lt;li&gt;Video resolution at least 1024x768, with size around 12&quot; (A4 paper
198 size).&lt;/li&gt;
199 &lt;li&gt;Hardware supported by Debian Stable, ie the default kernel and
200 X.org packages.&lt;/li&gt;
201 &lt;li&gt;Quiet, preferably fan free (or at least not using the fan most of
202 the time).
203
204 &lt;/ul&gt;
205
206 &lt;p&gt;You will notice that there are no RAM and CPU requirements in the
207 list. The reason is simply that the specifications on laptops the
208 last 10-15 years have been sufficient for my needs, and I have to look
209 at other features to choose my laptop. But are there still made as
210 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
211 robust, and Thinkpads seem to be heading in the wrong direction since
212 Lenovo took over. But I&#39;ve been told that X220 and X1 Carbon might
213 still be useful.&lt;/p&gt;
214
215 &lt;p&gt;Perhaps I should rethink my needs, and look for a pad with an
216 external keyboard? I&#39;ll have to check the
217 &lt;a href=&quot;http://www.linux-laptop.net/&quot;&gt;Linux Laptops site&lt;/a&gt; for
218 well-supported laptops, or perhaps just buy one preinstalled from one
219 of the vendors listed on the &lt;a href=&quot;http://linuxpreloaded.com/&quot;&gt;Linux
220 Pre-loaded site&lt;/a&gt;.&lt;/p&gt;
221 </description>
222 </item>
223
224 <item>
225 <title>How to find a browser plugin supporting a given MIME type</title>
226 <link>http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</link>
227 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</guid>
228 <pubDate>Fri, 18 Jan 2013 10:40:00 +0100</pubDate>
229 <description>&lt;p&gt;Some times I try to figure out which Iceweasel browser plugin to
230 install to get support for a given MIME type. Thanks to
231 &lt;a href=&quot;https://wiki.ubuntu.com/MozillaTeam/Plugins&quot;&gt;specifications
232 done by Ubuntu&lt;/a&gt; and Mozilla, it is possible to do this in Debian.
233 Unfortunately, not very many packages provide the needed meta
234 information, Anyway, here is a small script to look up all browser
235 plugin packages announcing ther MIME support using this specification:&lt;/p&gt;
236
237 &lt;pre&gt;
238 #!/usr/bin/python
239 import sys
240 import apt
241 def pkgs_handling_mimetype(mimetype):
242 cache = apt.Cache()
243 cache.open(None)
244 thepkgs = []
245 for pkg in cache:
246 version = pkg.candidate
247 if version is None:
248 version = pkg.installed
249 if version is None:
250 continue
251 record = version.record
252 if not record.has_key(&#39;Npp-MimeType&#39;):
253 continue
254 mime_types = record[&#39;Npp-MimeType&#39;].split(&#39;,&#39;)
255 for t in mime_types:
256 t = t.rstrip().strip()
257 if t == mimetype:
258 thepkgs.append(pkg.name)
259 return thepkgs
260 mimetype = &quot;audio/ogg&quot;
261 if 1 &lt; len(sys.argv):
262 mimetype = sys.argv[1]
263 print &quot;Browser plugin packages supporting %s:&quot; % mimetype
264 for pkg in pkgs_handling_mimetype(mimetype):
265 print &quot; %s&quot; %pkg
266 &lt;/pre&gt;
267
268 &lt;p&gt;It can be used like this to look up a given MIME type:&lt;/p&gt;
269
270 &lt;pre&gt;
271 % ./apt-find-browserplug-for-mimetype
272 Browser plugin packages supporting audio/ogg:
273 gecko-mediaplayer
274 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
275 Browser plugin packages supporting application/x-shockwave-flash:
276 browser-plugin-gnash
277 %
278 &lt;/pre&gt;
279
280 &lt;p&gt;In Ubuntu this mechanism is combined with support in the browser
281 itself to query for plugins and propose to install the needed
282 packages. It would be great if Debian supported such feature too. Is
283 anyone working on adding it?&lt;/p&gt;
284
285 &lt;p&gt;&lt;strong&gt;Update 2013-01-18 14:20&lt;/strong&gt;: The Debian BTS
286 request for icweasel support for this feature is
287 &lt;a href=&quot;http://bugs.debian.org/484010&quot;&gt;#484010&lt;/a&gt; from 2008 (and
288 &lt;a href=&quot;http://bugs.debian.org/698426&quot;&gt;#698426&lt;/a&gt; from today). Lack
289 of manpower and wish for a different design is the reason thus feature
290 is not yet in iceweasel from Debian.&lt;/p&gt;
291 </description>
292 </item>
293
294 <item>
295 <title>What is the most supported MIME type in Debian?</title>
296 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</link>
297 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</guid>
298 <pubDate>Wed, 16 Jan 2013 10:10:00 +0100</pubDate>
299 <description>&lt;p&gt;The &lt;a href=&quot;http://wiki.debian.org/AppStreamDebianProposal&quot;&gt;DEP-11
300 proposal to add AppStream information to the Debian archive&lt;/a&gt;, is a
301 proposal to make it possible for a Desktop application to propose to
302 the user some package to install to gain support for a given MIME
303 type, font, library etc. that is currently missing. With such
304 mechanism in place, it would be possible for the desktop to
305 automatically propose and install leocad if some LDraw file is
306 downloaded by the browser.&lt;/p&gt;
307
308 &lt;p&gt;To get some idea about the current content of the archive, I decided
309 to write a simple program to extract all .desktop files from the
310 Debian archive and look up the claimed MIME support there. The result
311 can be found on the
312 &lt;a href=&quot;http://ftp.skolelinux.org/pub/AppStreamTest&quot;&gt;Skolelinux FTP
313 site&lt;/a&gt;. Using the collected information, it become possible to
314 answer the question in the title. Here are the 20 most supported MIME
315 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
316 The complete list is available from the link above.&lt;/p&gt;
317
318 &lt;p&gt;&lt;strong&gt;Debian Stable:&lt;/strong&gt;&lt;/p&gt;
319
320 &lt;pre&gt;
321 count MIME type
322 ----- -----------------------
323 32 text/plain
324 30 audio/mpeg
325 29 image/png
326 28 image/jpeg
327 27 application/ogg
328 26 audio/x-mp3
329 25 image/tiff
330 25 image/gif
331 22 image/bmp
332 22 audio/x-wav
333 20 audio/x-flac
334 19 audio/x-mpegurl
335 18 video/x-ms-asf
336 18 audio/x-musepack
337 18 audio/x-mpeg
338 18 application/x-ogg
339 17 video/mpeg
340 17 audio/x-scpls
341 17 audio/ogg
342 16 video/x-ms-wmv
343 &lt;/pre&gt;
344
345 &lt;p&gt;&lt;strong&gt;Debian Testing:&lt;/strong&gt;&lt;/p&gt;
346
347 &lt;pre&gt;
348 count MIME type
349 ----- -----------------------
350 33 text/plain
351 32 image/png
352 32 image/jpeg
353 29 audio/mpeg
354 27 image/gif
355 26 image/tiff
356 26 application/ogg
357 25 audio/x-mp3
358 22 image/bmp
359 21 audio/x-wav
360 19 audio/x-mpegurl
361 19 audio/x-mpeg
362 18 video/mpeg
363 18 audio/x-scpls
364 18 audio/x-flac
365 18 application/x-ogg
366 17 video/x-ms-asf
367 17 text/html
368 17 audio/x-musepack
369 16 image/x-xbitmap
370 &lt;/pre&gt;
371
372 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
373
374 &lt;pre&gt;
375 count MIME type
376 ----- -----------------------
377 31 text/plain
378 31 image/png
379 31 image/jpeg
380 29 audio/mpeg
381 28 application/ogg
382 27 image/gif
383 26 image/tiff
384 26 audio/x-mp3
385 23 audio/x-wav
386 22 image/bmp
387 21 audio/x-flac
388 20 audio/x-mpegurl
389 19 audio/x-mpeg
390 18 video/x-ms-asf
391 18 video/mpeg
392 18 audio/x-scpls
393 18 application/x-ogg
394 17 audio/x-musepack
395 16 video/x-ms-wmv
396 16 video/x-msvideo
397 &lt;/pre&gt;
398
399 &lt;p&gt;I am told that PackageKit can provide an API to access the kind of
400 information mentioned in DEP-11. I have not yet had time to look at
401 it, but hope the PackageKit people in Debian are on top of these
402 issues.&lt;/p&gt;
403
404 &lt;p&gt;&lt;strong&gt;Update 2013-01-16 13:35&lt;/strong&gt;: Updated numbers after
405 discovering a typo in my script.&lt;/p&gt;
406 </description>
407 </item>
408
409 <item>
410 <title>Using modalias info to find packages handling my hardware</title>
411 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
412 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
413 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
414 <description>&lt;p&gt;Yesterday, I wrote about the
415 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
416 values provided by the Linux kernel&lt;/a&gt; following my hope for
417 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
418 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
419 modalias values attached to package names can be used to map packages
420 to hardware. This allow the system to look up and suggest relevant
421 packages when I plug in some new hardware into my machine, and replace
422 discover and discover-data as the database used to map hardware to
423 packages.&lt;/p&gt;
424
425 &lt;p&gt;I create a modaliases file with entries like the following,
426 containing package name, kernel module name (if relevant, otherwise
427 the package name) and globs matching the relevant hardware
428 modalias.&lt;/p&gt;
429
430 &lt;p&gt;&lt;blockquote&gt;
431 Package: package-name
432 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
433 &lt;/blockquote&gt;&lt;/p&gt;
434
435 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
436 for a given modalias value using this file.&lt;/p&gt;
437
438 &lt;p&gt;An entry like this would suggest the video and picture application
439 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
440
441 &lt;p&gt;&lt;blockquote&gt;
442 Package: cheese
443 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
444 &lt;/blockquote&gt;&lt;/p&gt;
445
446 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
447 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
448
449 &lt;p&gt;&lt;blockquote&gt;
450 Package: pcmciautils
451 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
452 &lt;/blockquote&gt;&lt;/p&gt;
453
454 &lt;p&gt;An entry like this would suggest the package colorhug-client when
455 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
456
457 &lt;p&gt;&lt;blockquote&gt;
458 Package: colorhug-client
459 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
460 &lt;/blockquote&gt;&lt;/p&gt;
461
462 &lt;p&gt;I believe the format is compatible with the format of the Packages
463 file in the Debian archive. Ubuntu already uses their Packages file
464 to store their mappings from packages to hardware.&lt;/p&gt;
465
466 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
467 announce the hardware it support in a way my prototype understand.
468 This allow those publishing packages in an APT source outside the
469 Debian archive as well as those backporting packages to make sure the
470 hardware mapping are included in the package meta information. I&#39;ve
471 tested such header in the pymissile package, and its modalias mapping
472 is working as it should with my prototype. It even made it to Ubuntu
473 Raring.&lt;/p&gt;
474
475 &lt;p&gt;To test if it was possible to look up supported hardware using only
476 the shell tools available in the Debian installer, I wrote a shell
477 implementation of the lookup code. The idea is to create files for
478 each modalias and let the shell do the matching. Please check out and
479 try the
480 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co&quot;&gt;hw-support-lookup&lt;/a&gt;
481 shell script. It run without any extra dependencies and fetch the
482 hardware mappings from the Debian archive and the subversion
483 repository where I currently work on my prototype.&lt;/p&gt;
484
485 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
486 install yubikey-personalization:&lt;/p&gt;
487
488 &lt;p&gt;&lt;blockquote&gt;
489 % ./hw-support-lookup
490 &lt;br&gt;yubikey-personalization
491 &lt;br&gt;%
492 &lt;/blockquote&gt;&lt;/p&gt;
493
494 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
495 propose to install the pcmciautils package:&lt;/p&gt;
496
497 &lt;p&gt;&lt;blockquote&gt;
498 % ./hw-support-lookup
499 &lt;br&gt;pcmciautils
500 &lt;br&gt;%
501 &lt;/blockquote&gt;&lt;/p&gt;
502
503 &lt;p&gt;If you know of any hardware-package mapping that should be added to
504 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
505 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
506
507 &lt;p&gt;It could be possible to generate several of the mappings between
508 packages and hardware. One source would be to look at packages with
509 kernel modules, ie packages with *.ko files in /lib/modules/, and
510 extract their modalias information. Another would be to look at
511 packages with udev rules, ie packages with files in
512 /lib/udev/rules.d/, and extract their vendor/model information to
513 generate a modalias matching rule. I have not tested any of these to
514 see if it work.&lt;/p&gt;
515
516 &lt;p&gt;If you want to help implementing a system to let us propose what
517 packages to install when new hardware is plugged into a Debian
518 machine, please send me an email or talk to me on
519 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
520 </description>
521 </item>
522
523 <item>
524 <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
525 <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
526 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
527 <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
528 <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
529 information, to find the packages that support a given piece of
530 hardware, I refreshed my memory regarding modalias values, and decided
531 to document the details. Here are my findings so far, also available
532 in
533 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
534 Debian Edu subversion repository&lt;/a&gt;:
535
536 &lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
537
538 &lt;p&gt;This document try to explain what the different types of modalias
539 values stands for. It is in part based on information from
540 &amp;lt;URL: &lt;a href=&quot;https://wiki.archlinux.org/index.php/Modalias&quot;&gt;https://wiki.archlinux.org/index.php/Modalias&lt;/a&gt; &amp;gt;,
541 &amp;lt;URL: &lt;a href=&quot;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&quot;&gt;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&lt;/a&gt; &amp;gt;,
542 &amp;lt;URL: &lt;a href=&quot;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&quot;&gt;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&lt;/a&gt; &amp;gt; and
543 &amp;lt;URL: &lt;a href=&quot;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&quot;&gt;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&lt;/a&gt; &amp;gt;.
544
545 &lt;p&gt;The modalias entries for a given Linux machine can be found using
546 this shell script:&lt;/p&gt;
547
548 &lt;pre&gt;
549 find /sys -name modalias -print0 | xargs -0 cat | sort -u
550 &lt;/pre&gt;
551
552 &lt;p&gt;The supported modalias globs for a given kernel module can be found
553 using modinfo:&lt;/p&gt;
554
555 &lt;pre&gt;
556 % /sbin/modinfo psmouse | grep alias:
557 alias: serio:ty05pr*id*ex*
558 alias: serio:ty01pr*id*ex*
559 %
560 &lt;/pre&gt;
561
562 &lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
563
564 &lt;p&gt;A typical PCI entry can look like this. This is an Intel Host
565 Bridge memory controller:&lt;/p&gt;
566
567 &lt;p&gt;&lt;blockquote&gt;
568 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
569 &lt;/blockquote&gt;&lt;/p&gt;
570
571 &lt;p&gt;This represent these values:&lt;/p&gt;
572
573 &lt;pre&gt;
574 v 00008086 (vendor)
575 d 00002770 (device)
576 sv 00001028 (subvendor)
577 sd 000001AD (subdevice)
578 bc 06 (bus class)
579 sc 00 (bus subclass)
580 i 00 (interface)
581 &lt;/pre&gt;
582
583 &lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
584 -n&#39; as 8086:2770. The bus class/subclass is also shown by lspci as
585 0600. The 0600 class is a host bridge. Other useful bus values are
586 0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
587
588 &lt;p&gt;Not sure how to figure out the interface value, nor what it
589 means.&lt;/p&gt;
590
591 &lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
592
593 &lt;p&gt;Some typical USB entries can look like this. This is an internal
594 USB hub in a laptop:&lt;/p&gt;
595
596 &lt;p&gt;&lt;blockquote&gt;
597 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
598 &lt;/blockquote&gt;&lt;/p&gt;
599
600 &lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
601
602 &lt;pre&gt;
603 v 1D6B (device vendor)
604 p 0001 (device product)
605 d 0206 (bcddevice)
606 dc 09 (device class)
607 dsc 00 (device subclass)
608 dp 00 (device protocol)
609 ic 09 (interface class)
610 isc 00 (interface subclass)
611 ip 00 (interface protocol)
612 &lt;/pre&gt;
613
614 &lt;p&gt;The 0900 device class/subclass means hub. Some times the relevant
615 class is in the interface class section. For a simple USB web camera,
616 these alias entries show up:&lt;/p&gt;
617
618 &lt;p&gt;&lt;blockquote&gt;
619 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
620 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
621 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
622 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
623 &lt;/blockquote&gt;&lt;/p&gt;
624
625 &lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
626 camera), 0101 is audio control device and 0102 is audio streaming (aka
627 microphone). Thus this is a camera with microphone included.&lt;/p&gt;
628
629 &lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
630
631 &lt;p&gt;The ACPI type is used for several non-PCI/USB stuff. This is an IR
632 receiver in a Thinkpad X40:&lt;/p&gt;
633
634 &lt;p&gt;&lt;blockquote&gt;
635 acpi:IBM0071:PNP0511:
636 &lt;/blockquote&gt;&lt;/p&gt;
637
638 &lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
639
640 &lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
641
642 &lt;p&gt;The DMI table contain lots of information about the computer case
643 and model. This is an entry for a IBM Thinkpad X40, fetched from
644 /sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
645
646 &lt;p&gt;&lt;blockquote&gt;
647 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
648 &lt;/blockquote&gt;&lt;/p&gt;
649
650 &lt;p&gt;The values present are&lt;/p&gt;
651
652 &lt;pre&gt;
653 bvn IBM (BIOS vendor)
654 bvr 1UETB6WW(1.66) (BIOS version)
655 bd 06/15/2005 (BIOS date)
656 svn IBM (system vendor)
657 pn 2371H4G (product name)
658 pvr ThinkPadX40 (product version)
659 rvn IBM (board vendor)
660 rn 2371H4G (board name)
661 rvr NotAvailable (board version)
662 cvn IBM (chassis vendor)
663 ct 10 (chassis type)
664 cvr NotAvailable (chassis version)
665 &lt;/pre&gt;
666
667 &lt;p&gt;The chassis type 10 is Notebook. Other interesting values can be
668 found in the dmidecode source:&lt;/p&gt;
669
670 &lt;pre&gt;
671 3 Desktop
672 4 Low Profile Desktop
673 5 Pizza Box
674 6 Mini Tower
675 7 Tower
676 8 Portable
677 9 Laptop
678 10 Notebook
679 11 Hand Held
680 12 Docking Station
681 13 All In One
682 14 Sub Notebook
683 15 Space-saving
684 16 Lunch Box
685 17 Main Server Chassis
686 18 Expansion Chassis
687 19 Sub Chassis
688 20 Bus Expansion Chassis
689 21 Peripheral Chassis
690 22 RAID Chassis
691 23 Rack Mount Chassis
692 24 Sealed-case PC
693 25 Multi-system
694 26 CompactPCI
695 27 AdvancedTCA
696 28 Blade
697 29 Blade Enclosing
698 &lt;/pre&gt;
699
700 &lt;p&gt;The chassis type values are not always accurately set in the DMI
701 table. For example my home server is a tower, but the DMI modalias
702 claim it is a desktop.&lt;/p&gt;
703
704 &lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
705
706 &lt;p&gt;This type is used for PS/2 mouse plugs. One example is from my
707 test machine:&lt;/p&gt;
708
709 &lt;p&gt;&lt;blockquote&gt;
710 serio:ty01pr00id00ex00
711 &lt;/blockquote&gt;&lt;/p&gt;
712
713 &lt;p&gt;The values present are&lt;/p&gt;
714
715 &lt;pre&gt;
716 ty 01 (type)
717 pr 00 (prototype)
718 id 00 (id)
719 ex 00 (extra)
720 &lt;/pre&gt;
721
722 &lt;p&gt;This type is supported by the psmouse driver. I am not sure what
723 the valid values are.&lt;/p&gt;
724
725 &lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
726
727 &lt;p&gt;There are heaps of other modalias subtypes according to
728 file2alias.c. There is the rest of the list from that source: amba,
729 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
730 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
731 vmbus, x86cpu and zorro. I did not spend time documenting all of
732 these, as they do not seem relevant for my intended use with mapping
733 hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
734
735 &lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
736
737 &lt;p&gt;To check which kernel modules provide support for a given modalias,
738 one can use the following shell script:&lt;/p&gt;
739
740 &lt;pre&gt;
741 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
742 echo &quot;$id&quot; ; \
743 /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/ /&#39; ; \
744 done
745 &lt;/pre&gt;
746
747 &lt;p&gt;The output can look like this (only the first few entries as the
748 list is very long on my test machine):&lt;/p&gt;
749
750 &lt;pre&gt;
751 acpi:ACPI0003:
752 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
753 acpi:device:
754 FATAL: Module acpi:device: not found.
755 acpi:IBM0068:
756 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
757 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
758 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
759 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
760 acpi:IBM0071:PNP0511:
761 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
762 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
763 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
764 [...]
765 &lt;/pre&gt;
766
767 &lt;p&gt;If you want to help implementing a system to let us propose what
768 packages to install when new hardware is plugged into a Debian
769 machine, please send me an email or talk to me on
770 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
771
772 &lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
773 &quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
774 in /sys/ with space in them.&lt;/p&gt;
775 </description>
776 </item>
777
778 <item>
779 <title>Moved the pymissile Debian packaging to collab-maint</title>
780 <link>http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</link>
781 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</guid>
782 <pubDate>Thu, 10 Jan 2013 20:40:00 +0100</pubDate>
783 <description>&lt;p&gt;As part of my investigation on how to improve the support in Debian
784 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
785 Launcher and updated the Debian package
786 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;pymissile&lt;/a&gt; to make
787 sure udev will fix the device permissions when it is plugged in. I
788 also added a &quot;Modaliases&quot; header to test it in the Debian archive and
789 hopefully make the package be proposed by jockey in Ubuntu when a user
790 plug in his rocket launcher. In the process I moved the source to a
791 git repository under collab-maint, to make it easier for any DD to
792 contribute. &lt;a href=&quot;http://code.google.com/p/pymissile/&quot;&gt;Upstream&lt;/a&gt;
793 is not very active, but the software still work for me even after five
794 years of relative silence. The new git repository is not listed in
795 the uploaded package yet, because I want to test the other changes a
796 bit more before I upload the new version. If you want to check out
797 the new version with a .desktop file included, visit the
798 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git&quot;&gt;gitweb
799 view&lt;/a&gt; or use &quot;&lt;tt&gt;git clone
800 git://anonscm.debian.org/collab-maint/pymissile.git&lt;/tt&gt;&quot;.&lt;/p&gt;
801 </description>
802 </item>
803
804 <item>
805 <title>Lets make hardware dongles easier to use in Debian</title>
806 <link>http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</link>
807 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</guid>
808 <pubDate>Wed, 9 Jan 2013 15:40:00 +0100</pubDate>
809 <description>&lt;p&gt;One thing that annoys me with Debian and Linux distributions in
810 general, is that there is a great package management system with the
811 ability to automatically install software packages by downloading them
812 from the distribution mirrors, but no way to get it to automatically
813 install the packages I need to use the hardware I plug into my
814 machine. Even if the package to use it is easily available from the
815 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
816 suggest to automatically install the python-nxt, nbc and t2n packages
817 I need to talk to it. When I plug in a Yubikey, it could propose the
818 yubikey-personalization package. The information required to do this
819 is available, but no-one have pulled all the pieces together.&lt;/p&gt;
820
821 &lt;p&gt;Some years ago, I proposed to
822 &lt;a href=&quot;http://lists.debian.org/debian-devel/2010/05/msg01206.html&quot;&gt;use
823 the discover subsystem to implement this&lt;/a&gt;. The idea is fairly
824 simple:
825
826 &lt;ul&gt;
827
828 &lt;li&gt;Add a desktop entry in /usr/share/autostart/ pointing to a program
829 starting when a user log in.&lt;/li&gt;
830
831 &lt;li&gt;Set this program up to listen for kernel events emitted when new
832 hardware is inserted into the computer.&lt;/li&gt;
833
834 &lt;li&gt;When new hardware is inserted, look up the hardware ID in a
835 database mapping to packages, and take note of any non-installed
836 packages.&lt;/li&gt;
837
838 &lt;li&gt;Show a message to the user proposing to install the discovered
839 package, and make it easy to install it.&lt;/li&gt;
840
841 &lt;/ul&gt;
842
843 &lt;p&gt;I am not sure what the best way to implement this is, but my
844 initial idea was to use dbus events to discover new hardware, the
845 discover database to find packages and
846 &lt;a href=&quot;http://www.packagekit.org/&quot;&gt;PackageKit&lt;/a&gt; to install
847 packages.&lt;/p&gt;
848
849 &lt;p&gt;Yesterday, I found time to try to implement this idea, and the
850 draft package is now checked into
851 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
852 Debian Edu subversion repository&lt;/a&gt;. In the process, I updated the
853 &lt;a href=&quot;http://packages.qa.debian.org/d/discover-data.html&quot;&gt;discover-data&lt;/a&gt;
854 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
855 the relevant packages in Debian, and uploaded a new version
856 2.2013.01.09 to unstable. I also discovered that the current
857 &lt;a href=&quot;http://packages.qa.debian.org/d/discover.html&quot;&gt;discover&lt;/a&gt;
858 package in Debian no longer discovered any USB devices, because
859 /proc/bus/usb/devices is no longer present. I ported it to use
860 libusb as a fall back option to get it working. The fixed package
861 version 2.1.2-6 is now in experimental (didn&#39;t upload it to unstable
862 because of the freeze).&lt;/p&gt;
863
864 &lt;p&gt;With this prototype in place, I can insert my Yubikey, and get this
865 desktop notification to show up (only once, the first time it is
866 inserted):&lt;/p&gt;
867
868 &lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png&quot;&gt;&lt;/p&gt;
869
870 &lt;p&gt;For this prototype to be really useful, some way to automatically
871 install the proposed packages by pressing the &quot;Please install
872 program(s)&quot; button should to be implemented.&lt;/p&gt;
873
874 &lt;p&gt;If this idea seem useful to you, and you want to help make it
875 happen, please help me update the discover-data database with mappings
876 from hardware to Debian packages. Check if &#39;discover-pkginstall -l&#39;
877 list the package you would like to have installed when a given
878 hardware device is inserted into your computer, and report bugs using
879 reportbug if it isn&#39;t. Or, if you know of a better way to provide
880 such mapping, please let me know.&lt;/p&gt;
881
882 &lt;p&gt;This prototype need more work, and there are several questions that
883 should be considered before it is ready for production use. Is dbus
884 the correct way to detect new hardware? At the moment I look for HAL
885 dbus events on the system bus, because that is the events I could see
886 on my Debian Squeeze KDE desktop. Are there better events to use?
887 How should the user be notified? Is the desktop notification
888 mechanism the best option, or should the background daemon raise a
889 popup instead? How should packages be installed? When should they
890 not be installed?&lt;/p&gt;
891
892 &lt;p&gt;If you want to help getting such feature implemented in Debian,
893 please send me an email. :)&lt;/p&gt;
894 </description>
895 </item>
896
897 </channel>
898 </rss>