You are not logged in.

#1 2007-08-21 00:34:26

oksana
Member
From: a forest of popsicles
Registered: 2007-08-01
Posts: 15

Thunar without XFCE, can't eject iPod and other travails.. [solved]

I'm trying to get my Thunar set up to where it automatically shows my ipod when plugged in, but I can right click the icon to unmount it as well.

I used the udev wiki to add a set of rules for automounting usb devices, so my ipod now automatically loads, but there are two problems.

1. There are two icons for the ipod in the Thunar shortcuts pane. One says Apple iPod and shows an error on left click of 'Failed to mount "Apple iPod Music Player" - Given device "/org/freedesktop/Hal/devices/ volume_part1_size_41094144" is not a volume or drive.'

2. The second icon shows the name of my ipod and I can click it to view the drive, great, but on right clicking and choosing Unmount Volume, it shows an error of 'Failed to unmount "iPod" - The volume "iPod" was probably mounted manually on the command line.'

And a seperate, but perhaps related problem is when I press the eject button on my CDROM drive, an error shows as 'Failed to eject "/org/freedesktop/Hal/devices/storage_mode_DVD_RW_ND_3540A". Right clicking the icon in Thunar and choosing eject does work for this, though I'd prefer to be able to use the eject button.

Does anyone have any ideas on a way to fix these problems?

Thanks! big_smile

Last edited by oksana (2007-08-21 22:39:03)


"Man has such a predilection for systems and abstract deductions that he is ready to distort the truth intentionally, he is ready to deny the evidence of his senses only to justify his logic." - Dostoevsky

Offline

#2 2007-08-21 01:30:49

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

