Auto mounting again...

I read this and similar. I even wrote to marcus.com...
It's not a problem at all, it's rather about "polishing".
Anyway, my PolicyKit.conf that is from Gnome HAL FAQ allows me to mount and umount as regular user. However it mounts not only removable but also fixed drives.
As a result everything appears mounted on Desktop. In Applications>System Tools>Configuration Editor>apps>nautilus>preferences we have an option: media_automount <bool>
If "false" nothing is automounted, if "true" everything is automounted (and fixed, including all freebsd partitions, openbsd partitions and all linuxes).
I chose false and have to go Places>Removable Media to mount stick or CD (not a big deal though).
It's possible to hide some icons on Desktop (by name) but this doesn't prevent volumes from actual automounting.
It would be just perfect to automount only usb removables and CDs while mount fixed "manually" upon demand.
I feel it's possible via PolicyKit.conf but cannot guess how.
Does somebody know?
In general I expected "udev" or "devkit" to replace HAL soon and just was waiting. But Gnome 2.30 still doesn't work without HAL:(
The link about contains half-a-year-old quesiton: "What's a future of deprecated HAL?"
+1
 
One thing that comes to mind - did you select sysutils/hal's FIXED_MOUNTPOINTS option when building it?
 
You shouldn't, just thought it has something to do with fixed mountpoints problem you are having. Sorry for the noise.
 
Not sure about selectively mounting filesystems at the start. But I have used the following to 'hide' partitions:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
        <device>
                <match key="block.device" string="/dev/ad4s2">
                        <merge key="info.ignore" type="bool">true</merge>
                </match>
        </device>
        <device>
                <match key="block.device" string="/dev/ad4s3">
                        <merge key="info.ignore" type="bool">true</merge>
                </match>
        </device>
        <device>
                <match key="block.device" string="/dev/ad4s4">
                        <merge key="info.ignore" type="bool">true</merge>
                </match>
        </device>
</deviceinfo>

Save that file as 10-ignore-partitions.fdi in /usr/local/etc/hal/preprobe/.
 
Thanks. It works like a charm. But the partitions are really ignored. When mounting from terminal Gnome throws 5 error dialogs.
That's why another question is still in force: what's hal's future? Currently Gnome doesn't work without it but Ubuntu declared: 10.4 - hal free! Same Ubuntu auto mounts no fixed but only removables. However all the fixed are still available for mounting in Gnome's "Removable Media" - just click. ~2 years ago it wasn't so, it was exactly what we have now in FreeBSD's Gnome.
So the idea is exactly this: automount only removables - CDs and usb sticks but the fixed (including data partitions) are not mounted by default but available for one-click-mounting in Removable Media (or Computer).
 
You get your USB-Sticks automounted in gnome with HAL? How? For me only automounting of CD/DVD's and fixed drives works in gnome. When I plug in an USB-stick under gnome, all other mounted icons in nautilus (e.g DVD) even disappear and no mounting is possible anymore! This is something that really p...es me off, because automounting of USB-sticks works fine in KDE4 and Xfce4. For that to work all you need is to add your user name in the PolicyKit.conf with a | after "root" have proc mounted and hal and dbus working.
 
I turned auto mounting off: it's too annoying with my number of file systems.
But I can mount sticks as well as CDs in Computer or Places>Removable Media.
Nothing like you described.
I have PolicyKit.conf as recommended in Gnome HAL FAQ though I'd like to find a time to try just | (pipe) but didn't find so far :)
Right now I turned auto mounting on and inserted a stick. It appeared on Desktop as 4GB drive and Nautilus opened it in a window with all other drives shown in the sidebar as not mounted. Then I inserted a CD and it also appeared on Desktop even as it's own icon. Nothing disappeared in the sidebar.
This gives me an idea that it must be a script that runs upon inserting removable media and ejecting it. The script temporarily turns auto mounting on and then turns it off upon ejecting. This prevents fixed drives from mounting because default is OFF and no mounting occurs upon reboot. Maybe such a script could be found on the Web or on Ubuntu forums because Gnome is Gnome, they didn't make it different for Ubuntu.
I suspect that at yours it could be a conflict between HAL and gnome-mount or other mounting software. If you use KDE and XFCE in the same install their mounting features also may interfere. No sure though.
 
I have PolicyKit.conf as recommended in Gnome HAL FAQ though I'd like to find a time to try just | (pipe) but didn't find so far
:

Look for the enrty with "root" in the standard PoliciKit.conf:

Code:
<match user="root">
  <return result="yes"/>
</match>

and then simply do this:

Code:
<match user="root|youruseraccount">
  <return result="yes"/>
</match>


I've disabled automount in nautilus and the result is interesting: The USB-stick-icon appears in "Computer", but when I double-click it suddenly all mounted drives disappear with a "d-bus error".
So it seems to be that there is a problem with d-bus and not hal within a gnome-environment.
In xfce4 not only the stick gets mounted, but also you get a nice notification in the panel that you can savely remove the drive when you unmount it. This notification is a responsibility of d-bus, isn't it? So why does d-bus not work correctly under gnome?
 
