This blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://scrolls.mafgani.net/ and update your bookmarks.

Tuesday, August 23, 2005

NTFS/FAT32 Volume Labels on GNOME computer://

By default, GNOME labels the drives by their sizes. The following *fdi scipt for HAL makes is possible to automount the volumes discovered at boot-time. The volumes are mounted and labeled according to their Volume Label under /media. So, here it is:

---------------------------------------------------------------------------------------------
[darkknight@darkworld ~]$ cat storage-fixed.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
<device>
<match key="volume.partition.msdos_part_table_type" int="0x07">
<merge key="volume.policy.should_mount" type="bool">true</merge>
<merge key="volume.policy.mount_option.pamconsole" type="bool">true</merge>
<merge key="volume.policy.mount_option.noauto" type="bool">false</merge>
<merge key="volume.policy.mount_option.exec" type="bool">false</merge>
<merge key="volume.policy.mount_option.umask=022" type="bool">true</merge>
<merge key="volume.policy.mount_option.ro" type="bool">true</merge>
</match>
</device>

<device>
<match key="volume.partition.msdos_part_table_type" int="0x0b">
<merge key="volume.policy.should_mount" type="bool">true</merge>
<merge key="volume.policy.mount_option.pamconsole" type="bool">true</merge>
<merge key="volume.policy.mount_option.noauto" type="bool">false</merge>
<merge key="volume.policy.mount_option.exec" type="bool">true</merge>
<merge key="volume.policy.mount_option.umask=000" type="bool">true</merge>
<merge key="volume.policy.mount_option.rw" type="bool">true</merge>
</match>
</device>

<device>
<match key="storage.hotpluggable" bool="false">
<match key="storage.removable" bool="false">
<merge key="storage.policy.should_mount" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>
[darkknight@darkworld ~]$
---------------------------------------------------------------------------------------------

The file should be placed under /usr/share/hal/fdi/policy/10osvendor/

I know for sure that the NTFS part works, and someone with FAT32 volumes told me that FAT32 automount works as well.

It is also available from here.

0 Comments:

Post a Comment

<< Home