1 |
For many weeks I've been looking for a way to add the 'noatime' |
2 |
and 'nodiratime' flags for drives that are automounted in gnome. |
3 |
|
4 |
Sifting through the mountains of <mis>information about how hal, |
5 |
hotplug, udev, and gnome interact was painful, but I finally |
6 |
stumbled across a working method on the LinuxFromScratch website. |
7 |
|
8 |
In the good-ole days (several months ago) the way to do it would |
9 |
have been to put a customized fdi file in /etc/hal/fdi/policy/. |
10 |
|
11 |
More recently hal has pushed that task up to the 'desktop' layer, |
12 |
e.g. gnome, kde, kfce, etc. I suppose that's because such a |
13 |
preference should be left up to the user instead of the sysadmin, |
14 |
but I can only speculate about what motivates the hal daemon. |
15 |
|
16 |
In gnome, the way to do it is to use the gconf editor (open the |
17 |
'Configuration Editor' in the Applications::System-Tools drop- |
18 |
down menu). |
19 |
|
20 |
Below the root entry, you'll see 'apps', 'desktop', 'schemas', |
21 |
and 'system'. Expand 'system' and then 'storage' below that, |
22 |
and finally 'default_options' below that. |
23 |
|
24 |
You should see a list of filesystem types, like iso9660, ntfs, |
25 |
and so on. Each filesystem type has a 'mount_options' key that |
26 |
you can edit by double-clicking on it. |
27 |
|
28 |
Thus, each filesystem type has its own custom mount options -- |
29 |
but what happened to ext2? I've reformatted some of my USB |
30 |
sticks from vfat to ext2, and I'd like to customized the mount |
31 |
options for them too. |
32 |
|
33 |
LinuxFromScratch to the rescue! They point out that the gconf |
34 |
editor can't edit everything that appears in the gnome 'registry' |
35 |
but there is a command-line tool 'gconftool-2' that can. |
36 |
|
37 |
The way to customize the default mount options for ext2 drives |
38 |
is to do this from a command prompt: |
39 |
|
40 |
gconftool-2 --type list --list-type=string \ |
41 |
--set /system/storage/default_options/ext2/mount_options \ |
42 |
"[noatime,nodiratime]" |
43 |
|
44 |
See how simple and intuitive once you have an example staring |
45 |
you in the face? Dunno why I didn't just try that in the first |
46 |
place :o/ |
47 |
|
48 |
Lest you kde fans sneer at us gnome gnerds, see if you can do |
49 |
the same thing using the tools that kde provides you! |
50 |
|
51 |
Does kde allow you to automount USB sticks and external hard |
52 |
drives? And customize the mount options? |