]> pere.pagekite.me Git - homepage.git/commitdiff
Update.
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 9 Jan 2013 14:31:37 +0000 (14:31 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Wed, 9 Jan 2013 14:31:37 +0000 (14:31 +0000)
blog/data/2013-01-09-hw-autoinstall.txt

index 9672da89bc0f8952996d64717671cf6e29e72373..2784827d088be28bbb8e1c4961ce6eb04ca16772 100644 (file)
@@ -1,62 +1,72 @@
 Title: Why isn't Linux desktops installing the hw support packages automatically?
 Tags: english, debian
 Title: Why isn't Linux desktops installing the hw support packages automatically?
 Tags: english, debian
-Date: 2013-01-09 09:20
+Date: 2013-01-09 15:30
 
 <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
 
 <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 run the hardware I plug into my
-machine.  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
+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
 yubikey-personalization package.  The information required to do this
-is available, but no-one pulled all the pieces together yet.</p>
+is available, but no-one have pulled all the pieces together.</p>
 
 
-<p>Many years ago, I proposed to use the discover subsystem to
-implement this.  The idea is fairly simple:
+<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>
 
 
 <ul>
 
-<li>Add a desktop entry pointing to a program in /usr/share/autostart/
-to start it when a user log in.</li>
+<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
 
 <li>Set this program up to listen for kernel events emitted when new
-hardware is inserted.</li>
+  hardware is inserted into the computer.</li>
 
 <li>When new hardware is inserted, look up the hardware ID in a
 
 <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>
+  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
 
 <li>Show a message to the user proposing to install the discovered
-package, and make it easy to install it.</li>
+  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
 
 </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 packagekit to install
+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
 packages.</p>
 
 <p>Yesterday, I found time to try to implement this idea, and the
-draft package is now checked the Debian Edu subversion repository.  In
-the process, I updated the discover-data 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 discover package in Debian no longer found
-any USB devices, because /proc/bus/usb/devices no longer is present,
-and ported it to use libusb as a fall back option.  The fixed package
-version 2.1.2-6 is now in experimental.</p>
+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 found any USB devices, because
+/proc/bus/usb/devices no longer is present, and ported it to use
+libusb as a fall back option.  The fixed package version 2.1.2-6 is
+now in experimental.</p>
 
 <p>With this prototype in place, I can insert my Yubikey, and get this
 
 <p>With this prototype in place, I can insert my Yubikey, and get this
-desktop notification to show up:</p>
+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 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 install the
-proposed packages need to be implemented too.</p>
+<p>For this prototype to be really useful, some way to automatically
+install the proposed packages by pressing the button should to be
+implemented.</p>
 
 
-<p>If this this seem useful to you, and you want to help make it
+<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
 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
@@ -67,9 +77,11 @@ 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
 <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.  Are there better events to use?  How
-should the user be notified?  Is the desktop notification mechanism
-the best option?  How should packages be installed?  When should they
+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,
 not be installed?</p>
 
 <p>If you want to help getting such feature implemented in Debian,