小菜刀 发表于 2004-11-18 01:06:05

fc3下闪存中的中文问题?

以前用fc2时在fstab下配置一上就可以让usb显示中文了,不知在fc3下要如何设置呢?

w1ang 发表于 2004-11-18 03:07:04

/usr/share/hal/fdi/90defaultpolicy/sorage-policy.fdi
而且更智能化了,插上直接就会在桌面显示出来。

小菜刀 发表于 2004-11-18 09:38:14

那要在里面加些什么呢?

小菜刀 发表于 2004-11-19 22:24:53

再顶一下,还没解决啊!

fox_eagle2003 发表于 2004-11-19 22:39:02

:-) 没有用过FC3,顶一下。
你可以把那文件贴出来吗?

小菜刀 发表于 2004-11-19 23:18:56

# cat storage-policy.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

<!-- Default policies merged onto computer root object-->
<device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/comput
er">
      <merge key="storage.policy.default.mount_root" type="string">/m
edia</merge>
      <merge key="storage.policy.default.use_managed_keyword" type="b
ool">true</merge>
      <merge key="storage.policy.default.managed_keyword.primary" typ
e="string">managed</merge>
      <merge key="storage.policy.default.managed_keyword.secondary" t
ype="string">kudzu</merge>
      <merge key="storage.policy.default.mount_option.noauto" type="b
ool">true</merge>
      <merge key="storage.policy.default.mount_option.pamconsole" typ
e="bool">true</merge>
      <merge key="storage.policy.default.mount_option.exec" type="boo
l">true</merge>
    </match>
</device>

<device>
    <!-- Whitelist bus types of storage devices we care about-->
    <match key="info.category" string="storage">
      <match key="storage.bus" string="usb">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
      <match key="storage.bus" string="ide">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
      <match key="storage.bus" string="ieee1394">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
      <match key="storage.bus" string="sata">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
      <match key="storage.bus" string="platform">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
    </match>
    <!-- Also add SCSI optical drives -->
    <match key="storage.bus" string="scsi">
      <match key="storage.drive_type" string="cdrom">
      <merge key="storage.policy.should_mount" type="bool">true</me
rge>
      </match>
    </match>

    <!-- Handle drives with non-partitioned media-->
    <match key="storage.no_partitions_hint" bool="true">
      <!-- optical drives -->
      <match key="storage.drive_type" string="cdrom">
      <merge key="storage.policy.mount_filesystem" type="string">au
to</merge>
      <merge key="storage.policy.desired_mount_point" type="string"
>cdrom</merge>
      <merge key="storage.policy.mount_option.ro" type="bool">true<
/merge>
      <match key="storage.cdrom.cdr" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.cdrw" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.dvdplusr" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.dvdplusrw" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.dvdram" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.dvdr" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="storage.cdrom.dvdrw" bool="true">
          <merge key="storage.policy.desired_mount_point" type="strin
g">cdrecorder</merge>
      </match>
      <match key="/org/freedesktop/Hal/devices/computer:linux.is_se
linux_enabled" bool="true">
          <merge key="storage.policy.mount_option.fscontext=system_u:
object_r:removable_t" type="bool">true</merge>
      </match>
      </match>
      <!-- floppy drives -->
      <match key="storage.drive_type" string="floppy">
      <merge key="storage.policy.mount_filesystem" type="string">au
to</merge>
      <merge key="storage.policy.desired_mount_point" type="string"
>floppy</merge>
      <match key="/org/freedesktop/Hal/devices/computer:linux.is_se
linux_enabled" bool="true">
          <merge key="storage.policy.mount_option.fscontext=system_u:
object_r:removable_t" type="bool">true</merge>
      </match>
      </match>
    </match>

    <!-- Normal volumes; use volume label, uuid or drive_type -->
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
      <!-- skip for drives with the no partitions hint (they are ha
ndled above) -->
      <match key="@block.storage_device:storage.no_partitions_hint"
bool="false">

          <merge key="volume.policy.should_mount" type="bool">true</m
erge>
          <merge key="volume.policy.mount_filesystem" type="copy_prop
erty">volume.fstype</merge>

          <!-- Fallback is '<storage.bus>', appended with 'disk', e.g
. usbdisk,
               idedisk, scsidisk etc. -->
          <merge key="volume.policy.desired_mount_point" type="copy_p
