[SOLVED] Hide devices in Nemo?

Questions about applications and software
Forum rules
Before you post please read how to get help
memilanuk
Level 1
Level 1
Posts: 29
Joined: Sat Dec 04, 2010 5:27 pm

[SOLVED] Hide devices in Nemo?

Postby memilanuk » Sun Dec 09, 2012 3:44 pm

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 memilanuk on Sun Dec 09, 2012 6:15 pm, edited 1 time in total.

altair4
Level 17
Level 17
Posts: 7900
Joined: Tue Feb 03, 2009 10:27 am

Re: Hide devices in Nemo?

Postby altair4 » Sun Dec 09, 2012 4:07 pm

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
Level 1
Level 1
Posts: 29
Joined: Sat Dec 04, 2010 5:27 pm

Re: Hide devices in Nemo?

Postby memilanuk » Sun Dec 09, 2012 5:58 pm

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

User avatar
Cyberpunk
Level 1
Level 1
Posts: 1
Joined: Tue Jul 26, 2016 6:16 am

Re: Hide devices in Nemo?

Postby Cyberpunk » Tue Jul 26, 2016 6:55 am

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.


Return to “Software & Applications”

Who is online

Users browsing this forum: InkKnife, Yahoo [Bot] and 8 guests