I have an external HDD that I use also with Windows which create “$RECYCLE.BIN” and “System Volume Information” folders everytime it mounted NTFS partition. How can we hide that folders on dolphin. I’m using device manager applet to auto mount the external HDD.
See “man ntfs-3g”:
**hide_hid_files ** Hide the hidden files and directories in directory listings, the hidden files and directories being the ones whose NTFS attribute have the hidden flag set. The hidden files will not be selected when using wildcards in commands, but all files and directories remain accessible by full name, for example you can always dis- play the Windows trash bin directory by : "ls -ld '$RECY- CLE.BIN'".
To add that mount option for automounting, you would have to create an entry in /etc/fstab though I guess.
AFAIK there’s no way to add custom mount options to KDE’s udisks2 backend.
A line like this in /etc/fstab should do:
/dev/sdb1 /windows/C ntfs-3g users,hide_hid_files,nofail 0 0
The drive should get mounted at boot then. If you don’t want that, add “noauto” to the options:
/dev/sdb1 /windows/C ntfs-3g users,noauto,hide_hid_files,nofail 0 0
Some more notes:
You need to exchange /dev/sdb1 with the actual device name of the partition, and you have to create the mount point ("/windows/C") manually.
You can also use YaST->System->Partitioner to create the entry in the fstab, this will create the mount point automatically.
The “nofail” is important, otherwise your system won’t boot when the external hard disk is not connected/powered on. It should not be necessary when specifying “noauto”, but it should not harm either.
In case of an external hard disk it would maybe be better to mount by id or label instead of by device.
YaST should do that by default anyway, if you want to edit fstab manually have a look at /dev/disk/by-id or /dev/disk/by-label and use that path instead of /dev/sdb1…
> I have an external HDD that I use also with Windows which create
> “$RECYCLE.BIN” and “System Volume Information” folders everytime it
> mounted NTFS partition. How can we hide that folders on dolphin. I’m
> using device manager applet to auto mount the external HDD.
Did you already try this ?
openSUSE 13.1 (Bottle) (x86_64) 64-bit
Kernel Linux 3.11.6-4-desktop
Before I auto mount external drive with /etc/fstab do I need to do something with this settings?
This only works with GNOME’s nautilus, not dolphin AFAIK.
I did that with Ubuntu and it worked with nautilus but it is not working with dolphin.
No, that should continue to work as before I think.
Btw, you can find out the “best” line for fstab by mounting the drive as before, and then calling “mount” in Konsole. Please post the output.
This should show the current mount options.
Right, that’s a nautilus-only feature AFAIK.
There is a feature request that KDE should respect this file as well here:
But nothing has happened there for the last 3 years…
I just did as you told and it worked
I’m using this line on fstab (use label because it is more readable)
LABEL="Backup" /touro/backup ntfs-3g users,hide_hid_files,nofail 0 0
I unmounted the partition and then
No error, partition auto mounted as it should and no more those folders.
Since you’re configured KDE to do auto-mounting anyway, you should try to add the “noauto” option as well I think.
Otherwise it could slow down your boot when the drive is not connected, because the system tries to mount it and doesn’t find it.
I added that option and i will report how it goes later after reboot.
Alright, eventually it is necessary not to include **noauto **option on /etc/fstab. Windows hidden folders are still shown if we let udisks2 to handle drive partitions mounting, thus not using option stated on fstab.
Thanks again wolfie for your help.
Well, I have an entry for my floppy drive (with noauto) in /etc/fstab, and udisks2 does respect the mount options from there.
That’s why I suggested to try that.
But apparently it behaves differently for a hard disk, sorry. (or maybe it respects only some options but filters out others)
It’s a little strange actually. When noauto is used, the partition is mounted just like before I added entry to /etc/fstab. The partition even doesn’t use mount point stated on /etc/fstab, so it looks like udisks2 unmounted and remounted the partition?
No it doesn’t do that AFAIK. Apparently it just mounts it without respecting the fstab entry. But this is not the case with a floppy entry as I said, that works well even with “noauto”.
The older udisks1 did automatically unmount a “noauto” entry, so you weren’t even able to mount it manually with “mount” back then…
But that shouldn’t be installed by default anymore on a KDE4 installation.
You could check if udisks1’s “udisks-daemon” (not “udisksd”, this is from udisks2) is running and interfering, but I guess you could not access your hard disk at all in that case.
TBH, I’m not really sure what happens here and I have no external hard disk handy to investigate.
Hm. I now changed the fstab entry of an nfts partition on my internal hard disk to:
/dev/disk/by-id/ata-WDC_WD1200BB-00DWA0_WD-WMAEK3466189-part5 /windows/D ntfs-3g users,hide_hid_files,noauto 0 0
After a reboot the disk is not mounted as expected, it gets mounted when I click on it in the device notifier or dolphin (with udisks2 of course).
But the hide_hid_files option works fine even in this case:
wolfi@linux-lf90:~/Desktop> ls -la /windows/D insgesamt 140 drwxrwxrwx 1 root root 4096 8. Feb 00:49 . drwxr-xr-x 1 root root 4 27. Dez 08:32 .. drwxrwxrwx 1 root root 4096 23. Dez 04:10 Dokumente und Einstellungen drwxrwxrwx 1 root root 8192 11. Jän 12:47 Programme drwxrwxrwx 1 root root 126976 19. Jän 11:18 WINDOWS wolfi@linux-lf90:~/Desktop>
Whereas without that option in fstab it was like this:
wolfi@linux-lf90:~/Desktop> ls -la /windows/D insgesamt 2095248 drwxr-xr-x 1 root users 4096 8. Feb 00:49 . drwxr-xr-x 1 root root 4 27. Dez 08:32 .. drwxr-xr-x 1 root users 4096 23. Dez 04:10 Dokumente und Einstellungen -rw-r--r-- 1 root users 2145386496 8. Feb 15:28 pagefile.sys drwxr-xr-x 1 root users 8192 11. Jän 12:47 Programme drwxr-xr-x 1 root users 0 21. Dez 04:19 RECYCLER drwxr-xr-x 1 root users 4096 20. Dez 23:59 System Volume Information drwxr-xr-x 1 root users 126976 19. Jän 11:18 WINDOWS wolfi@linux-lf90:~/Desktop>
So udisks2 obviously DOES respect the fstab entry, also regarding the mount point.
I have no idea why it didn’t work for you. Maybe try to use “/dev/disk/by-label/xxx” instead of “LABEL=xxx”? Not sure if that makes a difference, but maybe udisks2 cannot associate the fstab entry to your partition in your case.
Btw, “mount” does not show the “hide_hid_files” option, as it is only internal to ntfs-3g. So you should not check with that whether it’s working or not.
Your guess is right! It works if I use “/dev/disk/by-label” instead of “LABEL=”.
It’s ideal now I think. I can have those Windows folder hidden and the NTFS partition is mounted by udisks2 instead of automounted by system which can be a problem if the external drive is unplugged during boot.
On 2014-02-16 12:16, airilsra wrote:
> It’s ideal now I think. I can have those Windows folder hidden and the
> NTFS partition is mounted by udisks2 instead of automounted by system
> which can be a problem if the external drive is unplugged during boot.
Not a problem if you use “nofail”.
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” (Minas Tirith))
I should have spent time to read the manual.
Now, i know. Thanks Carlos!