[SOLVED] Hide devices in Nemo?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
memilanuk

[SOLVED] Hide devices in Nemo?

Post by memilanuk »

Hello,

I'm test-driving Mint 14 Cinnamon on a new ThinkPad T530 (multi-booting with Win 7 Pro & openSuSE 12.2). So far... I'm liking Cinnamon a lot! :wink:

One thing that I was thinking should be possible, but I haven't been able to figure out 'how' yet (including searches here and on the world wild Web) is how to hide file system 'devices' in Nemo.

As an example... with this multi-boot system, Nemo lists 'SYSTEM_DRV', 'Windows7_OS', 'Lenovo_Recovery' (all Windows 7 related), '21GB Volume' (SuSE /) and '221GB Volume (SuSE /home). About the only thing it *doesn't* list is the filesystem root dir and the swap partition!

I'd like to be able to hide most or all of these devices, either from just myself (I would *hate* to accidentally click the wrong partition/device and eject or format something I really shouldn't), or from other users on the machine. Granted, they would need the admin password (mine) to be able to mount the devices and do anything bad, but I think it'd reduce the clutter and confusion if I could just make the devices not show up in Nemo to begin with...

Any suggestions?

TIA,

Monte
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11433
Joined: Tue Feb 03, 2009 10:27 am

Re: Hide devices in Nemo?

Post by altair4 »

Oddly enough the easiest way to do this is to add an entry into /etc/fstab. Let's take 'Lenovo_Recovery' as an example since it appears to be a partition ( volume ) label.

This is just an example:

Create a mount point:

Code: Select all

sudo mkdir /mnt/LenRec
Add a line to fstab:

Code: Select all

LABEL=Lenovo_Recovery /mnt/LenRec auto defaults,noauto 0 0
Then issue the following command to force the new fstab instructions:

Code: Select all

sudo mount -a
It should remove the listing from your file manager.

Some of your other partitions do not appear to have labels so you will need to use the UUID instead. So for the SuSE partition it might look something like this:

Code: Select all

UUID=81c8f13a-6d65-46a8-a2c6-1542086576de /mnt/suse auto defaults,noauto 0 0 
The first "auto" is where Linux tries to guess the filesystem of the partition in question. The "noauto" tells the system not to mount the partition at boot.

You can run the following command to find the exact labels and UUID's for all your partitions:

Code: Select all

sudo blkid -c /dev/null
Just make sure you don't do a noauto on your own Mint OS partition :)
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
memilanuk

Re: Hide devices in Nemo?

Post by memilanuk »

Okay, looks like that should work... though I'm not exactly wild about creating mount points and adding entries to /etc/fstab for every filesystem partition or volume that I *don't* want to use. I had hoped that there might be an option similar to what dolphin (KDE4) has - to 'unpin' a listing from being displayed. That would most likely only be viable on a user-by-user basis, so /etc/fstab is probably a better system-wide solution.

Thanks,

Monte
Cyberpunk

Re: Hide devices in Nemo?

Post by Cyberpunk »

memilanuk wrote:Okay, looks like that should work... though I'm not exactly wild about creating mount points and adding entries to /etc/fstab for every filesystem partition or volume that I *don't* want to use. I had hoped that there might be an option similar to what dolphin (KDE4) has - to 'unpin' a listing from being displayed. That would most likely only be viable on a user-by-user basis, so /etc/fstab is probably a better system-wide solution.

Thanks,

Monte
Hi Monte!

Seems that there is not way to hide non-mounted drives on side-panel. Look at the excerpt from Nemo v. 3.0.6 source code (nemo-places-sidebar.c file under src subfolder):

Code: Select all

...
mount = g_volume_get_mount (volume);
if (mount != NULL) {
    /* Show mounted volume in the sidebar */
    ...   
} else {
    /* Do show the unmounted volumes in the sidebar;
     * this is so the user can mount it (in case automounting
     * is off).
     *
     * Also, even if automounting is enabled, this gives a visual
     * cue that the user should remember to yank out the media if
     * he just unmounted it.
     */
    icon = g_volume_get_icon (volume);
    name = g_volume_get_name (volume);
    tooltip = g_strdup_printf (_("Mount and open %s (%s)"), name,
                               g_volume_get_identifier (volume,
                                                        G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE));
    cat_iter = add_place (sidebar, PLACES_MOUNTED_VOLUME,
                           SECTION_DEVICES,
                           name, icon, NULL,
                           drive, volume, NULL, 0, tooltip, 0, FALSE,
                           cat_iter);
    g_object_unref (icon);
    g_free (name);
    g_free (tooltip);
}
...
There are not any properties/settings involved there. So each device (whatever mounted or unmounted) has to be displayed on sidebar.
cronfy

Re: [SOLVED] Hide devices in Nemo?

Post by cronfy »

Looks like it is possible without manual editing of /etc/fstab. Solution is described here: http://askubuntu.com/questions/124094/h ... rom-ubuntu

Briefly, go to Disks, select partition you want to hide, press "gears" icon, select "Edit mount options". Then disable automatic mount options and disable "Mount at startup" and "Show in user interface".
Locked

Return to “Software & Applications”