Solved XFCE and hide drive's icons on Desktop

Hi.
I have two disks attached to my computer. One with linux, the other with FreeBSD. I have XFCE installed on FreeBSD. XFCE on the Desktop
displays partitions from the linux drive (marked in a black rectangle). I wanted to hide them ... Yes, we can hide all devices and disks as in the operewar window next to it, but after the use of this option, the usbkey disks are also removed. I do not want to use this solution. I want to see usb drives, plugged into a computer, and hide linux drives icons...
Is it possible to hide these partitions in a different way? With HAL if possible?



I use HAL and DBUS starting with the system..
Code:
hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"

Once, to hide the swap, I used the following entry for HAL

Code:
# HIDE ICONS ON DESKTOP XFCE
# / Usr / local / share / hal / fdi / preprobe / 20thirdparty / 10-ignore-swap.fdi
<? xml version = "1.0" encoding = "UTF-8"?>
<deviceinfo version = "0.2">
   <Device>
     <match key = "block.device" string = "/ dev / ada0p2">
       <merge key = "info.ignore" type = "bool"> true </ merge>
     </ Match>
   </ Device>
</ DeviceInfo>


In the past, on linux, I hide partitions in the following way, using UDEV ...

/etc/udev/rules.d/10-local.rules
Code:
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"
KERNEL=="sda3", ENV{UDISKS_IGNORE}="1"
 
I solved my problem

based on the old topic https://forums.freebsd.org/threads/no_name-devices-in-xfce4.49072/

I created 3 files:

/usr/local/etc/hal/fdi/policy/10-ignore-ada0s1.fdi

Code:
<?xml version="1.0" encoding="utf-8"?>
<deviceinfo version="0.2">
  <device>
     <match key = "block.device" string = "/dev/ada0s1">
            <merge key="volume.ignore" type="bool">true</merge>
     </match>
  </device>
</deviceinfo>

and file /usr/local/etc/hal/fdi/policy/10-ignore-ada0s2.fdi with string = "/dev/ada0s2"
and file /usr/local/etc/hal/fdi/policy/10-ignore-ada0s3.fdi with string = "/dev/ada0s3"

When I have more time I will try syntax linking 3 files
to be developed in only one fdi file for all devices in bulk
 
Hi!
I'm using FreeBSD 13.2 and I can see also a /dev/sda0s1 partition listed in XFCE4 Thunar that is unacessible.
I don't have hald enabled, it is used for automounting volumes? Is it needed in 13.2?
 
Back
Top