]> 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>Sleep until morning - home automation for the kids</title>
11 <link>http://people.skolelinux.org/pere/blog/Sleep_until_morning___home_automation_for_the_kids.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Sleep_until_morning___home_automation_for_the_kids.html</guid>
13 <pubDate>Sun, 10 Feb 2013 12:50:00 +0100</pubDate>
14 <description>&lt;p&gt;&lt;img align=&quot;left&quot; style=&quot;margin-right:25px;&quot; src=&quot;http://people.skolelinux.org/pere/blog/images/2013-02-10-morning-light.jpeg&quot;&gt;&lt;/p&gt;
15
16 &lt;p&gt;With kids in the house, one challenge is getting them to sleep
17 during the night and wake up when it is morning. I mean, when I
18 believe it is morning, and not two hours earlier. In our household we
19 have decided that 07:00 is the turning point, but getting the kids to
20 sleep until 07:00 is a small challenge every day. They have adapted
21 quite well, and rarely wake up at 05:00 any more, but some times wake
22 up at times like 05:50, 06:15, 06:30 or 06:45, and it is hard to put
23 the awake one to bed again without disturbing and waking the rest.
24 And I understand perfectly well that they fail to sleep until 07:00
25 some times, as there is no way for them to know if it is before or
26 after the magic moment without coming and asking us parents.&lt;/p&gt;
27
28 &lt;p&gt;But yesterday I came up with a method to solve this problem. It
29 involve home automation. A few years ago I bought a
30 &lt;a href=&quot;http://www.telldus.se/products/tellstick&quot;&gt;Tellstick&lt;/a&gt; and RF
31 switches at the local &lt;a href=&quot;http://www.clasohlson.com/&quot;&gt;Clas
32 Ohlson&lt;/a&gt; shop, allowing me to control lights and other electrical
33 gadgets using my Linux server. When I moved from the old flat to a
34 small house, I put away all this equipment as most of the lighting in
35 the house was not using wall sockets and thus not easy to connect to
36 the gadgets I had. But recently I bought a
37 &lt;a href=&quot;http://www.telldus.se/products/tellstick_net&quot;&gt;Tellstick
38 Net&lt;/a&gt; to be able to read sensor input as well as control power
39 sockets. I want to control ovens in the basement to avoid the pipes
40 to freeze, and monitor the humidity to detect flooding. The default
41 setup for Tellstick Net is to be controlled by the vendor web service,
42 which to me is a security problem, but it is also possible to build
43 ones own
44 &lt;a href=&quot;http://developer.telldus.com/blog/2012/03/02/help-us-develop-local-access-using-tellstick-net-build-your-own-firmware&quot;&gt;firmware
45 with local access&lt;/A&gt; instead of being controlled by a Swedish
46 company, thanks to the release of the GPL licensed firmware source
47 code. I plan to get that running before I let it control anything
48 important. But while working on this, one idea to make it easier for
49 the kids came to me yesterday. We can set up a night light controlled
50 by the computer, and turn it automatically on at 07:00. The kids can
51 then check the light in the morning to know if they are supposed to
52 get up or not. They joined me in setting everything up, and I
53 repeated the concept several times before bed times to make sure they
54 remembered to check the light before getting up in the morning.&lt;/p&gt;
55
56 &lt;p&gt;We tested it this morning, and all the kids stayed in bed until
57 after 07:00, and every one of them commented on the fact that the
58 &quot;morning light&quot; was turned on and signalled that the morning had
59 arrived. So this look like a success, and I am excited to see how
60 this develops the next few days. :) I really hope this can allow us
61 all to sleep a bit longer in the morning.&lt;/p&gt;
62
63 &lt;p&gt;A nice advantage of this setup is that we can remote control when
64 to tell the kids to get up. We do not have to wait until 07:00, and
65 can also delay it if we want to.&lt;/p&gt;
66 </description>
67 </item>
68
69 <item>
70 <title>Hva stemte hver stortingsrepresentant i voteringene om datalagringsdirektivet?</title>
71 <link>http://people.skolelinux.org/pere/blog/Hva_stemte_hver_stortingsrepresentant_i_voteringene_om_datalagringsdirektivet_.html</link>
72 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Hva_stemte_hver_stortingsrepresentant_i_voteringene_om_datalagringsdirektivet_.html</guid>
73 <pubDate>Sat, 9 Feb 2013 18:10:00 +0100</pubDate>
74 <description>&lt;p&gt;Nytt stortingsvalg er på trappene, og folket får igjen mulighet til
75 å påvirke sammensetningen i vår lovgivende forsamling. Da er det
76 relevant å vite hvilke representanter og partier som har støttet
77 innføringen av brev- og besøkskontroll av hele den norske
78 befolkningen, det vil si datalagringsdirektivet.&lt;/p&gt;
79
80 &lt;p&gt;Hvis du vil vite hva hver enkelt stortingsrepresentant har stemt i
81 stortingsvoteringene om datalagringsdirektivet, så har nettstedet til
82 &lt;a href=&quot;http://www.holderdeord.no/&quot;&gt;Holder De Ord&lt;/a&gt; den (så vidt jeg
83 vet) eneste komplette oversikten på sin temaside om
84 &lt;a href=&quot;http://beta.holderdeord.no/issues/innfore-datalagringsdirektivet&quot;&gt;innføringen
85 av datalagringsdirektivet&lt;/a&gt;. Den har detaljene fra de 11 relevante
86 forslagene som har vært fremmet så lagt. De har vært votert over
87 2011-04-04, 2011-04-11, 2012-06-11, 2012-10-05 og 2012-12-06.&lt;/p&gt;
88
89 &lt;p&gt;Hvis du lurer på hva som er problemet med datalagringsdirektivet,
90 anbefaler jeg å lese &lt;a href=&quot;http://www.uhuru.biz/?cat=84&quot;&gt;artiklene
91 fra Jon Wessel-Aas&lt;/a&gt; om temaet, samt informasjon fra foreningen
92 &lt;a href=&quot;http://www.digitaltpersonvern.no/&quot;&gt;Digitalt
93 Personvern&lt;/a&gt;.&lt;/p&gt;
94 </description>
95 </item>
96
97 <item>
98 <title>Økt overvåkning applauderes igjen av Arbeiderpartiet, Høyre og Fremskrittspartiet</title>
99 <link>http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html</link>
100 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html</guid>
101 <pubDate>Mon, 4 Feb 2013 00:30:00 +0100</pubDate>
102 <description>&lt;p&gt;Jeg ser med gru at Arbeiderpartiet, Høyre og Fremskrittspartiet
103 &lt;a href=&quot;http://www.aftenposten.no/nyheter/iriks/Positive-til-mer-smuglerovervaking-7110348.html&quot;&gt;applauderer
104 tollvesenets forslag&lt;/a&gt; om å øke overvåkningen i Norge nok et hakk.
105 Det er ikke så rart, da de som uttaler seg jo også har støttet
106 innføringen av datalagringsdirektivet eller i hvert fall ikke veldig
107 aktivt har motarbeidet det. Innføringen av datalagringsdirektivet er
108 en lovendring som innebærer brev og besøkskontroll for hele
109 befolkningen.&lt;/p&gt;
110
111 &lt;p&gt;&lt;a href=&quot;http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=48717&quot;&gt;Datalagringsdirektivet&lt;/a&gt;
112 har vært oppe til votering i stortinget tre ganger så langt. Det ble
113 &lt;a href=&quot;http://svartelisten.org/&quot;&gt;vedtatt første gang 2011-04-04&lt;/a&gt;
114 og
115 &lt;a href=&quot;https://github.com/holderdeord/hdo-folketingparser/blob/master/data/votering-2011-04-11.xml&quot;&gt;andre
116 gang 2011-04-11&lt;/a&gt; (lovendringer voteres to ganger), og forslag om å
117 stoppe loven ble
118 &lt;a href=&quot;http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/Voteringsoversikt/?p=53844&amp;dnid=1&quot;&gt;nedstemt
119 2012-12-06&lt;/a&gt; (se også
120 &lt;a href=&quot;http://beta.holderdeord.no/issues/innfore-datalagringsdirektivet&quot;&gt;oversikt fra Holder De
121 Ord&lt;/a&gt;).&lt;/p&gt;
122
123 &lt;p&gt;Jan Bøhler i Arbeiderpartiet stemte for å innføre
124 datalagringsdirektivet i lovverket i første votering, var ikke
125 tilstede i andre votering og støttet loven i tredje votering. André
126 Oktay Dahl i Høyre var ikke til stede i første og andre votering men
127 støttet loven i tredje votering. Ulf Leirstein i Fremskrittspartiet
128 stemte mot loven i første votering men var ikke til stede i andre og
129 tredje votering.&lt;/p&gt;
130
131 &lt;p&gt;Hvis du lurer på hva som er problemet med datalagringsdirektivet,
132 anbefaler jeg å lese &lt;a href=&quot;http://www.uhuru.biz/?cat=84&quot;&gt;artiklene
133 fra Jon Wessel-Aas&lt;/a&gt; om temaet, samt informasjon fra foreningen
134 &lt;a href=&quot;http://www.digitaltpersonvern.no/&quot;&gt;Digitalt
135 Personvern&lt;/a&gt;.&lt;/p&gt;
136
137 &lt;p&gt;&lt;strong&gt;Oppdatering 2013-03-09&lt;/strong&gt;: Endret lenke til Holder De
138 Ord, som har byttet mange lenker i forbindelse med import av
139 voteringsdata for 2010-2011.&lt;/p&gt;
140 </description>
141 </item>
142
143 <item>
144 <title>Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)</title>
145 <link>http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</link>
146 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</guid>
147 <pubDate>Sat, 2 Feb 2013 09:00:00 +0100</pubDate>
148 <description>&lt;p&gt;My
149 &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
150 bitcoin related blog post&lt;/a&gt; mentioned that the new
151 &lt;a href=&quot;http://packages.qa.debian.org/bitcoin&quot;&gt;bitcoin package&lt;/a&gt; for
152 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
153 2013-01-19, and have been available in unstable since then. It was
154 automatically copied to Ubuntu, and is available in their Raring
155 version too.&lt;/p&gt;
156
157 &lt;p&gt;But there is a strange problem with the build that block this new
158 version from being available on the i386 and kfreebsd-i386
159 architectures. For some strange reason, the autobuilders in Debian
160 for these architectures fail to run the test suite on these
161 architectures (&lt;a href=&quot;http://bugs.debian.org/672524&quot;&gt;BTS #672524&lt;/a&gt;).
162 We are so far unable to reproduce it when building it manually, and
163 no-one have been able to propose a fix. If you got an idea what is
164 failing, please let us know via the BTS.&lt;/p&gt;
165
166 &lt;p&gt;One feature that is annoying me with of the bitcoin client, because
167 I often run low on disk space, is the fact that the client will exit
168 if it run short on space (&lt;a href=&quot;http://bugs.debian.org/696715&quot;&gt;BTS
169 #696715&lt;/a&gt;). So make sure you have enough disk space when you run
170 it. :)&lt;/p&gt;
171
172 &lt;p&gt;As usual, if you use bitcoin and want to show your support of my
173 activities, please send Bitcoin donations to my address
174 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
175 </description>
176 </item>
177
178 <item>
179 <title>Welcome to the world, Isenkram!</title>
180 <link>http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</link>
181 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</guid>
182 <pubDate>Tue, 22 Jan 2013 22:00:00 +0100</pubDate>
183 <description>&lt;p&gt;Yesterday, I
184 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html&quot;&gt;asked
185 for testers&lt;/a&gt; for my prototype for making Debian better at handling
186 pluggable hardware devices, which I
187 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;set
188 out to create&lt;/a&gt; earlier this month. Several valuable testers showed
189 up, and caused me to really want to to open up the development to more
190 people. But before I did this, I want to come up with a sensible name
191 for this project. Today I finally decided on a new name, and I have
192 renamed the project from hw-support-handler to this new name. In the
193 process, I moved the source to git and made it available as a
194 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git&quot;&gt;collab-maint&lt;/a&gt;
195 repository in Debian. The new name? It is &lt;strong&gt;Isenkram&lt;/strong&gt;.
196 To fetch and build the latest version of the source, use&lt;/p&gt;
197
198 &lt;pre&gt;
199 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
200 cd isenkram &amp;&amp; git-buildpackage -us -uc
201 &lt;/pre&gt;
202
203 &lt;p&gt;I have not yet adjusted all files to use the new name yet. If you
204 want to hack on the source or improve the package, please go ahead.
205 But please talk to me first on IRC or via email before you do major
206 changes, to make sure we do not step on each others toes. :)&lt;/p&gt;
207
208 &lt;p&gt;If you wonder what &#39;isenkram&#39; is, it is a Norwegian word for iron
209 stuff, typically meaning tools, nails, screws, etc. Typical hardware
210 stuff, in other words. I&#39;ve been told it is the Norwegian variant of
211 the German word eisenkram, for those that are familiar with that
212 word.&lt;/p&gt;
213
214 &lt;p&gt;&lt;strong&gt;Update 2013-01-26&lt;/strong&gt;: Added -us -us to build
215 instructions, to avoid confusing people with an error from the signing
216 process.&lt;/p&gt;
217
218 &lt;p&gt;&lt;strong&gt;Update 2013-01-27&lt;/strong&gt;: Switch to HTTP URL for the git
219 clone argument to avoid the need for authentication.&lt;/p&gt;
220 </description>
221 </item>
222
223 <item>
224 <title>First prototype ready making hardware easier to use in Debian</title>
225 <link>http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</link>
226 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</guid>
227 <pubDate>Mon, 21 Jan 2013 12:00:00 +0100</pubDate>
228 <description>&lt;p&gt;Early this month I set out to try to
229 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;improve
230 the Debian support for pluggable hardware devices&lt;/a&gt;. Now my
231 prototype is working, and it is ready for a larger audience. To test
232 it, fetch the
233 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;source
234 from the Debian Edu subversion repository&lt;/a&gt;, build and install the
235 package. You might have to log out and in again activate the
236 autostart script.&lt;/p&gt;
237
238 &lt;p&gt;The design is simple:&lt;/p&gt;
239
240 &lt;ul&gt;
241
242 &lt;li&gt;Add desktop entry in /usr/share/autostart/ causing a program
243 hw-support-handlerd to start when the user log in.&lt;/li&gt;
244
245 &lt;li&gt;This program listen for kernel events about new hardware (directly
246 from the kernel like udev does), not using HAL dbus events as I
247 initially did.&lt;/li&gt;
248
249 &lt;li&gt;When new hardware is inserted, look up the hardware modalias in
250 the APT database, a database
251 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup&quot;&gt;available
252 via HTTP&lt;/a&gt; and a database available as part of the package.&lt;/li&gt;
253
254 &lt;li&gt;If a package is mapped to the hardware in question, the package
255 isn&#39;t installed yet and this is the first time the hardware was
256 plugged in, show a desktop notification suggesting to install the
257 package or packages.&lt;/li&gt;
258
259 &lt;li&gt;If the user click on the &#39;install package now&#39; button, ask
260 aptdaemon via the PackageKit API to install the requrired package.&lt;/li&gt;
261
262 &lt;li&gt;aptdaemon ask for root password or sudo password, and install the
263 package while showing progress information in a window.&lt;/li&gt;
264
265 &lt;/ul&gt;
266
267 &lt;p&gt;I still need to come up with a better name for the system. Here
268 are some screen shots showing the prototype in action. First the
269 notification, then the password request, and finally the request to
270 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.&lt;/p&gt;
271
272 &lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png&quot;&gt;
273 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png&quot;&gt;
274 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png&quot;&gt;
275 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png&quot;&gt;
276 &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;
277
278 &lt;p&gt;The prototype still need to be improved with longer timeouts, but
279 is already useful. The database of hardware to package mappings also
280 need more work. It is currently compatible with the Ubuntu way of
281 storing such information in the package control file, but could be
282 changed to use other formats instead or in addition to the current
283 method. I&#39;ve dropped the use of discover for this mapping, as the
284 modalias approach is more flexible and easier to use on Linux as long
285 as the Linux kernel expose its modalias strings directly.&lt;/p&gt;
286
287 &lt;p&gt;&lt;strong&gt;Update 2013-01-21 16:50&lt;/strong&gt;: Due to popular demand,
288 here is the command required to check out and build the source: Use
289 &#39;&lt;tt&gt;svn checkout
290 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
291 hw-support-handler; debuild&lt;/tt&gt;&#39;. If you lack debuild, install the
292 devscripts package.&lt;/p&gt;
293
294 &lt;p&gt;&lt;strong&gt;Update 2013-01-23 12:00&lt;/strong&gt;: The project is now
295 renamed to Isenkram and the source moved from the Debian Edu
296 subversion repository to a Debian collab-maint git repository. See
297 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html&quot;&gt;build
298 instructions&lt;/a&gt; for details.&lt;/p&gt;
299 </description>
300 </item>
301
302 <item>
303 <title>Thank you Thinkpad X41, for your long and trustworthy service</title>
304 <link>http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</link>
305 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</guid>
306 <pubDate>Sat, 19 Jan 2013 09:20:00 +0100</pubDate>
307 <description>&lt;p&gt;This Christmas my trusty old laptop died. It died quietly and
308 suddenly in bed. With a quiet whimper, it went completely quiet and
309 black. The power button was no longer able to turn it on. It was a
310 IBM Thinkpad X41, and the best laptop I ever had. Better than both
311 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
312 Compaq I had before that. Now I need to find a replacement. To keep
313 going during Christmas, I moved the one year old SSD disk to my old
314 X40 where it fitted (only one I had left that could use it), but it is
315 not a durable solution.
316
317 &lt;p&gt;My laptop needs are fairly modest. This is my wishlist from when I
318 got a new one more than 10 years ago. It still holds true.:)&lt;/p&gt;
319
320 &lt;ul&gt;
321
322 &lt;li&gt;Lightweight (around 1 kg) and small volume (preferably smaller
323 than A4).&lt;/li&gt;
324 &lt;li&gt;Robust, it will be in my backpack every day.&lt;/li&gt;
325 &lt;li&gt;Three button mouse and a mouse pin instead of touch pad.&lt;/li&gt;
326 &lt;li&gt;Long battery life time. Preferable a week.&lt;/li&gt;
327 &lt;li&gt;Internal WIFI network card.&lt;/li&gt;
328 &lt;li&gt;Internal Twisted Pair network card.&lt;/li&gt;
329 &lt;li&gt;Some USB slots (2-3 is plenty)&lt;/li&gt;
330 &lt;li&gt;Good keyboard - similar to the Thinkpad.&lt;/li&gt;
331 &lt;li&gt;Video resolution at least 1024x768, with size around 12&quot; (A4 paper
332 size).&lt;/li&gt;
333 &lt;li&gt;Hardware supported by Debian Stable, ie the default kernel and
334 X.org packages.&lt;/li&gt;
335 &lt;li&gt;Quiet, preferably fan free (or at least not using the fan most of
336 the time).
337
338 &lt;/ul&gt;
339
340 &lt;p&gt;You will notice that there are no RAM and CPU requirements in the
341 list. The reason is simply that the specifications on laptops the
342 last 10-15 years have been sufficient for my needs, and I have to look
343 at other features to choose my laptop. But are there still made as
344 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
345 robust, and Thinkpads seem to be heading in the wrong direction since
346 Lenovo took over. But I&#39;ve been told that X220 and X1 Carbon might
347 still be useful.&lt;/p&gt;
348
349 &lt;p&gt;Perhaps I should rethink my needs, and look for a pad with an
350 external keyboard? I&#39;ll have to check the
351 &lt;a href=&quot;http://www.linux-laptop.net/&quot;&gt;Linux Laptops site&lt;/a&gt; for
352 well-supported laptops, or perhaps just buy one preinstalled from one
353 of the vendors listed on the &lt;a href=&quot;http://linuxpreloaded.com/&quot;&gt;Linux
354 Pre-loaded site&lt;/a&gt;.&lt;/p&gt;
355 </description>
356 </item>
357
358 <item>
359 <title>How to find a browser plugin supporting a given MIME type</title>
360 <link>http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</link>
361 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</guid>
362 <pubDate>Fri, 18 Jan 2013 10:40:00 +0100</pubDate>
363 <description>&lt;p&gt;Some times I try to figure out which Iceweasel browser plugin to
364 install to get support for a given MIME type. Thanks to
365 &lt;a href=&quot;https://wiki.ubuntu.com/MozillaTeam/Plugins&quot;&gt;specifications
366 done by Ubuntu&lt;/a&gt; and Mozilla, it is possible to do this in Debian.
367 Unfortunately, not very many packages provide the needed meta
368 information, Anyway, here is a small script to look up all browser
369 plugin packages announcing ther MIME support using this specification:&lt;/p&gt;
370
371 &lt;pre&gt;
372 #!/usr/bin/python
373 import sys
374 import apt
375 def pkgs_handling_mimetype(mimetype):
376 cache = apt.Cache()
377 cache.open(None)
378 thepkgs = []
379 for pkg in cache:
380 version = pkg.candidate
381 if version is None:
382 version = pkg.installed
383 if version is None:
384 continue
385 record = version.record
386 if not record.has_key(&#39;Npp-MimeType&#39;):
387 continue
388 mime_types = record[&#39;Npp-MimeType&#39;].split(&#39;,&#39;)
389 for t in mime_types:
390 t = t.rstrip().strip()
391 if t == mimetype:
392 thepkgs.append(pkg.name)
393 return thepkgs
394 mimetype = &quot;audio/ogg&quot;
395 if 1 &lt; len(sys.argv):
396 mimetype = sys.argv[1]
397 print &quot;Browser plugin packages supporting %s:&quot; % mimetype
398 for pkg in pkgs_handling_mimetype(mimetype):
399 print &quot; %s&quot; %pkg
400 &lt;/pre&gt;
401
402 &lt;p&gt;It can be used like this to look up a given MIME type:&lt;/p&gt;
403
404 &lt;pre&gt;
405 % ./apt-find-browserplug-for-mimetype
406 Browser plugin packages supporting audio/ogg:
407 gecko-mediaplayer
408 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
409 Browser plugin packages supporting application/x-shockwave-flash:
410 browser-plugin-gnash
411 %
412 &lt;/pre&gt;
413
414 &lt;p&gt;In Ubuntu this mechanism is combined with support in the browser
415 itself to query for plugins and propose to install the needed
416 packages. It would be great if Debian supported such feature too. Is
417 anyone working on adding it?&lt;/p&gt;
418
419 &lt;p&gt;&lt;strong&gt;Update 2013-01-18 14:20&lt;/strong&gt;: The Debian BTS
420 request for icweasel support for this feature is
421 &lt;a href=&quot;http://bugs.debian.org/484010&quot;&gt;#484010&lt;/a&gt; from 2008 (and
422 &lt;a href=&quot;http://bugs.debian.org/698426&quot;&gt;#698426&lt;/a&gt; from today). Lack
423 of manpower and wish for a different design is the reason thus feature
424 is not yet in iceweasel from Debian.&lt;/p&gt;
425 </description>
426 </item>
427
428 <item>
429 <title>What is the most supported MIME type in Debian?</title>
430 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</link>
431 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</guid>
432 <pubDate>Wed, 16 Jan 2013 10:10:00 +0100</pubDate>
433 <description>&lt;p&gt;The &lt;a href=&quot;http://wiki.debian.org/AppStreamDebianProposal&quot;&gt;DEP-11
434 proposal to add AppStream information to the Debian archive&lt;/a&gt;, is a
435 proposal to make it possible for a Desktop application to propose to
436 the user some package to install to gain support for a given MIME
437 type, font, library etc. that is currently missing. With such
438 mechanism in place, it would be possible for the desktop to
439 automatically propose and install leocad if some LDraw file is
440 downloaded by the browser.&lt;/p&gt;
441
442 &lt;p&gt;To get some idea about the current content of the archive, I decided
443 to write a simple program to extract all .desktop files from the
444 Debian archive and look up the claimed MIME support there. The result
445 can be found on the
446 &lt;a href=&quot;http://ftp.skolelinux.org/pub/AppStreamTest&quot;&gt;Skolelinux FTP
447 site&lt;/a&gt;. Using the collected information, it become possible to
448 answer the question in the title. Here are the 20 most supported MIME
449 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
450 The complete list is available from the link above.&lt;/p&gt;
451
452 &lt;p&gt;&lt;strong&gt;Debian Stable:&lt;/strong&gt;&lt;/p&gt;
453
454 &lt;pre&gt;
455 count MIME type
456 ----- -----------------------
457 32 text/plain
458 30 audio/mpeg
459 29 image/png
460 28 image/jpeg
461 27 application/ogg
462 26 audio/x-mp3
463 25 image/tiff
464 25 image/gif
465 22 image/bmp
466 22 audio/x-wav
467 20 audio/x-flac
468 19 audio/x-mpegurl
469 18 video/x-ms-asf
470 18 audio/x-musepack
471 18 audio/x-mpeg
472 18 application/x-ogg
473 17 video/mpeg
474 17 audio/x-scpls
475 17 audio/ogg
476 16 video/x-ms-wmv
477 &lt;/pre&gt;
478
479 &lt;p&gt;&lt;strong&gt;Debian Testing:&lt;/strong&gt;&lt;/p&gt;
480
481 &lt;pre&gt;
482 count MIME type
483 ----- -----------------------
484 33 text/plain
485 32 image/png
486 32 image/jpeg
487 29 audio/mpeg
488 27 image/gif
489 26 image/tiff
490 26 application/ogg
491 25 audio/x-mp3
492 22 image/bmp
493 21 audio/x-wav
494 19 audio/x-mpegurl
495 19 audio/x-mpeg
496 18 video/mpeg
497 18 audio/x-scpls
498 18 audio/x-flac
499 18 application/x-ogg
500 17 video/x-ms-asf
501 17 text/html
502 17 audio/x-musepack
503 16 image/x-xbitmap
504 &lt;/pre&gt;
505
506 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
507
508 &lt;pre&gt;
509 count MIME type
510 ----- -----------------------
511 31 text/plain
512 31 image/png
513 31 image/jpeg
514 29 audio/mpeg
515 28 application/ogg
516 27 image/gif
517 26 image/tiff
518 26 audio/x-mp3
519 23 audio/x-wav
520 22 image/bmp
521 21 audio/x-flac
522 20 audio/x-mpegurl
523 19 audio/x-mpeg
524 18 video/x-ms-asf
525 18 video/mpeg
526 18 audio/x-scpls
527 18 application/x-ogg
528 17 audio/x-musepack
529 16 video/x-ms-wmv
530 16 video/x-msvideo
531 &lt;/pre&gt;
532
533 &lt;p&gt;I am told that PackageKit can provide an API to access the kind of
534 information mentioned in DEP-11. I have not yet had time to look at
535 it, but hope the PackageKit people in Debian are on top of these
536 issues.&lt;/p&gt;
537
538 &lt;p&gt;&lt;strong&gt;Update 2013-01-16 13:35&lt;/strong&gt;: Updated numbers after
539 discovering a typo in my script.&lt;/p&gt;
540 </description>
541 </item>
542
543 <item>
544 <title>Using modalias info to find packages handling my hardware</title>
545 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
546 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
547 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
548 <description>&lt;p&gt;Yesterday, I wrote about the
549 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
550 values provided by the Linux kernel&lt;/a&gt; following my hope for
551 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
552 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
553 modalias values attached to package names can be used to map packages
554 to hardware. This allow the system to look up and suggest relevant
555 packages when I plug in some new hardware into my machine, and replace
556 discover and discover-data as the database used to map hardware to
557 packages.&lt;/p&gt;
558
559 &lt;p&gt;I create a modaliases file with entries like the following,
560 containing package name, kernel module name (if relevant, otherwise
561 the package name) and globs matching the relevant hardware
562 modalias.&lt;/p&gt;
563
564 &lt;p&gt;&lt;blockquote&gt;
565 Package: package-name
566 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
567 &lt;/blockquote&gt;&lt;/p&gt;
568
569 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
570 for a given modalias value using this file.&lt;/p&gt;
571
572 &lt;p&gt;An entry like this would suggest the video and picture application
573 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
574
575 &lt;p&gt;&lt;blockquote&gt;
576 Package: cheese
577 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
578 &lt;/blockquote&gt;&lt;/p&gt;
579
580 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
581 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
582
583 &lt;p&gt;&lt;blockquote&gt;
584 Package: pcmciautils
585 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
586 &lt;/blockquote&gt;&lt;/p&gt;
587
588 &lt;p&gt;An entry like this would suggest the package colorhug-client when
589 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
590
591 &lt;p&gt;&lt;blockquote&gt;
592 Package: colorhug-client
593 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
594 &lt;/blockquote&gt;&lt;/p&gt;
595
596 &lt;p&gt;I believe the format is compatible with the format of the Packages
597 file in the Debian archive. Ubuntu already uses their Packages file
598 to store their mappings from packages to hardware.&lt;/p&gt;
599
600 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
601 announce the hardware it support in a way my prototype understand.
602 This allow those publishing packages in an APT source outside the
603 Debian archive as well as those backporting packages to make sure the
604 hardware mapping are included in the package meta information. I&#39;ve
605 tested such header in the pymissile package, and its modalias mapping
606 is working as it should with my prototype. It even made it to Ubuntu
607 Raring.&lt;/p&gt;
608
609 &lt;p&gt;To test if it was possible to look up supported hardware using only
610 the shell tools available in the Debian installer, I wrote a shell
611 implementation of the lookup code. The idea is to create files for
612 each modalias and let the shell do the matching. Please check out and
613 try the
614 &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;
615 shell script. It run without any extra dependencies and fetch the
616 hardware mappings from the Debian archive and the subversion
617 repository where I currently work on my prototype.&lt;/p&gt;
618
619 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
620 install yubikey-personalization:&lt;/p&gt;
621
622 &lt;p&gt;&lt;blockquote&gt;
623 % ./hw-support-lookup
624 &lt;br&gt;yubikey-personalization
625 &lt;br&gt;%
626 &lt;/blockquote&gt;&lt;/p&gt;
627
628 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
629 propose to install the pcmciautils package:&lt;/p&gt;
630
631 &lt;p&gt;&lt;blockquote&gt;
632 % ./hw-support-lookup
633 &lt;br&gt;pcmciautils
634 &lt;br&gt;%
635 &lt;/blockquote&gt;&lt;/p&gt;
636
637 &lt;p&gt;If you know of any hardware-package mapping that should be added to
638 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
639 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
640
641 &lt;p&gt;It could be possible to generate several of the mappings between
642 packages and hardware. One source would be to look at packages with
643 kernel modules, ie packages with *.ko files in /lib/modules/, and
644 extract their modalias information. Another would be to look at
645 packages with udev rules, ie packages with files in
646 /lib/udev/rules.d/, and extract their vendor/model information to
647 generate a modalias matching rule. I have not tested any of these to
648 see if it work.&lt;/p&gt;
649
650 &lt;p&gt;If you want to help implementing a system to let us propose what
651 packages to install when new hardware is plugged into a Debian
652 machine, please send me an email or talk to me on
653 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
654 </description>
655 </item>
656
657 </channel>
658 </rss>