]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2013/01/index.html
Generated.
[homepage.git] / blog / archive / 2013 / 01 / index.html
index a081ab31e87810a14219a7c75f0641b4b96bd53a..02795c7ddf27e9c7b4a3d04bdacdd2903a56d183 100644 (file)
 
     <h3>Entries from January 2013.</h3>
     
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">Thank you Thinkpad X41, for your long and trustworthy service</a>
+      </div>
+      <div class="date">
+        19th January 2013
+      </div>
+      <div class="body">
+        <p>This Christmas my trusty old laptop died.  It died quietly and
+suddenly in bed.  With a quiet whimper, it went completely quiet and
+black.  The power button was no longer able to turn it on.  It was a
+IBM Thinkpad X41, and the best laptop I ever had.  Better than both
+Thinkpads X30, X31, X40, X60, X61 and X61S.  Far better than the
+Compaq I had before that.  Now I need to find a replacement.  To keep
+going during Christmas, I moved the one year old SSD disk to my old
+X40 where it fitted (only one I had left that could use it), but it is
+not a durable solution.
+
+<p>My laptop needs are fairly modest.  This is my wishlist from when I
+got a new one more than 10 years ago.  It still holds true.:)</p>
+
+<ul>
+
+<li>Lightweight (around 1 kg) and small volume (preferably smaller
+  than A4).</li>
+<li>Robust, it will be in my backpack every day.</li>
+<li>Three button mouse and a mouse pin instead of touch pad.</li>
+<li>Long battery life time.  Preferable a week.</li>
+<li>Internal WIFI network card.</li>
+<li>Internal Twisted Pair network card.</li>
+<li>Some USB slots (2-3 is plenty)</li>
+<li>Good keyboard - similar to the Thinkpad.</li>
+<li>Video resolution at least 1024x768, with size around 12" (A4 paper
+size).</li>
+<li>Hardware supported by Debian Stable, ie the default kernel and
+  X.org packages.</li>
+<li>Quiet, preferably fan free (or at least not using the fan most of
+  the time).
+
+</ul>
+
+<p>You will notice that there are no RAM and CPU requirements in the
+list.  The reason is simply that the specifications on laptops the
+last 10-15 years have been sufficient for my needs, and I have to look
+at other features to choose my laptop.  But are there still made as
+robust laptops as my X41?  The Thinkpad X60/X61 proved to be less
+robust, and Thinkpads seem to be heading in the wrong direction since
+Lenovo took over.  But I've been told that X220 and X1 Carbon might
+still be useful.</p>
+
+<p>Perhaps I should rethink my needs, and look for a pad with an
+external keyboard?  I'll have to check the
+<ahref="http://www.linux-laptop.net/">Linux Laptops site</a> for
+well-supported laptops, or perhaps just buy one preinstalled from one
+of the vendors listed on the <ahref="http://linuxpreloaded.com/">Linux
+Pre-loaded site</a>.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html">How to find a browser plugin supporting a given MIME type</a>
+      </div>
+      <div class="date">
+        18th January 2013
+      </div>
+      <div class="body">
+        <p>Some times I try to figure out which Iceweasel browser plugin to
+install to get support for a given MIME type.  Thanks to
+<a href="https://wiki.ubuntu.com/MozillaTeam/Plugins">specifications
+done by Ubuntu</a> and Mozilla, it is possible to do this in Debian.
+Unfortunately, not very many packages provide the needed meta
+information, Anyway, here is a small script to look up all browser
+plugin packages announcing ther MIME support using this specification:</p>
+
+<pre>
+#!/usr/bin/python
+import sys
+import apt
+def pkgs_handling_mimetype(mimetype):
+    cache = apt.Cache()
+    cache.open(None)
+    thepkgs = []
+    for pkg in cache:
+        version = pkg.candidate
+        if version is None:
+            version = pkg.installed
+        if version is None:
+            continue
+        record = version.record
+        if not record.has_key('Npp-MimeType'):
+            continue
+        mime_types = record['Npp-MimeType'].split(',')
+        for t in mime_types:
+            t = t.rstrip().strip()
+            if t == mimetype:
+                thepkgs.append(pkg.name)
+    return thepkgs
+mimetype = "audio/ogg"
+if 1 < len(sys.argv):
+    mimetype = sys.argv[1]
+print "Browser plugin packages supporting %s:" % mimetype
+for pkg in pkgs_handling_mimetype(mimetype):
+    print "  %s" %pkg
+</pre>
+
+<p>It can be used like this to look up a given MIME type:</p>
+
+<pre>
+% ./apt-find-browserplug-for-mimetype 
+Browser plugin packages supporting audio/ogg:
+  gecko-mediaplayer
+% ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
+Browser plugin packages supporting application/x-shockwave-flash:
+  browser-plugin-gnash
+%
+</pre>
+
+<p>In Ubuntu this mechanism is combined with support in the browser
+itself to query for plugins and propose to install the needed
+packages.  It would be great if Debian supported such feature too.  Is
+anyone working on adding it?</p>
+
+<p><strong>Update 2013-01-18 14:20</strong>: The Debian BTS
+request for icweasel support for this feature is
+<a href="http://bugs.debian.org/484010">#484010</a> from 2008 (and
+<a href="http://bugs.debian.org/698426">#698426</a> from today).  Lack
+of manpower and wish for a different design is the reason thus feature
+is not yet in iceweasel from Debian.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">What is the most supported MIME type in Debian?</a>
+      </div>
+      <div class="date">
+        16th January 2013
+      </div>
+      <div class="body">
+        <p>The <a href="http://wiki.debian.org/AppStreamDebianProposal">DEP-11
+proposal to add AppStream information to the Debian archive</a>, is a
+proposal to make it possible for a Desktop application to propose to
+the user some package to install to gain support for a given MIME
+type, font, library etc. that is currently missing.  With such
+mechanism in place, it would be possible for the desktop to
+automatically propose and install leocad if some LDraw file is
+downloaded by the browser.</p>
+
+<p>To get some idea about the current content of the archive, I decided
+to write a simple program to extract all .desktop files from the
+Debian archive and look up the claimed MIME support there.  The result
+can be found on the
+<a href="http://ftp.skolelinux.org/pub/AppStreamTest">Skolelinux FTP
+site</a>.  Using the collected information, it become possible to
+answer the question in the title.  Here are the 20 most supported MIME
+types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
+The complete list is available from the link above.</p>
+
+<p><strong>Debian Stable:</strong></p>
+
+<pre>
+  count MIME type
+  ----- -----------------------
+     32 text/plain
+     30 audio/mpeg
+     29 image/png
+     28 image/jpeg
+     27 application/ogg
+     26 audio/x-mp3
+     25 image/tiff
+     25 image/gif
+     22 image/bmp
+     22 audio/x-wav
+     20 audio/x-flac
+     19 audio/x-mpegurl
+     18 video/x-ms-asf
+     18 audio/x-musepack
+     18 audio/x-mpeg
+     18 application/x-ogg
+     17 video/mpeg
+     17 audio/x-scpls
+     17 audio/ogg
+     16 video/x-ms-wmv
+</pre>
+
+<p><strong>Debian Testing:</strong></p>
+
+<pre>
+  count MIME type
+  ----- -----------------------
+     33 text/plain
+     32 image/png
+     32 image/jpeg
+     29 audio/mpeg
+     27 image/gif
+     26 image/tiff
+     26 application/ogg
+     25 audio/x-mp3
+     22 image/bmp
+     21 audio/x-wav
+     19 audio/x-mpegurl
+     19 audio/x-mpeg
+     18 video/mpeg
+     18 audio/x-scpls
+     18 audio/x-flac
+     18 application/x-ogg
+     17 video/x-ms-asf
+     17 text/html
+     17 audio/x-musepack
+     16 image/x-xbitmap
+</pre>
+
+<p><strong>Debian Unstable:</strong></p>
+
+<pre>
+  count MIME type
+  ----- -----------------------
+     31 text/plain
+     31 image/png
+     31 image/jpeg
+     29 audio/mpeg
+     28 application/ogg
+     27 image/gif
+     26 image/tiff
+     26 audio/x-mp3
+     23 audio/x-wav
+     22 image/bmp
+     21 audio/x-flac
+     20 audio/x-mpegurl
+     19 audio/x-mpeg
+     18 video/x-ms-asf
+     18 video/mpeg
+     18 audio/x-scpls
+     18 application/x-ogg
+     17 audio/x-musepack
+     16 video/x-ms-wmv
+     16 video/x-msvideo
+</pre>
+
+<p>I am told that PackageKit can provide an API to access the kind of
+information mentioned in DEP-11.  I have not yet had time to look at
+it, but hope the PackageKit people in Debian are on top of these
+issues.</p>
+
+<p><strong>Update 2013-01-16 13:35</strong>: Updated numbers after
+discovering a typo in my script.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title">
         <a href="http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html">Using modalias info to find packages handling my hardware</a>
