Gnome `Show in user intrface` mount option

In Gnome Disks’s Mount Options dialog, there’s a checkbox for Show in user interface that determines whether a mount appears in the left-hand panel in Nautilus.

I’m having trouble finding the declarative, nix syntax for setting this option to the equivalent of unchecked in the GUI interface.

Would anyone have any insight on this?

Thanks so much!

Not fully certain, but searching for x-gvfs-show seems to be relevant. Hope it helps

Thanks so much. It actually seems like hiding is the default if the device is mounted to /mnt. That works well for the present need, and I’ll make a note to look into x-gvfs-show further if/when this comes back up when mounting elsewhere. Appreciate the suggestion!

If your using udisks2 as a backend to GVFS you may wish to review: What is shown.

In any case you can use udev rules to set the appropriate environment variable(s) to achieve the desired UI effect (visible, icons, etc.).

For example, I run a more esoteric setup (Full disk encryption, but the encryption is for the entire disk, i.e. partition table sits behind the encryption, so it must be decrypted first and the partitions then read/mounted). This setup fails the default heuristics used by GVFS/Udisks2 so I correct these with udev rules:

      services.udev.extraRules = ''
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="436ddaf7-36c5-49db-86a8-bb3a37b916a8", ENV{ID_FS_UUID_SUB}=="1156f229-4589-4148-b649-2fb49f88fa53", ENV{UDISKS_SYSTEM}="1", ENV{UDISKS_FILESYSTEM_SHARED}="1", ENV{UDISKS_ICON_NAME}="drive-harddisk", ENV{UDISKS_SYMBOLIC_ICON_NAME}="drive-harddisk-symbolic"
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="95844dc5-a73a-4c0a-9de8-f4edaecc7ef3", ENV{ID_FS_UUID_SUB}=="583df364-eeb9-4569-8ebd-24df826d327e", ENV{UDISKS_SYSTEM}="1", ENV{UDISKS_FILESYSTEM_SHARED}="1", ENV{UDISKS_ICON_NAME}="drive-harddisk", ENV{UDISKS_SYMBOLIC_ICON_NAME}="drive-harddisk-symbolic"
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="c77c19d0-5f02-43bc-80af-3fe01e8d4d87", ENV{ID_FS_UUID_SUB}=="4a52e4d9-2549-4d44-9b2b-361b5d3f9cb7", ENV{UDISKS_SYSTEM}="1", ENV{UDISKS_FILESYSTEM_SHARED}="1", ENV{UDISKS_ICON_NAME}="drive-harddisk", ENV{UDISKS_SYMBOLIC_ICON_NAME}="drive-harddisk-symbolic"
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="436ddaf7-36c5-49db-86a8-bb3a37b916a8", ENV{ID_FS_UUID_SUB}=="4e6d974f-30ac-4d7d-b52c-2db6c7287dec", ENV{UDISKS_IGNORE}="1"
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="95844dc5-a73a-4c0a-9de8-f4edaecc7ef3", ENV{ID_FS_UUID_SUB}=="9bed7e96-0512-4257-ae15-913d705adab2", ENV{UDISKS_IGNORE}="1"
         SUBSYSTEM=="block", ENV{ID_FS_UUID}=="c77c19d0-5f02-43bc-80af-3fe01e8d4d87", ENV{ID_FS_UUID_SUB}=="9d4689f1-45e5-423e-affa-5a09f95aba9d", ENV{UDISKS_IGNORE}="1"
'';

This setup fails the default heuristics used by GVFS/Udisks2

I’m working with a fully encrypted volume also, so I suppose it makes sense why I was having trouble. I found some references to this kind of process you mention with the udev rules but nothing so direct and helpful. Thanks so much!