autorun

Differences between revisions 14 and 25 (spanning 11 versions)
Revision 14 as of 2007-07-02 23:56:17
Size: 4126
Editor: 237
Comment: added attachments
Revision 25 as of 2008-08-06 16:22:16
Size: 4852
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * 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.
 * This blueprint has for goal to implement the autorun capabilities described in a autorun.inf file for the GNOME desktop.
 * The main use of this blueprint is to autorun windows programs CDs but there is nothing that prevents linux programs to be launched the same way.
Line 15: Line 15:
 * 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.  * Chloé likes 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 wants to run and refuses to let the CD autorun.
Line 21: Line 21:
 * 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.  * Julien just installed Ubuntu on his computer. He has never heard of wine but a friend of his 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 chooses to install wine and the autorun program on the cd starts after the installation.
Line 32: Line 32:
      attachment:autorun_first_dialog.png === Example ===
Line 34: Line 34:
      attachment:autorun_second_dialog.png       {{attachment:autorun_first_dialog.png}}

      {{
attachment:autorun_second_dialog.jpg}}
Line 39: Line 41:
      attachment:music_first_dialog.png       {{attachment:music_first_dialog.png}}
Line 41: Line 43:
      attachment:music_second_dialog.png       {{attachment:music_second_dialog.png}}
Line 43: Line 45:
      attachment:music_third_dialog.png       {{attachment:music_third_dialog.jpg}}
Line 60: Line 62:
wget http://launchpadlibrarian.net/8284313/gnome-volume-manager-autorun-inf-01.patch
patch -p1 < gnome-volume-manager-autorun-inf-01.patch
wget http://launchpadlibrarian.net/8292130/gnome-volume-manager-autorun-inf-02.patch
patch -p1 < gnome-volume-manager-autorun-inf-02.patch
Line 68: Line 70:
 * Don't forget to allow autorun in System->Preferences->Removable Drives and Media.

 * You also need to install the wine package if it is not already installed (automatic wine install is not implemented).
Line 71: Line 77:

=== How to report bugs ===

If you have a cd which doesn't autorun AND the launcher described in the autorun.inf file is working with wine. Then you can report the bug here.

Be sure that it is not a wine bug !

You can then post the content of your autorun.inf file and debug messages from the terminal in the comments section.
Line 76: Line 90:
The above implementation is now obsolete, another version has been commited to the gnome-volume-manager svn.

Summary

  • This blueprint has for goal to implement the autorun capabilities described in a autorun.inf file for the GNOME desktop.
  • The main use of this blueprint is to autorun windows programs CDs 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é likes 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 wants to run and refuses 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 his 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 chooses 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.

Example

  • autorun_first_dialog.png

    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".

  • music_first_dialog.png

    music_second_dialog.png

    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/8292130/gnome-volume-manager-autorun-inf-02.patch
    patch -p1 < gnome-volume-manager-autorun-inf-02.patch
    cd gnome-volume-manager-2.17.0
    ./configure --prefix=/usr
    make
    sudo make install
  • Don't forget to allow autorun in System->Preferences->Removable Drives and Media.

  • You also need to install the wine package if it is not already installed (automatic wine install is not implemented).
  • 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

How to report bugs

If you have a cd which doesn't autorun AND the launcher described in the autorun.inf file is working with wine. Then you can report the bug here.

Be sure that it is not a wine bug !

You can then post the content of your autorun.inf file and debug messages from the terminal in the comments section.

Known Bugs

Comments

The above implementation is now obsolete, another version has been commited to the gnome-volume-manager svn.


CategorySpec

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