autorun

Differences between revisions 14 and 15
Revision 14 as of 2007-07-02 23:56:17
Size: 4126
Editor: 237
Comment: added attachments
Revision 15 as of 2007-07-03 00:00:57
Size: 4126
Editor: 237
Comment:
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
      attachment:autorun_second_dialog.png       attachment:autorun_second_dialog.jpg
Line 43: Line 43:
      attachment:music_third_dialog.png       attachment:music_third_dialog.jpg

Summary

  • This blueprint has for goal to implement the autorun capabilities described in a autorun.inf file.
  • The main use of this blueprint is to autorun windows programs CD's but there is nothing that prevents linux programs to be launched the same way.
  • Wine has made a lot of progress and implementing this autorun capability can now be done to ease the installation of windows programs on Ubuntu.
  • In all cases, the user is asked whether to autorun the programs. Nothing is done without the user consent.

Use cases

  • Max bought the doom3 game in a shop. He already installed the wine package but he hates the command line. When he inserts the CD, a popup appears asking him whether he wants to autorun a program on the CD (and giving him the program path). He allows the program to autorun and install the game.
  • Chloé like to listen music on her Ubuntu computer. When she inserts a Sony CD, a popup appears asking her whether she wants to autorun a program on the CD. She wonders why a program want to run and refuse to let the cd autorun.

Automatic Wine Installation

The automatic wine installation is present in another blueprint : insert here

  • Julien just installed Ubuntu on his computer. He has never heard of wine but a friend of him said that Diablo II was running on Linux. When he inserts the CD, a popup appears asking him whether he wants to autorun a program on the CD (and giving him the program path). He allows the program to autorun. Because wine is not yet installed and the program is a .exe file, a dialog appears explaining him what is wine / that he should try to find native alternatives first / ... and he has then the option to install wine. He choose to install wine and the autorun program on the cd starts after the installation.

Scope & Design

  • the gnome-volume-manager daemon is notified by the Hardware Abstraction Layer (hal) when a cd is inserted in the drive.
  • If the "Auto-run programs" option is enabled in System->Preferences->Removable Drives and Media, then it checks if a autorun.inf file is present (case insensitive).

  • In the autorun.inf file is present, gnome-volume-manager reads it and find the "open" key from the "autorun" group (case insensitive)
  • a dialog appears asking whether to autorun this program.
  • If this is a .exe file, it tries to find wine and run the program. If wine is not present it should propose to install wine.
  • If this is not a .exe file then it tries to run it normally.
    • attachment:autorun_first_dialog.png attachment:autorun_second_dialog.jpg

Additional step if CD contains music tracks

If the CD contains music tracks, it will first ask you if you want to listen to the CD or to Browse the files (or ignore). The autorun dialog will only appears if you choose "Browse the files".

  • attachment:music_first_dialog.png attachment:music_second_dialog.png attachment:music_third_dialog.jpg

Implementation

Patch can be found there (only for autorun, not for automatic wine installing): https://bugs.launchpad.net/ubuntu/+source/gnome-volume-manager/+bug/123313

Testing

You can test this patch by following the following steps to download and install the patch:

  • Download and install:

    sudo apt-get install build-essential
    sudo apt-get build-dep gnome-volume-manager
    mkdir gnome-volume-manager
    cd gnome-volume-manager
    apt-get source gnome-volume-manager
    wget http://launchpadlibrarian.net/8284313/gnome-volume-manager-autorun-inf-01.patch
    patch -p1 < gnome-volume-manager-autorun-inf-01.patch
    cd gnome-volume-manager-2.17.0
    ./configure --prefix=/usr
    make
    sudo make install
  • Kill gnome-volume-manager and launch it in the terminal to look for debug information with:

    kill -9 `pidof gnome-volume-manager` ; gnome-volume-manager --sm-disable -n

Known Bugs

Comments


CategorySpec

autorun (last edited 2008-08-06 16:22:16 by localhost)