Gnome automount madness on FreeBSD 9-RC1

Before bothering Joe and filing a PR on it, wanted to drop by here and see if perhaps I'm missing something as to devfs.rules or other configuration for Gnome under 9.0. GVFS automount has always worked just dandy under previous BSD versions, but in 9.0 there's been some genuine strangeness with automount in Gnome. I'm *hoping* that my configuration hasn't caught up with the USB stack changes rather than it being an actual insect before I cause panic among an already busy gnome team.

Here's the deal ... when I plug in a USB device (iPod, stick, etc) I sometimes get automount the first try and the associated icon is that of a USB device. All works fine, and it can be unmounted just fine as well. The NEXT device however, if it mounts at all, appears as a SCSI device with a similar icon to my existing hard disk. Thereafter, if unmounted, nothing else shows and further attempted mounts fail.

UNLESS I grab a terminal, type in the usual [CMD=""]mount -t msdosfs /dev/da0s1 /mnt[/CMD] whereupon I receive a "devise busy" fail. If I follow that in a terminal window with [CMD=""]umount -f /mnt[/CMD] I then receive a second error whereupon the device then mounts just fine in Gnome. Except that it mounts TWICE with two separate windows appearing. When the device is unmounted, a "ghost" device still appears in the "computer" directory on the Gnome desktop.

Something truly strange here, and I've not changed a thing in my previous settings from BSD 8.2. My guess is that something has changed and my config is no longer valid for Gnome under 9.0-RC1 but I haven't seen any information on Joe's pages that indicate how to get around this.

So here I am, hat in hand, looking for a handout. :)

Here's the dmesg on it if it's of any help in what's gone wrong on my end here:

Code:
Oct 29 04:43:22 KNOS-32 kernel: ugen5.3: <Apple Inc.> at usbus5 (disconnected)
Oct 29 04:43:22 KNOS-32 kernel: umass1: at uhub5, port 5, addr 3 (disconnected)
Oct 29 04:43:22 KNOS-32 kernel: (da1:umass-sim1:1:0:0): lost device - 0 outstanding
Oct 29 04:43:22 KNOS-32 kernel: (da1:umass-sim1:1:0:0): removing device entry
Oct 29 04:44:48 KNOS-32 kernel: ugen5.3: <Apple Inc.> at usbus5
Oct 29 04:44:48 KNOS-32 kernel: umass1: <Apple Inc. iPod, class 0/0, rev 2.00/0.01, addr 3> on usbus5
Oct 29 04:44:51 KNOS-32 kernel: da1 at umass-sim1 bus 1 scbus6 target 0 lun 0
Oct 29 04:44:51 KNOS-32 kernel: da1: <Apple iPod 1.62> Removable Direct Access SCSI-0 device 
Oct 29 04:44:51 KNOS-32 kernel: da1: 40.000MB/s transfers
Oct 29 04:44:51 KNOS-32 kernel: da1: 114281MB (29255991 4096 byte sectors: 255H 63S/T 1821C)
Oct 29 00:46:47 KNOS-32 su: KNOS to root on /dev/pts/0
Oct 29 04:53:50 KNOS-32 kernel: ugen5.3: <Apple Inc.> at usbus5 (disconnected)
Oct 29 04:53:50 KNOS-32 kernel: umass1: at uhub5, port 5, addr 3 (disconnected)
Oct 29 04:53:50 KNOS-32 kernel: (da1:umass-sim1:1:0:0): lost device - 0 outstanding
Oct 29 04:53:50 KNOS-32 kernel: (da1:umass-sim1:1:0:0): removing device entry
Oct 29 06:08:28 KNOS-32 kernel: ugen5.3: <Staples> at usbus5
Oct 29 06:08:28 KNOS-32 kernel: umass1: <Staples Staples UFD, class 0/0, rev 2.00/1.00, addr 3> on usbus5
Oct 29 06:08:28 KNOS-32 kernel: da1 at umass-sim1 bus 1 scbus6 target 0 lun 0
Oct 29 06:08:28 KNOS-32 kernel: da1: <Staples Staples UFD PMAP> Removable Direct Access SCSI-0 device 
Oct 29 06:08:28 KNOS-32 kernel: da1: 40.000MB/s transfers
Oct 29 06:08:28 KNOS-32 kernel: da1: 247MB (505856 512 byte sectors: 64H 32S/T 247C)
Oct 29 06:09:07 KNOS-32 kernel: ugen5.3: <Staples> at usbus5 (disconnected)
Oct 29 06:09:07 KNOS-32 kernel: umass1: at uhub5, port 5, addr 3 (disconnected)
Oct 29 06:09:07 KNOS-32 kernel: (da1:umass-sim1:1:0:0): lost device - 0 outstanding
Oct 29 06:09:07 KNOS-32 kernel: (da1:umass-sim1:1:0:0): removing device entry