roperty">@block.storage_device:storage.bus</merge>
          <append key="volume.policy.desired_mount_point" type="strin
g">disk</append>

          <!-- Best: If available use filesystem label -->
          <match key="volume.label" empty="false">
            <!-- unless it's a path (e.g. /boot, /, /home etc) -->
            <match key="volume.label" is_absolute_path="false">
            <!-- and only if the label is ascii -->
            <match key="volume.label" is_ascii="true">
                <merge key="volume.policy.desired_mount_point" type="
copy_property">volume.label</merge>
            </match>
            </match>
          </match>

          <!-- Should never mount Apple Bootstrap partitions (it woul
d be
               a security hole) - should use the bootable flag from t
he
               Mac partition table instead -->
          <match key="volume.fstype" string="hfs">
            <match key="volume.label" string="bootstrap">
            <merge key="volume.policy.should_mount" type="bool">fal
se</merge>
            </match>
          </match>

          <!-- Use selinux mount options for hotpluggable and removab
le
               volumes -->
          <match key="/org/freedesktop/Hal/devices/computer:linux.is_
selinux_enabled" bool="true">
            <match key="@block.storage_device:storage.hotpluggable" b
ool="true">
            <merge key="volume.policy.mount_option.fscontext=system
_u:object_r:removable_t" type="bool">true</merge>
            </match>
            <match key="@block.storage_device:storage.removable" bool
="true">
            <merge key="volume.policy.mount_option.fscontext=system
_u:object_r:removable_t" type="bool">true</merge>
            </match>
          </match>

          <!-- Use noatime and sync options for all hotpluggable or r
emovable
               volumes smaller than 2GB -->
          <match key="volume.size" compare_lt="2147483648">
            <match key="@block.storage_device:storage.hotpluggable" b
ool="true">
            <merge key="volume.policy.mount_option.sync" type="bool
">true</merge>
            <merge key="volume.policy.mount_option.noatime" type="b
ool">true</merge>
            </match>
            <match key="@block.storage_device:storage.removable" bool
="true">
            <merge key="volume.policy.mount_option.sync" type="bool
">true</merge>
            <merge key="volume.policy.mount_option.noatime" type="b
ool">true</merge>
            </match>
          </match>

          <!-- whitelist of partition table id's, if from a msdos par
tition table -->
          <match key="volume.partition.msdos_part_table_type" exists=
"true">
            <!-- Default to no mount and punch holes -->
            <merge key="volume.policy.should_mount" type="bool">false
</merge>
            <!-- Linux -->
            <match key="volume.partition.msdos_part_table_type" int="
0x83">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- FAT12 -->
            <match key="volume.partition.msdos_part_table_type" int="
0x01">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- FAT16 <32M -->
            <match key="volume.partition.msdos_part_table_type" int="
0x04">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- FAT16 -->
            <match key="volume.partition.msdos_part_table_type" int="
0x06">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- HPFS/NTFS -->
            <match key="volume.partition.msdos_part_table_type" int="
0x07">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- W95 FAT32 -->
            <match key="volume.partition.msdos_part_table_type" int="
0x0b">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- W95 FAT32 (LBA) -->
            <match key="volume.partition.msdos_part_table_type" int="
0x0c">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
            <!-- W95 FAT16 (LBA) -->
            <match key="volume.partition.msdos_part_table_type" int="
0x0e">
            <merge key="volume.policy.should_mount" type="bool">tru
e</merge>
            </match>
          </match>
      </match>
      </match>
    </match>

</device>

<!-- Dont want to mount non-hotpluggable fixed disks since ideraid
       detection isnt complete as hald wrongly detects e.g. partitions
       from some IDE RAID controllers -->
<device>
    <match key="storage.hotpluggable" bool="false">
      <match key="storage.removable" bool="false">
      <merge key="storage.policy.should_mount" type="bool">false</merge>
      </match>
    </match>
</device>

</deviceinfo>
#

小菜刀 发表于 2004-11-19 23:22:39

有位朋友说要这样加,但问题还在啊!
找到这一行:
<merge key="storage.policy.default.mount_option.exec" type="bool">true</merge>
在其下添加一行
<merge key="storage.policy.default.mount_option.iocharset=utf8" type="bool">true</merge>
是新增加一行。
页: [1]
查看完整版本: fc3下闪存中的中文问题?