Le jeu 19/06/2003 � 12:25, Andrey Borzenkov a �crit : > The right solution is to add support for external helper and query it > for mount options for a given device/fstype.
That's a great idea ! > - do something sensible when device could not be mounted. the > "please insert CD" dialog that windows pops up would be very > useful for newbies as example. you have a problem. If u are in console mode how are u doing to do that ? I'm editing with vi and I think i something appear on my screen during my work I won't be happy, or show it with syslog. Now the hardest part : under X11. Are you going to use Xlib/Tk to show it ? or gtk/Qt ? but are are u going to make the difference ? This helper should not interact. In fact it's the responsability of the .DE ( KDE/Gnome/WM/... ) to monitor it ( like fam ) and when it trap the signal to decide what to do so that the user can easily disable it ( evenn if the helper is still monitoring for others users ) and have graphical integration > - if device polling is added (as some people om lkml keep suggesting) > run arbitrary command on insertion. Like launching CD player e.g. see above. Just monitor, give an API to monitor, access signal, identify signal ( a signal for an audio CD, for a DVD, for a data CD, for a VCD, .... ) and let a separate tool provide by the D.E or another app do the job. How are u going to knwo which CD player to launch ? users A may prefer KDE CD player under KDE, but users B may prefer gnome CD player still under KDE ! so your helper should just monitor, send signal, log, and keep an history and an API to access this. so it completly independant of the system, and you will have a module in emacs that will monitor it and emacs will tell me in a good way ( buffer ) what happen and will propose me if I want play the CD during my work
