2

I use the ubuntu and the windows system on my pc, when i open the file manage PCManFM in Lubuntu, the left side show me my windows partition,ie my C: D: partition in windows, but i don't won't it display here, what should i do ?

I have unchecked the Edit->Preferences->Volume Management all three Auto-mount items, but it doesn't work.

PS.I use the PCManFm 0.9.10

Liu Hao
  • 379
  • 1
  • 6
  • 15

1 Answers1

5

You can create an udev rule to hide the partitions.

For Lubuntu 12.04

In this example I have two partition (NTFS).
WIN-NTFS1 and WIN-NTFS2

enter image description here

1) Search information about your partitions.
Open a Terminal and type:

  • sudo blkid

In my case the result is:

/dev/sda1: UUID="c3338905-348b-47c8-bc55-f363bc487410" TYPE="ext4"

/dev/sda3: LABEL="WIN-NTFS1" UUID="1F297ED5220E41AA" TYPE="ntfs"

/dev/sda4: LABEL="WIN-NTFS2" UUID="4CFEB84C16B24904" TYPE="ntfs"

/dev/sda5: UUID="4b1b8aac-4ee7-42ed-8ed6-3ab7443ee607" TYPE="swap"

Write down the device information eg:(sda3), in my case:

/dev/sda3: LABEL="WIN-NTFS1" UUID="1F297ED5220E41AA" TYPE="ntfs"

/dev/sda4: LABEL="WIN-NTFS2" UUID="4CFEB84C16B24904" TYPE="ntfs"

2) Create the udev rule.
In the terminal window type:

  • sudo nano /etc/udev/rules.d/99-hide-ntfs-partitions.rules

Match the "KERNEL" key with you device and assign the "UDISKS" variable.

The content of the 99-hide-ntfs-partitions.rules file would be:

KERNEL=="sda3", ENV{UDISKS_PRESENTATION_HIDE}="1"

KERNEL=="sda4", ENV{UDISKS_PRESENTATION_HIDE}="1"

To save the changes in nano...

Ctrl+O, Enter and Ctrl+X.

3) Finally refresh the udev rules with:

  • sudo udevadm trigger

The result is : enter image description here

For Lubuntu 12.10 & 13.04.

The only difference is the name of the UDISKS variable.
It should be ENV{UDISKS_IGNORE} instead ENV{UDISKS_PRESENTATION_HIDE}

The content of the 99-hide-ntfs-partitions.rules file would be:

KERNEL=="sda3", ENV{UDISKS_IGNORE}="1"

KERNEL=="sda4", ENV{UDISKS_IGNORE}="1"

Hope it helps.

Roman Raguet
  • 9,533
  • 2
  • 41
  • 41
  • why 12.10 different from 12.04? because the version of linux kernel? – Liu Hao Sep 01 '13 at 14:25
  • 1
    I think because ubuntu 12.04 has udisk and 12.10 & 13.04 have udisk2. So the variable changes from ENV{UDISKS_PRESENTATION_HIDE} in udisk. to ENV{UDISKS_IGNORE} in udisk2. – Roman Raguet Sep 01 '13 at 14:34
  • The second solution works in Lubuntu 14.04.1 :). You have to restart the system to have it working though. – rom Dec 18 '14 at 14:32
  • Should also work in 16.04, right? – bomben May 06 '17 at 16:59
  • Works in 16.04. But I have a question. Why are some of my other partitions not displayed at all from the start? I have a Mac recovery partition and a Linux partition that don't come up in pcmanfm. Pcmanfm only showed the Win7 and main Mac partition. – bomben May 06 '17 at 17:16