I don't know if this is really the answer you're looking for, but the hal daemon (and thunar's volume manager plugin) will handle just about any automount/unmount needs.

# pacman -S thunar-volman hal

add 'hal' to the DAEMON array in /etc/rc.conf

add yourself to the 'storage' and 'optical' groups:

# gpasswd -a username storage
# gpasswd -a username optical

Comment any lines in /etc/fstab relating to the CD/DVD drives and any other removable devices, e.g.:
#/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
#/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0

Edit: Just wanted to add that I connect 2 iPods using this method (nano and an old shuffle) and they work flawlessly.

Last edited by thayer.w (2007-08-21 01:32:33)


thayer williams ~ cinderwick.ca

Offline

#3 2007-08-21 01:44:32

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

Nonono...there's a bug with thunar-volman and ipods that causes them to load twice and whinge about it.  Note that loading two devices is, as far as I know, the intended outcome, since ipods have a mysterious second partition for storing the hopes and dreams of steve jobs himself.  I don't really know what it's for, but you can use an hal policy file (fdi file) to prevent hal from loading it.

The bug has to do with thunar-volman trying to load it and failing.  You can view the bug here:
http://bugzilla.xfce.org/show_bug.cgi?id=2789

Actually, that's a command.  You'll need the first two diffs for the fix: thunar-volman-mount-only-mountable.diff and thunar-vfs-add-is-mountable.diff

First, we'll fix thunar with the following PKGBUILD:

# $Id: PKGBUILD,v 1.8 2007/06/01 22:28:43 tobias Exp $
# Contributor: Andrew Simmons <andrew.simmons@gmail.com>

pkgname=thunar
pkgver=0.8.0
pkgrel=5
pkgdesc="new modern file manager for Xfce"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://thunar.xfce.org"
groups=('xfce4') 
depends=('exo>=0.3.2' 'shared-mime-info' 'pcre' \
         'desktop-file-utils' 'libexif' 'hal' 'fam' \
         'startup-notification')
makedepends=('intltool' 'pkgconfig' 'gtk-doc')
patchname=thunar-vfs-add-is-mountable
options=('!LIBTOOL')
install=${pkgname}.install
source=(http://www.xfce.org/archive/xfce-4.4.1/src/Thunar-${pkgver}.tar.bz2
  thunar-vfs-add-is-mountable.diff )
md5sums=('9f7b0945d6a235391049f6818fb4d188' 'e16532876e24ec10549b274baf262f73' )
build() {
  cd ${startdir}/src/Thunar-${pkgver}
  cp $startdir/$patchname.diff $startdir/src/Thunar-${pkgver}
  patch -Np0 -i ${startdir}/src/Thunar-${pkgver}/${patchname}.diff || return 1
  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/xfce4 \
    --localstatedir=/var --disable-static \
    --disable-gnome-thumbnailers --enable-exif --enable-pcre
  make || return 1
  make DESTDIR=${startdir}/pkg install
  sed -i 's:x-directory/gnome-default-handler;::' ${startdir}/pkg/usr/share/applications/Thunar-folder-handler.desktop
}

Stick thunar-vfs-add-is-mountable.diff in the same directory, and add the install file (call it thunar.install):

post_install() {
  update-desktop-database -q
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}

post_upgrade() {
  post_install $1
}

post_remove() {
  update-desktop-database -q
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}

op=$1
shift

$op $*

and makepkg -i to install it.  Now let's tackle thunar-volman.

First the PKGBUILD:

# $Id: PKGBUILD,v 1.6 2007/04/16 18:41:24 tobias Exp $
# Contributor: Tobias Kieslich <tobias (at) archlinux.org>

pkgname=thunar-volman
pkgver=0.1.2
pkgrel=4
pkgdesc="automatic management for removeable devices in thunar"
arch=(i686 x86_64)
url="http://xfce-goodies.berlios.de/"
license="GPL"
groups=('xfce4-goodies')
depends=('thunar>=0.8')
makedepends=('intltool' 'pkgconfig')
options=('NOLIBTOOL')
patchname=thunar-volman-mount-only-mountable
install=${pkgname}.install
source=(http://download.berlios.de/xfce-goodies/${pkgname}-${pkgver}.tar.bz2 thunar-volman-mount-only-mountable.diff)
md5sums=('910de35c398f70b66b38803bdfdd26f1' 'b7ee9150294f772ed08129fd08328b9d')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  cp $startdir/$patchname.diff $startdir/src/${pkgname}-${pkgver}
  patch -Np0 -i $startdir/src/${pkgname}-${pkgver}/$patchname.diff
  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/xfce4 \
    --localstatedir=/var --disable-static
  make || return 1
  make DESTDIR=${startdir}/pkg install
}

Then add the thunar-volman-mount-only-mountable.diff file, and the install file (call it thunar-volman.install):

post_install() {
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}

post_upgrade() {
  post_install $1
}

post_remove() {
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}

op=$1
shift

$op $*

and makepkg -i again.

They also provide an fdi in the bug report to prevent the extra piece from mounting, but I haven't gotten it to work.  At least the bugs are gone.

BTW I found these trolling through the ubuntu gutsy launchpad.


Cthulhu For President!

Offline

#4 2007-08-21 02:21:55

oksana
Member
From: a forest of popsicles
Registered: 2007-08-01
Posts: 15

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

Thanks for trying to help, but the problems remain!

thayer.w: Beforehand I tried it both with and without thunar-volman and it didn't seem to make a difference. Hal is already installed and in my rc.conf. My username is also already under the optical and storage groups. I've tried it with and without fstab entries and they don't seem to make a difference in these problems.

buttons: I used your info to reinstall the patched thunar and thunar-volman, but it doesn't seem to have made any difference.

Thanks again for trying to help though! big_smile


"Man has such a predilection for systems and abstract deductions that he is ready to distort the truth intentionally, he is ready to deny the evidence of his senses only to justify his logic." - Dostoevsky

Offline

#5 2007-08-21 04:04:09

oksana
Member
From: a forest of popsicles
Registered: 2007-08-01
Posts: 15

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

UPDATE:

I removed all the rules I had added to start fresh, and was able to use that fdi file to fix the problem of two ipod icons showing up in the Thunar places pane.

I also removed autofs and am now able to right click the ipod icon to unmount the volume,.. though my ipod still shows 'Do not disconnect', so I don't know if unmounting the volume is the same as ejecting it. Anyone know?

But the problem of Hal not allowing me to press the eject button on my DVD drive remains. It mounts fine when I click the Thunar icon, and I can right click the same way to unmount it, but pressing the eject button on the drive gives me an error of 'Failed to eject "/org/freedesktop/Hal/devices/storage_mode_DVD_RW_ND_3540A".

Anyone have any ideas? big_smile


"Man has such a predilection for systems and abstract deductions that he is ready to distort the truth intentionally, he is ready to deny the evidence of his senses only to justify his logic." - Dostoevsky

Offline

#6 2007-08-21 05:35:37

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

Glad to hear you've got some of it working...

As for the thunar-volman, I may be out of the loop, but I've never applied a patch and it's worked fine.  After installing the thunar-volman plugin, you did go into the Thunar preferences and enable/customize the volume management options, right?  There's a tick box on one of the tabs and you can define which types of devices should be automounted, etc.

Also, as far as I know the iPod will never say it's okay to eject, because it expects to find iTunes (or the iTunes-related driver) and since it won't find the driver (because you're running Linux) it will always say Do Not Disconnect.  Again, that's just been my experience... as long as you unmount it before disconnecting you should be fine.

With respect to the DVD button not working, I don't think you can manually eject a disk that has been mounted--but I may be totally wrong here.  I believe it is a feature though, rather than a bug.  The CD or DVD must be unmounted first before it will eject from the drive.


thayer williams ~ cinderwick.ca

Offline

#7 2007-08-21 06:30:26

oksana
Member
From: a forest of popsicles
Registered: 2007-08-01
Posts: 15

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

thayer.w: Yup, thunar-volman has been checked in the thunar preferences dialog. Thanks for the information about the ipod ejecting. It seems like I remembered the 'Do not disconnect' going away when unmounting/ejecting with DE's like GNOME but I could have just forgot. As for the DVD Drive eject button, I'm sure it is a feature or a configuration problem, but I just don't know what it might be. I know I've used pre-configured distros that have it mounted yet eject when I press the button, so I'm sure I'll figure it out once I learn more. I was hoping xev might show me the button so I could configure it to unmount/eject but after trying I guess xev only works for mouse/keyboard. <shrugs> Oh well, thanks for your help! big_smile


"Man has such a predilection for systems and abstract deductions that he is ready to distort the truth intentionally, he is ready to deny the evidence of his senses only to justify his logic." - Dostoevsky

Offline

#8 2007-08-21 15:18:20

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

If it's unmounted, it's safe to unplug despite what the iPod thinks.  If you want to make the iPod say "safe to remove," you have to eject it first.  I would caution against this, though, as the "eject" command (at least on arch) seems to let you forcibly unmount the drive before it's finished writing.  I would write a script to do a lazy unmount (umount -l), then an eject (&& eject /dev/uba or somesuch).  Personally I just unmount and unplug when it's ready.

Where did you put that iPod fdi file to get it to work?  The patches are only supposed to fix the errors that come up, and I can't seem to get hal to not give me both drives, even if one is inaccessible.


Cthulhu For President!

Offline

#9 2007-08-21 22:38:37

oksana
Member
From: a forest of popsicles
Registered: 2007-08-01
Posts: 15

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

buttons: Ah, cool, thanks for verifying that ipod information. The 90-ipod-ignore-fw-part.diff file I put in /etc/hal/fdi/policy/ and renamed it 10-user-methods.fdi big_smile


"Man has such a predilection for systems and abstract deductions that he is ready to distort the truth intentionally, he is ready to deny the evidence of his senses only to justify his logic." - Dostoevsky

Offline

#10 2007-08-22 03:50:45

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Thunar without XFCE, can't eject iPod and other travails.. [solved]

Bah.  It didn't work.  Sooo I worked out a little of how the fdi files work, and made the following attempt:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 
<deviceinfo version="0.2">
  <device>
    <!--<match key="@info.parent:portable_audio_player.type" string="ipod">-->
    <match key="info.parent" string="/org/freedesktop/Hal/devices/usb_device_ffffffff_ffffffff_noserial_storage">
      <match key="volume.fsusage" string="">
        <merge key="volume.ignore" type="bool">true</merge>
      </match>
    </match>
  </device>
</deviceinfo>

Because that odd string is what it sees when I plugin the ipod.  Not, as that nice fdi in the bug report would lead you to believe, containing the string "ipod" anywhere.  Oh well.  This works, no more extra mounted bit.

As for the no-eject problem, apparently there's an hal hint that will inform thunar the device needs to be ejected rather than unmounted, a la cdroms.  Of course, thunar ignores this entirely: http://bugzilla.xfce.org/show_bug.cgi?id=3466

I tried applying the patch and the appropriate fdi file, but it's not working for me yet.  YMMV.  Not that this is required in any way, I kinda just wanted to see if it would work.

Last edited by buttons (2007-08-22 03:51:28)


Cthulhu For President!

Offline

Board footer

Powered by FluxBB