Similar problems here. Pen drive is visible in nautilus if I login while drive's plugged, but nothing else works. The box is running fbsd 8.0 release and latest ports.

I've followed hal faq and tried solutions proposed elsewhere with no luck.
 
If the USB stick is plugged in while starting dbus, gnome works properly. If there's no usb drive in when starting dbus then it will no work. both dbus-monitor and hal are silent when the usb stick is plugged the first time.
 
So if that is the problem, what is the solution? Is that a bug? I think the problem is somehow related to nautilus, not gnome, because here is what I found out, too:

When starting an xfce4-session, no matter if with gdm or not, CD-ROM and USB-stick get mounted an unmounted without a problem as many times as you want, and respective icons show on the desktop and in thunar file manager and even with messages in the lower right corner of the desktop when unmounting (notification area).
Now when I start nautilus in a terminal (inside xfce4) without anything mounted, nautilus will first show under the "Computer" -Icon the symbol for the CD-ROM, the filesystem and floppy. When you insert a CD, the CD gets mounted also within nautilus and of course, thunar and the xfce4-desktop at the same time. But the moment I plug in the USB-Stick, the CD-ROM-icon and the floppy-icon within nautilus disappear, leaving only the icon for the filesystem.
But that does not happen in thunar or the xfce4-desktop, where CD-ROM and USB-stick are still properly mounted and can be unmounted again, showing messages from the notification area respectively. And after that, nautilus will never show CD-ROM or the USB-stick when you try mounting again, while xfce4 still does.
Also, when mounting a CD-ROM in nautilus the first time, when you want to "eject" it from nautilus, you get some error, but not if you eject it through thunar or the xfce4-desktop directly.
So it must be nautilus not being able to handle these mounting operations.
Any ideas?
 
I am not sure, I think xfce4 first, but I think that makes no difference, because the fact is, that with gnome it never works since version 2.24 or 2.26 always performing fresh installs of FreeBSD and I've done also fresh installs of gnome without xfce4.
Mounting just works fine in any version of KDE4, Xfce4, and it just doesn't work on nautilus.
I'm gonna try thunar in a gnome-session and see what happens.
 
I just managed to install all 3: kde, xfce and gnome on -current and now trying to simulate your situation.
I suspect a kind of "competition" between for instance tunar and nautilus and want to check it.
For me Gnome alone always worked fine.
 
Tried whatever. Everything is mounted. KDE - worse: shows errors but mounts anyway.
I don't think it's a bug.
Sorry, I have no solution.
 
I don't have anything else but gnome installed and have pretty much the same situation as cabriofahrer.

What I've figured out is:

situation 1: If no usb stick in, when starting hald, nautilus will not show "Usb stick" in "Computer". not ever.

situation 2: If there is an usb stick in when starting hald, nautilus will work with the stick. Not with any other, if I remove drive #1 and try drive #2, nautilus will hide "USB Stick" from "Computer" and the situation is back to the previous. Not even drive #1 automounts anymore.

If I start gnome and everything else with no usb stick, restarting all of gnome components doesn't help. With stopping gnome, restarting hal and starting gnome I'm back to situation #2.

It seems to have something to do how gnome and hald communicate which causes problems.

this worked fine with gnome 2.28. 2.30 started acting up.
 
See, lartza seems to have the same problem. Meanwhile I've installed gnome2.28 on my notebook via pkg_add (FreeBSD 8.0) and the problem is still the same. Another interesting thing I've found: Started gnome with gdm and then thunar within gnome. Mounting and unmounting with thunar work, this time even with messages in the notification area that it is is safe to remove the media within gnome. But nautilus still fails to work as described before. When trying to mount the stick I get the error:

Code:
Unable to mount location
DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

@zeiz: Can you please provide us with all your config-files/settings that you think are relevant for mounting, PoliciyKit.conf and so on?
And also a question: When you mount a CD and the select "eject" in nautilus, is the CD ejected with a message in the notification area or do you get an error message?
 
