Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The RIGHT way to change HAL policies
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 31 Dec 2004
Posts: 2676
Location: here, there or in transit

PostPosted: Wed Jan 21, 2009 4:46 pm    Post subject: The RIGHT way to change HAL policies Reply with quote

Lately, I've noticed several posts offering advice on how to correct various HAL problems--partition auto-mounting, volume hiding, GNOME VFS weirdness, athlete's foot and so on. Many recommend changes to configuration files in /usr/share/hal/fdi/policy to cure the ills.

Don't do that. These files willl be overwritten by the next update of sys-apps/hal, your changes will be lost, you'll probably have forgotten the repair and you'll be right back here asking how to fix the problem again. You should edit these files only if the correction is recommended by a bug report and you can't wait for the repair to reach Portage.

The right place to make local changes to HAL policies is /etc/hal/fdi/policy. Create *.fdi files here (as root) to receive the changes you would have made in the master configuration. Like other configuration sources, these local settings are applied after the master configuration, so overrides should not be a problem. If in doubt, use numeric prefixes like 95-foo.fdi, 99-blah.fdi and so on, to apply settings in a specific order.

A common complaint from GNOME users is the appearance of a volume icon in the Computer folder for each unmounted hard disk partition. Many people do not want to see these volumes since they are rarely mounted (e.g., /boot). This is caused by settings in /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi and most corrective actions suggest changes to that file.

Instead, create a file in /etc/hal/fdi/policy and paste in the deviceinfo changes desired to suppress those volumes. For example, I have this, to hide my /boot and /usr/portage partitions:
<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
  <!-- Hide from GNOME mounted/mountable partitions on fixed disks
    <match key="volume.fsusage" string="filesystem">
      <match key="volume.fstype" string="ext3">
        <match key="volume.label" string="boot">
          <merge key="volume.ignore" type="bool">true</merge>
        <match key="volume.label" string="portage">
          <merge key="volume.ignore" type="bool">true</merge>
I have volume labels set on all my partitions, so it was simple to identify to HAL the partitions to ignore. In less obvious situations, the lshal command is invaluable to determine suitable UDI keys.

Keep your HAL policy changes in /etc and you'll have one less reason to scratch your head and ask, "why did THAT happen?" after your next upgrade. :)
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message

Joined: 18 Jun 2003
Posts: 41

PostPosted: Sun Feb 08, 2009 8:26 am    Post subject: Reply with quote

Or even rewritten by the xf86-input-synaptics ebuild. I found this after I got bit, but I was just following what the ebuild told me to do
INFO: postinst
Synaptics settings are now stored in:

WARN: postinst
You need to migrate your settings and clear them from xorg.conf

I think the ebuild(s) need to incorporate this proper info
Look behind you...

Think outside the box, give the cat a chance.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum