According to Gnome's Desktop Application Autostart Specification, I should be able to have a program execute simply by naming it any of ".autorun", "autorun", or "autorun.sh". None of these seem to work: I get a prompt from nautilus-autorun-software asking if I want to let it run, I say "Run", and it results in a dialog that says "Error autorunning software: Cannot find the autorun program". Is it a bug or am I not doing something correctly?

The autorun file contains the following:

#! /bin/sh
gnome-terminal -x sh -c '~/bin/podcatcher/copypodcasts.sh; echo Done!; read pause'

It works if I manually run the autorun file.

The filesystem is fat, here's the mtab entry:

/dev/sdd1 /media/disk vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush 0 0

It makes no sense.

An USB drive is automatically mounted and owned by desktop user. But she must umount it and mount it again as root? I can not see a practical use for this behaviour.

Anyway, I tested this root-mount and nothing showed up on the user desktop.

If you take a look on nautilus code, the _check_file function has no default for "must_be_executable", and calls to this function do not set that parameter.

The only way I got it working was this:

  • format the USB drive in ext2 or ext3
  • put an autoexec file on it
  • change permissions to make this file executable by a desktop user (file can be owned by anybody)
  • plug the USB drive and let gnome to automount it

The cd is probably mounted with the noexec option.

Login as root on a terminal umount it and mount it again as root. This time as a user in the gui autorunning the cd should work. (It does for me with VirtualBox)


"Cannot find the autorun program" may mean the file is not executable. If it's a CDROM, the autorun file has to have execute permissions. That requires Rock Ridge extensions to the ISO9660 file system at ISO image creation time.

I'm using the following procedure (NOTE: you'll need lots of disk space).

  1. create a directory containing the files destined for the CDROM including autorun
  2. make sure the files have execute permission. In the directory issue:

    chmod 555 *
  3. create the ISO image using mkisofs or genisoimage (these appear to be the same program).

    genisoimage  -l -R -J -V disclabel -o directory.iso directory
  4. Burn the iso to a blank CDROM using Brasero

  5. This will yield a labeled CDROM with long file names, Joliet and RockRidge extensions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.