@@ -176,7 +453,7 @@ values stands for.  It is in part based on information from
 this shell script:</p>
 
 <pre>
-cat $(find /sys -name modalias) | sort -u
+find /sys -name modalias -print0 | xargs -0 cat | sort -u
 </pre>
 
 <p>The supported modalias globs for a given kernel module can be found
@@ -368,7 +645,7 @@ hardware to packages when new stuff is inserted during run time.</p>
 one can use the following shell script:</p>
 
 <pre>
-  for id in $(cat $(find /sys -name modalias)|sort -u); do \
+  for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
     echo "$id" ; \
     /sbin/modprobe --show-depends "$id"|sed 's/^/  /' ; \
   done
@@ -399,6 +676,10 @@ packages to install when new hardware is plugged into a Debian
 machine, please send me an email or talk to me on
 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
 
+<p><strong>Update 2013-01-15:</strong> Rewrite "cat $(find ...)" to
+"find ... -print0 | xargs -0 cat" to make sure it handle directories
+in /sys/ with space in them.</p>
+
       </div>
       <div class="tags">
         
@@ -709,7 +990,7 @@ siste måneden.</p>
 <li>2013
 <ul>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (6)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (9)</a></li>
 
 </ul></li>
 
@@ -859,7 +1140,7 @@ siste måneden.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (64)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (67)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (118)</a></li>
 
@@ -869,7 +1150,7 @@ siste måneden.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (170)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (173)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>