This time I tried | (pipe) in PolicyKit.conf instead of recommended in Gnome FAQ.
If it wouldn't work I would return to the recommended. But it works fine with just |.
/etc/rc.conf and /etc/hosts are as in the FAQ. Nothing special.
CD is ejected with neither message in the notification area (in gnome; in xfce the message appears) nor any error message.
As I wrote in KDE4 the error about the same you've posted do appears but stick/CD is still mounted and its content is displayed.
On another machine (8.1-prerelease) with only kde4-4.4.4 no errors appear.
On another machine (10 y.o. one, 9-current) I only have gnome2-2.30 (so far couldn't install it with KDE and XFCE altogether but could in the past) everything is perfect without any errors whatsoever.
I assume it could be only 2 possibilities:
1. Particular hardware issue
2. Something wrong with install/update order especially at the moment.
What's your hardware?
 
Two different computers, one old desktop PC with nforce2-chipset and Geforce5900FX and a Notebook with Intel Mobile Processor and ATI X700 graphics chip. PC hast FreeBSD with fresh install of xorg 7.5 and gnome2.30 from the 8-stable-packages, Notebook FreeBSD 8.0 with gnome2.28 from 8-release packages installed. I don't think it's a hardware issue, though. If it was, the same error would happen in xfce4 and KDE4 and probably not on two totally different machines. Maybe some gnome/nautilus-related package has a failure?
I remember faulty gnome-related packages in the past that always caused different severe errors.
When you say you have installed gnome2.30-9-current, is that from ports or packages?
 
Indeed if you have the same effect on 2 quite different machines it's hard to blame hardware.
Also lartza has only Gnome installed and he has same situation with mounting.
Weird...


I used to compile my Gnome on 9-current from source when 2.30 was a newborn. It worked fine. Then I experimented and made a mess after KDE4 installation. Recently I reinstalled Gnome from packages. Everything is great on my old machine where only Gnome is installed.
However on my newer machine after installing of KDE and Xfce Gnome starts very slow particularly gnome-panel. If I switch from KDM to GDM - Gnome starts normally. Probably Gnome2.30 depends on GDM more than 2.28. But mounting is not affected.
Maybe try checking installation media, reinstall from scratch and then install only Gnome from packages? If success - go further.

In April-May I used to have a problem for a while with that old machine: nothing could be compiled at all, computer hanged and hanged in the middle of any building, including rebuilding world and kernel. With tremendous efforts I installed Gnome and it was unusable at all, what to say about mounting:) I even got an idea that the machine was about to get retired... It was 9-current beyond 201004 snapshot. I downloaded the snapshot and reinstalled FreeBSD from it (it was downgrading actually). And everything became normal! And Gnome. I upgraded the installation to current sources and the problem was back. I reinstalled from 201004 snapshot again and then waited and didn't update sources for a month. Then took a risk and updated. Problem was gone. But it's all about -current and it's expected. I had nothing similar on 8-stable and I don't have 8.0-release.

Maybe you guys should write to gnome@FreeBSD.org?
 
I've got 8.0-release i386 with gnome 2.30 from ports, everything has been updated from ports with portmaster succesfully. I've tried reinstalling hal, dbus, nautilus, gvfs and polkit.

edit: I managed to pinpoint the cause of this, no solution yet. I can bring the USB drive back to nautilus by running /usr/local/libexec/gvfs-hal-volume-monitor from the terminal. It runs, works fine with usb stick #1 (mounts, unmounts, remounts, ...) but when I introduce usb stick #2 the gvfs-hal-volume-monitor process crashes with error message "Segmentation fault: 11 (core dumped)"

edit2: usb stick #2 causes core dump nevertheless. Maybe a different kind filesystem and it's 8Gb too. #1 is only 4GB

edit3: gdb leads probably to the glib20 port (libgio-2.0 is a part of that)?
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 29401140 (LWP 100259)]
0x285a38c7 in strxfrm () from /lib/libc.so.7
(gdb) bt
#0  0x285a38c7 in strxfrm () from /lib/libc.so.7
#1  0x2825c984 in g_utf8_collate_key () from /usr/local/lib/libglib-2.0.so.0
#2  0x28125449 in g_cancellable_new () from /usr/local/lib/libgio-2.0.so.0
#3  0x281256be in g_cancellable_new () from /usr/local/lib/libgio-2.0.so.0
#4  0x281259c1 in g_content_type_guess_for_tree ()
   from /usr/local/lib/libgio-2.0.so.0
#5  0x08052bd1 in ?? ()
#6  0x29443a80 in ?? ()
#7  0x0805af29 in ?? ()
#8  0x29443240 in ?? ()
#9  0x29443a80 in ?? ()
#10 0x294432c8 in ?? ()
#11 0x29464740 in ?? ()
#12 0x294b0b20 in ?? ()
#13 0x2819ad44 in ?? () from /usr/local/lib/libgio-2.0.so.0
#14 0x294167e0 in ?? ()
#15 0x29464740 in ?? ()
#16 0xbfbfe838 in ?? ()
#17 0x2814ce08 in g_mount_guess_content_type_sync ()
   from /usr/local/lib/libgio-2.0.so.0
Previous frame identical to this frame (corrupt stack?)
 
Hey guys, look at this:

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/393051

It seems to be bug in gvfs since 2009 with exactely the same problem description and error message. The thread contains a redirection to a patch which apperantly solves the problem.
How could we apply that patch, because doing a "make deinstall" and "make reinstall" in /usr/ports/devel/gvfs didn't help, so I guess that patch is not integrated in the ports yet?
 
Back
Top