I am building a custom MATE desktop with ansible, and am having trouble removing both the "Network" and the "Connect to Server..." items from the Places menu. I tried editing the associated ".desktop" files (setting NoDisplay=true) but that did not have an effect. Is there another config file somewhere I can use to remove these items?
Welcome to Ubuntu MATE community, @mfamuser .
If I understand things correctly, then both Network and Connect to Server are hardcoded. See
places_menu,
G_CALLBACK (activate_uri),
"computer://");
if (gsettings_name)
g_free (gsettings_name);
panel_place_menu_item_append_local_gio (place_item, places_menu);
add_menu_separator (places_menu);
panel_menu_items_append_place_item (
PANEL_ICON_NETWORK, NULL,
_("Network"),
_("Browse bookmarked and local network locations"),
places_menu,
G_CALLBACK (activate_uri),
"network://");
panel_place_menu_item_append_remote_gio (place_item, places_menu);
if (panel_is_program_in_path ("caja-connect-server") ||
panel_is_program_in_path ("nautilus-connect-server") ||
panel_menu_items_append_place_item (
PANEL_ICON_NETWORK, NULL,
_("Network"),
_("Browse bookmarked and local network locations"),
places_menu,
G_CALLBACK (activate_uri),
"network://");
panel_place_menu_item_append_remote_gio (place_item, places_menu);
if (panel_is_program_in_path ("caja-connect-server") ||
panel_is_program_in_path ("nautilus-connect-server") ||
panel_is_program_in_path ("nemo-connect-server")) {
item = panel_menu_items_create_action_item (PANEL_ACTION_CONNECT_SERVER);
if (item != NULL)
gtk_menu_shell_append (GTK_MENU_SHELL (places_menu),
item);
}
add_menu_separator (places_menu);
As a workaround you can hide the whole Places menu by
gsettings set org.mate.panel.menubar show-places false
To get a hope that this will be fixed in future I prepared feature request:
You may want to subscribe on it.
Thank you so much for the info! I will keep my eye on the feature request.