]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index c1d70f3acdb91caca258ab0f5a60120bd1dd9cb0..17739d2bfb2131530993d46083dad1bd358eb125 100644 (file)
 
 
     
+    <div class="entry">
+      <div class="title"><a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">Lets make hardware dongles easier to use in Debian</a></div>
+      <div class="date"> 9th January 2013</div>
+      <div class="body"><p>One thing that annoys me with Debian and Linux distributions in
+general, is that there is a great package management system with the
+ability to automatically install software packages by downloading them
+from the distribution mirrors, but no way to get it to automatically
+install the packages I need to use the hardware I plug into my
+machine.  Even if the package to use it is easily available from the
+Linux distribution.  When I plug in a LEGO Mindstorms NXT, it could
+suggest to automatically install the python-nxt, nbc and t2n packages
+I need to talk to it.  When I plug in a Yubikey, it could propose the
+yubikey-personalization package.  The information required to do this
+is available, but no-one have pulled all the pieces together.</p>
+
+<p>Many years ago, I proposed to
+<a href="http://lists.debian.org/debian-devel/2010/05/msg01206.html">use
+the discover subsystem to implement this</a>.  The idea is fairly
+simple:
+
+<ul>
+
+<li>Add a desktop entry in /usr/share/autostart/ pointing to a program
+  starting when a user log in.</li>
+
+<li>Set this program up to listen for kernel events emitted when new
+  hardware is inserted into the computer.</li>
+
+<li>When new hardware is inserted, look up the hardware ID in a
+  database mapping to packages, and take note of any non-installed
+  packages.</li>
+
+<li>Show a message to the user proposing to install the discovered
+  package, and make it easy to install it.</li>
+
+</ul>
+
+<p>I am not sure what the best way to implement this is, but my
+initial idea was to use dbus events to discover new hardware, the
+discover database to find packages and
+<a href="http://www.packagekit.org/">PackageKit</a> to install
+packages.</p>
+
+<p>Yesterday, I found time to try to implement this idea, and the
+draft package is now checked into
+<a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
+Debian Edu subversion repository</a>.  In the process, I updated the
+<a href="http://packages.qa.debian.org/d/discover-data.html">discover-data</a>
+package to map the USB ids of LEGO Mindstorms and Yubikey devices to
+the relevant packages in Debian, and uploaded a new version
+2.2013.01.09 to unstable.  I also discovered that the current 
+<a href="http://packages.qa.debian.org/d/discover-data.html">discover</a>
+package in Debian no longer discovered any USB devices, because
+/proc/bus/usb/devices is no longer present.  I ported it to use
+libusb as a fall back option to get it working.  The fixed package
+version 2.1.2-6 is now in experimental (didn't upload it to unstable
+because of the freeze).</p>
+
+<p>With this prototype in place, I can insert my Yubikey, and get this
+desktop notification to show up (only once, the first time it is
+inserted):</p>
+
+<p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png"></p>
+
+<p>For this prototype to be really useful, some way to automatically
+install the proposed packages by pressing the "Please install
+program(s)" button should to be implemented.</p>
+
+<p>If this idea seem useful to you, and you want to help make it
+happen, please help me update the discover-data database with mappings
+from hardware to Debian packages.  Check if 'discover-pkginstall -l'
+list the package you would like to have installed when a given
+hardware device is inserted into your computer, and report bugs using
+reportbug if it isn't.  Or, if you know of a better way to provide
+such mapping, please let me know.</p>
+
+<p>This prototype need more work, and there are several questions that
+should be considered before it is ready for production use.  Is dbus
+the correct way to detect new hardware?  At the moment I look for HAL
+dbus events on the system bus, because that is the events I could see
+on my Debian Squeeze KDE desktop.  Are there better events to use?
+How should the user be notified?  Is the desktop notification
+mechanism the best option, or should the background daemon raise a
+popup instead?  How should packages be installed?  When should they
+not be installed?</p>
+
+<p>If you want to help getting such feature implemented in Debian,
+please send me an email. :)</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/New_IRC_channel_for_LEGO_designers_using_Debian.html">New IRC channel for LEGO designers using Debian</a></div>
       <div class="date"> 2nd January 2013</div>
@@ -564,59 +663,6 @@ and DHCP updates I wanted to do.</p>
     </div>
     <div class="padding"></div>
     
-    <div class="entry">
-      <div class="title"><a href="http://people.skolelinux.org/pere/blog/Lenker_for_2012_11_28.html">Lenker for 2012-11-28</a></div>
-      <div class="date">28th November 2012</div>
-      <div class="body"><p>Mye interessant har skjedd de siste ukene.  Her er noen dokumenter
-jeg har hatt glede av å lese.</p>
-
-<p><ul>
-
-<li><a href="http://www.digi.no/906843/kan-du-hjelpe-piratpartiet">-
-Kan du hjelpe Piratpartiet?</a> - Piratpartiet mangler 600
-borgersignaturer for å kunne stille til stortingsvalg neste år.  Jeg
-har samlet 20 signaturer.  Har du gjort ditt?</li>
-
-<li><a href="http://geekfeminism.wikia.com/wiki/Who_is_harmed_by_a_%22Real_Names%22_policy%3F">Who
-is harmed by a "Real Names" policy?</a> - en fin oversikt over hvem
-som blir skadelidende når nett-tjenester og aviser innfører krav om
-"ekte navn" for å delta.</li>
-
-<li><a href="http://www.aftenposten.no/meninger/kronikker/Kan-vi-stole-pa-alle-i-politiet-7056453.html">Kan
-vi stole på alle i politiet?</a> - Advokat Sigurd J. Klomsæt skriver
-litt om hvor merkelig det er å bli anklaget for å ha lekket
-informasjon fra et politi som åpenbart lekker selv.</li>
-
-<li><a href="http://www.digi.no/906576/opphavsretten-maa-vekk">-
-Opphavsretten må vekk</a> - En av stifterne til
-<a href="http://www.eff.org/">EFF</a> besøkte Oslo i forrige uke, og
-ble i den forbindelsen intervjuet av Digi.
-
-<li><a href="http://www.idg.no/computerworld/article261391.ece">Sparer
-100 millioner kroner med Linux</a> - München har beregnet hvor mye de
-har spart på sin overgang til Linux.</li>
-
-<li><a href="http://www.idg.no/computerworld/article259803.ece">Oslo
-Børs kjøres nå på Linux</a> - Børsen gikk nylig over fra .NET-basert
-løsning til Linux-basert løsning, for å få et system med akseptabel
-kvalitet.</li>
-
-<li><a href="http://www.idg.no/computerworld/article261219.ece">It-milliardær
-vil bygge Mars-koloni</a> - inspirerende for oss som savner en
-selvforsynt koloni på Mars.</li>
-
-</ul></p>
-</div>
-      <div class="tags">
-        
-        
-        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>. 
-        
-        
-      </div>
-    </div>
-    <div class="padding"></div>
-    
     <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
     <div id="sidebar">
       
@@ -628,7 +674,7 @@ selvforsynt koloni på Mars.</li>
 <li>2013
 <ul>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (2)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (3)</a></li>
 
 </ul></li>
 
@@ -778,7 +824,7 @@ selvforsynt koloni på Mars.</li>
 
  <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 (59)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (60)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (118)</a></li>
 
@@ -788,7 +834,7 @@ selvforsynt koloni på Mars.</li>
 
  <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 (166)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (167)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>