You are not logged in.

#1 2010-03-08 09:33:41

tung
Member
From: Sydney, Australia
Registered: 2008-08-22
Posts: 29
Website

How to change HAL mount options in GNOME

I recently reinstalled Arch from a clean slate, i.e. wiped my disks before installing. This moved me from GNOME 2.26 to 2.28, of which I have a typical install.

My external hard disk has special characters in its filenames. They displayed fine before, but now they just show up as garbage.

I found that I could fix this by unmounting, then remounting the disk without the utf8=1 option.

Here's what an automatic, non-interactive mount looks like.

$ tail -n 1 /etc/mtab
/dev/sdc1 /media/WD\040Passport vfat rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,flush 0 0

Note the utf8=1 near the end.



Problem

How do I make GNOME/HAL omit that "utf8=1" when I hotplug my external hard disk?



Prior research

1. Tweaking HAL *.fdi files didn't work. No modifications to files in /usr/share/hal/fdi/policy/ or /etc/hal/fdi/policy/ made any difference. The most I found was in 20-storage-methods.fdi, with its volume.mount.valid_options keys, but using <remove> rules had no effect.

2. Writing my own *.fdi file in /etc/hal/fdi/policy/ didn't work. Following the HAL docs, I discovered in another link that changing volume.policy.mount_option.utf8 was worthless anyway, as it'd been made obsolete.

3. Setting /system/storage/default_options/vfat/mount_options in GNOME's configuration to [ utf8=0 ] has no effect. In fact the whole thing seems entirely ignored, no matter what options I try to alter. Am I missing something?

I was careful to undo all of my actions between each solution. I still have the setting for the last one, though it doesn't do anything. Running that "tail" command from above gives exactly the same line, even after a reboot.



Any help or experience with solving this would be greatly appreciated.


Running Arch on Eee PC 901 12 GB

Offline

#2 2010-03-08 12:04:00

jarryson
Member
Registered: 2007-02-18
Posts: 298

Re: How to change HAL mount options in GNOME

gnome won't use hal to mount any more, now use udisks(devicekit-disks)

Offline

#3 2010-03-08 21:08:25

tung
Member
From: Sydney, Australia
Registered: 2008-08-22
Posts: 29
Website

Re: How to change HAL mount options in GNOME

Thanks, that explains a few things. udev seems to be controlled by a bunch of *.rules files, but I'll have time to mess around with them later.

Does anybody have any advice relating to changing default mount options using udev rules?


Running Arch on Eee PC 901 12 GB

Offline

#4 2010-03-10 03:27:10

tung
Member
From: Sydney, Australia
Registered: 2008-08-22
Posts: 29
Website

Re: How to change HAL mount options in GNOME

I've done some digging in DeviceKit-disks, and I'm about to butcher some terminology, so feel free to correct me.

DeviceKit-disks seems to present itself as a DBus interface, so it accepts DBus messages that correspond to a bunch of functions, one of which is mount.

The 3rd option of the mount function is a list of option strings that are eventually added to the final "mount ..." command.

DeviceKit-disks uses some default options for some file system types. For "vfat", it's hardcoded to include "uid=", "gid=" (both are filled in specially later in the code), "shortname=mixed", "dmask=0077", and the option I want to cancel: "utf8=1".

The full set of mount options is this list of default options, followed by custom options that I suspect are received via the DBus interface.

Finally, a "mount ..." command line is built, which is shuffled off elsewhere in the source, and presumably checks permissions before running it.



Couple of questions:

  1. Is this analysis at all correct?
  2. Who calls DeviceKit-disks to auto-mount an external drive?

I believe that whoever calls DeviceKit-disks holds the key to setting/changing the ultimate mount options.


Running Arch on Eee PC 901 12 GB

Offline

Board footer

Powered by FluxBB