OK, for completeness (sorry everyone for the spate of emails!)
Copied /etc/udev/scripts/removable.sh from my Hoary system.
Disk mounted, nautilus window appeared. No icon on desktop, however, even following /etc/init.d/dbus restart
# ls -l /dev/sda* brw-r----- 1 root plugdev 8, 0 2005-08-16 20:46 /dev/sda brw-r----- 1 root plugdev 8, 1 2005-08-16 20:46 /dev/sda1
# sh -x /etc/udev/scripts/removable.sh sda + DEV=sda + BLOCKPATH=/sys/block/sda + '[' '!' -d /sys/block/sda ']' + REMOVABLE=/sys/block/sda/removable ++ readlink -f /sys/block/sda/device + DEVICE=/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 + IS_REMOVABLE=0 + '[' -e /sys/block/sda/removable ']' ++ cat /sys/block/sda/removable + IS_REMOVABLE=0 + '[' 0 = 1 ']' + check_bus usb + BUSDEVP=/sys/bus/usb/devices + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/1-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/1-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.0/usb1/1-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-2 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-2 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-2:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-2:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2/2-2:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/3-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/3-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/3-1 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/3-1 + grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1' + return 0 + echo 1 1 + exit 0
# sh /etc/udev/scripts/removable.sh sda1 + DEV=sda + BLOCKPATH=/sys/block/sda + '[' '!' -d /sys/block/sda ']' + REMOVABLE=/sys/block/sda/removable ++ readlink -f /sys/block/sda/device + DEVICE=/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 + IS_REMOVABLE=0 + '[' -e /sys/block/sda/removable ']' ++ cat /sys/block/sda/removable + IS_REMOVABLE=0 + '[' 0 = 1 ']' + check_bus usb + BUSDEVP=/sys/bus/usb/devices + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/1-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/1-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.0/usb1/1-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-2 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-2 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/2-2:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/2-2:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2/2-2:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/3-0:1.0 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/3-0:1.0 + grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-0:1.0' + for x in '$BUSDEVP/*' + '[' -L /sys/bus/usb/devices/3-1 ']' + echo /sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0 ++ readlink -f /sys/bus/usb/devices/3-1 + grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1' + return 0 + echo 1 1 + exit 0
OK, for completeness (sorry everyone for the spate of emails!)
Copied /etc/udev/ scripts/ removable. sh from my Hoary system.
Disk mounted, nautilus window appeared. No icon on desktop, however, even
following /etc/init.d/dbus restart
# ls -l /dev/sda*
brw-r----- 1 root plugdev 8, 0 2005-08-16 20:46 /dev/sda
brw-r----- 1 root plugdev 8, 1 2005-08-16 20:46 /dev/sda1
# sh -x /etc/udev/ scripts/ removable. sh sda /sys/block/ sda /sys/block/ sda/removable sda/device /sys/devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 sda/removable ']' sda/removable /sys/bus/ usb/devices usb/devices/ 1-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 1-0:1.0 devices/ pci0000: 00/0000: 00:13.0/ usb1/1- 0:1.0' usb/devices/ 2-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-0:1.0 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 0:1.0' usb/devices/ 2-2 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-2 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 2' usb/devices/ 2-2:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-2:1.0 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 2/2-2:1. 0' usb/devices/ 3-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 3-0:1.0 devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 0:1.0' usb/devices/ 3-1 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 3-1 devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 1'
+ DEV=sda
+ BLOCKPATH=
+ '[' '!' -d /sys/block/sda ']'
+ REMOVABLE=
++ readlink -f /sys/block/
+
DEVICE=
+ IS_REMOVABLE=0
+ '[' -e /sys/block/
++ cat /sys/block/
+ IS_REMOVABLE=0
+ '[' 0 = 1 ']'
+ check_bus usb
+ BUSDEVP=
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ return 0
+ echo 1
1
+ exit 0
# sh /etc/udev/ scripts/ removable. sh sda1 /sys/block/ sda /sys/block/ sda/removable sda/device /sys/devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 sda/removable ']' sda/removable /sys/bus/ usb/devices usb/devices/ 1-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 1-0:1.0 devices/ pci0000: 00/0000: 00:13.0/ usb1/1- 0:1.0' usb/devices/ 2-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-0:1.0 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 0:1.0' usb/devices/ 2-2 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-2 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 2' usb/devices/ 2-2:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 2-2:1.0 devices/ pci0000: 00/0000: 00:13.1/ usb2/2- 2/2-2:1. 0' usb/devices/ 3-0:1.0 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 3-0:1.0 devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 0:1.0' usb/devices/ 3-1 ']' pci0000: 00/0000: 00:13.2/ usb3/3- 1/3-1:1. 0/host2/ target2: 0:0/2:0: 0:0 usb/devices/ 3-1 devices/ pci0000: 00/0000: 00:13.2/ usb3/3- 1'
+ DEV=sda
+ BLOCKPATH=
+ '[' '!' -d /sys/block/sda ']'
+ REMOVABLE=
++ readlink -f /sys/block/
+
DEVICE=
+ IS_REMOVABLE=0
+ '[' -e /sys/block/
++ cat /sys/block/
+ IS_REMOVABLE=0
+ '[' 0 = 1 ']'
+ check_bus usb
+ BUSDEVP=
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/
+ echo
/sys/devices/
++ readlink -f /sys/bus/
+ grep -q '^/sys/
+ return 0
+ echo 1
1
+ exit 0