Here's my devfs.conf:

Code:
# Historically X depended on this, but version 4.3.0 doesn't seem to anymore
#link	ttyv0	vga

# Commonly used by many ports
link	acd0	cdrom

# Allow a user in the wheel group to query the smb0 device
perm	smb0	0666

# Wanna see my webcam?
perm	video0	0666

#access USB printer
own	usb/* 	root:operator
perm 	usb/*	0666

#access USB scanner
own	ugen* 	root:operator
perm 	ugen*	0666

#access pass devices
own	pass* 	root:operator
perm 	pass*	0666

#access USB sticks
own	da0* 	root:operator
perm 	da0*	0666

#access CD/DVDROM
own	cd* 	root:operator
perm 	cd*	0666
perm	xpt0	0660

#access USB memcards
own	sd0* 	root:operator
perm 	sd0*	0666

#access USB webcams
own	video* 	root:operator
perm 	video*	0666

Here's my devfs.rules:

Code:
[system=7]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/*' mode 0777 group operator
add path 'ugen*' mode 0660 group operator
add path 'umass*' mode 0660 group operator
add path 'pass*' mode 0660 group operator
add path 'sd*' mode 0660 group operator
add path 'da*' mode 0660 group operator
add path 'acd*' mode 0660 group operator
add path 'da*s*' mode 0660 group operator
add path 'video*' mode 0660 group operator

I'm sure *I* am the problem here ... but where? Since I don't see other complaints about something so obvious, it's GOTTA be me having a brainf*rt here.
 
Automounting does NOT work with the latest Gnome. It currently depends on Linux' udev, which means it's not going to work. Not on 9 or on any other version.
 
SirDice said:
Automounting does NOT work with the latest Gnome. It currently depends on Linux' udev, which means it's not going to work. Not on 9 or on any other version.
Greetings, stranger! Long time no type. Just to be sure we're on the same page, I'm referring to the same old usual gnome, namely the gnome2-2.32.1_3 as packaged on "Latest." I can understand Gnome3 being a no-go, I certainly wasn't impressed either. But other than some fixes, did Joe go and drop udev in the venerable old one too? That'd be a disappoint.
 
Wellll ... the scope of the changes to 9.0 are settling in, and since it's quite apparent with devices now showing up under /dev/(filesystem type)/(Volume name if any) I can see why the automount no longer works in Gnome.

Been ripping my hair out though trying to find the actual code where automount is done within gnome-2.32.1_3 and want to see if I can somehow modify what I'm building to work around it since I haven't been able to find any sign of work by Joe and company. Could anyone point out which code handled this and where it is in the ports stuff?

I have to guess that it's gvfs-hal-volume-monitor or gvfsd but I'm unable so far to determine where I should be looking for where to begin. If I manage to come up with a workaround, be happy to share it. But I absolutely need to come up with some means of automounting at least pluggable media with 9.0.

Anyone have any idea of where the hunt should begin here?
 
KNOStic said:
Just to be sure we're on the same page, I'm referring to the same old usual gnome, namely the gnome2-2.32.1_3 as packaged on "Latest."
If I recall correctly 2.30 or 2.28 was the last one that worked. After that they moved away from HAL and in the direction of udev.
 
PCBSD did a workaround called "amount" ... looking into it now. Perhaps others might want to play with it in similar situations. Quite kludgy, but it's a start. Will see if it works out and report back. Since I live out in farm country, I'm used to udderly hideous kludges sometimes. Moo. :)
 
Hi guys,

I am relatively new to FreeBSD, when you say automount, do you mean good old automount daemon? Or gnome-automount? I have a fresh FreeBSD 9-RC1 Gnome2 install, I am member of group "operator" and mounting of devices from Nautilus works for me.

Let me know if we are talking about the same thing,

Kirill R
 
KNOStic said:
PCBSD did a workaround called "amount" ... looking into it now.
I authored it before they modded it for PCBSD. See [thread=27233]here[/thread] for the latest development. I still need to make documentation for it. Happy hacking in the mean time. :)
 
kirillrdy said:
Hi guys,
I am relatively new to FreeBSD, when you say automount,
do you mean good old automount daemon ? Or gnome-automount ?
I have fresh FreeBSD9.0RC1 gnome2 install, I am member of group "operator" and mounting of devices from Nautilus works for me.

Let me know if we are taking about same thing,

Kirill R
Greets, mate! In my case, I'm referring to the gnome automount. With the new kernel's cam stuff, the /dev mounts are now occurring elsewhere and gnome's automount just isn't seeing them. We've got a few bities scrambling at the moment. I'm fairly certain that I've done the correct owns and perms, but so far no joy. I imagine the new locations aren't helping here. I'm seeing no mounts at all on the amd64 version, 32 appeared to be fine aside from hotplugs.
 
aragon said:
I authored it before they modded it for PCBSD. See [thread=27233]here[/thread] for the latest development. I still need to make documentation for it. Happy hacking in the mean time. :)
Thanks very much for that! I'll look into that later since it appears a bit cleaner. I'm still hoping that the gdm stuff will get updated before release but if not, looks like I'll need to go this way. I'm hoping to see the automount applet in gnome work with whatever outcome as well. Thanks again!
 
KNOStic said:
Greets, mate! In my case, I'm referring to the gnome automount. With the new kernel's cam stuff, the /dev mounts are now occurring elsewhere and gnome's automount just isn't seeing them. We've got a few bities scrambling at the moment. I'm fairly certain that I've done the correct owns and perms, but so far no joy. I imagine the new locations aren't helping here. I'm seeing no mounts at all on the amd64 version, 32 appeared to be fine aside from hotplugs.

Thanks for reply.

I can try 64bit on weekend (tomorrow) Will let you know if i have any issues with automount.

Kirill
 
aragon said:
I authored it before they modded it for PCBSD. See [thread=27233]here[/thread] for the latest development. I still need to make documentation for it. Happy hacking in the mean time. :)

Greetings! If you're still interested in some reworking of what you've done, you might be greatly interested in what they did to updatedesktop.pl and their new openfm.sh modules which add support for gnome and other DE's. Been playing with it and it looks like it could work with more diddling. It even lit up mounts on the gnome-mountdisk applet, so it has potential as a fix for gnome itself. It's quite clunky, but I'm gonna play with it some more since it just might be a solution of Joe Marcus doesn't come up with one of his own.

I'm still making a major mess on my end with it on my end and it doesn't work quite the same as the old HAL mount yet, but it definitely has potential. I'm going to toy with it a bit more and see if I can beat it into submission. Go grab the pcbsd version, you might find it amusing for your own head and if I get anywhere with my own hacks, will let you know.
 
I am using FreeBSD since the last 2 months.I clearly did make a wrong choice of starting with 9.0RC1 and setting up gnome 2.i couldn't auto mount devices at all, i moved to 9.0-RC3 and it didnt help either.I had to mount devices from terminal and you know how painful everytime that is. played a lot with devfs.rules and started using GhostBSD 2.5 RC1 for the last 2 days until i got to this thread.I have absolutely no issues with auto mounting.i not a programmer but i guess GhostBSD guys have found a workaround for this udev unavailablity in FreeBSD.
 
hadrons123 said:
I am using FreeBSD since the last 2 months.I clearly did make a wrong choice of starting with 9.0RC1 and setting up gnome 2.i couldn't auto mount devices at all, i moved to 9.0-RC3 and it didnt help either.I had to mount devices from terminal and you know how painful everytime that is. played a lot with devfs.rules and started using GhostBSD 2.5 RC1 for the last 2 days until i got to this thread.I have absolutely no issues with auto mounting.i not a programmer but i guess GhostBSD guys have found a workaround for this udev unavailablity in FreeBSD.
Yes ... we fixed it here at KNOS Project as well. The PROBLEM is the packages. We recompiled GVFS and HAL on our end from the sources, and that woke everything up. Since there didn't appear to be any interest in this thread, didn't come back to report on it given so many other things that needed fixing.
 
KNOStic said:
The PROBLEM is the packages

You mean binary packages or the ports?

KNOStic said:
We recompiled GVFS and HAL on our end from the sources, and that woke everything up.

How did you do that (from ports or download from gnome website manually)?

Do you mind explaining?
 
As I remember from HAL times for proper auto mounting /usr/local/etc/PolicyKit/PolicyKit.conf should be modified as explained in here. However now (9-STABLE, Gnome 2.32) auto mounting works without the editing... not perfect though. One stick is mounted fine another doesn't.
2-3 years ago I had a conversation with Joe Marcus about the mounting. My point was that perhaps nobody needs all the hdd partitions automounted but it's desirable to automount real "removable media" such as CD/DVD, usb sticks, cameras etc. Unfortunately there is no progress in this direction: Gnome still auto mounts all or nothing.
On the other hand in general gnome2-2.32.1_3 on 9-STABLE performs very well, many thanks to Gnome team.
 
KNOStic said:
Yes ... we fixed it here at KNOS Project as well. The PROBLEM is the packages. We recompiled GVFS and HAL on our end from the sources, and that woke everything up. Since there didn't appear to be any interest in this thread, didn't come back to report on it given so many other things that needed fixing.

Well, I bumped into this thread by google because I had the same problem when a few days ago when I decided to do a fresh install of FreeBSD 9.0 (before I had 8.2) and the latest gnome-packages. Thinking I would then just be able to use my old configuration files like devfs.rules, rc.conf, PolicyKit.conf, etc. I suddenly became disappointed when in gnome nothing would mount. Then I erased all the userland and installed KDE4 and xorg and then at least the USB-Sticks would mount, but not the CD (it did not even appear in dolphin either, just like in nautilus).

And now that I have finally found the solution in your post, I find this thread very interesting.
So what I learned from here in order to make the CD work as well is (for KDE4 then, as there is no gvfs):

Code:
cd /usr/ports/sysutils/hal
make deinstall
make reinstall

After a reboot I put in a CD and it finally got automounted in KDE4. So thank you very much indeed for this information! But if I understand it right, in gnome still after this it does not work perfectly?

Well, what really annoys me is that after almost every version jump of FreeBSD or gnome, there is always something that does not work right anymore, and that you have to search and search for days until someone has come up with the solution. And especially with gnome, it is always some stupid packages that have to be recompiled.

Obviously the developers and maintainers still do not have the common desktop user in mind, for whom mounting media is one of the most essential things, so I cannot understand why a package like HAL or GVFS does not come in the proper way for FreeBSD 9.
 
Back
Top