GNOME Bugzilla – Bug 771276
"Open in Terminal" duplicated in nautilus right click menu
Last modified: 2017-10-31 09:38:09 UTC
Created attachment 335341 [details] screenshot Hi, in nautilus the context menu contains two entries for "Open in Terminal" for webdav folder (see the attachment). Both entries work fine. "Normal" folders don't have this problem. Versions: nautilus-3.20.2-1.fc24.x86_64 gnome-terminal-3.20.2-2.fc24.x86_64
The duplicate "open in terminal" entry used to be due to both gnome-terminal-nautilus and nautilus-open-terminal being installed. Since gnome-terminal-nautilus is the one users are meant to use, we tweaking the Fedora package to obsolete nautilus-open-terminal. I wonder if that didn't work for some reason? Or is this something else?
(In reply to Debarshi Ray from comment #1) > we tweaking the Fedora package *tweaked
(In reply to Debarshi Ray from comment #1) > The duplicate "open in terminal" entry used to be due to both > gnome-terminal-nautilus and nautilus-open-terminal being installed. Since > gnome-terminal-nautilus is the one users are meant to use, we tweaking the > Fedora package to obsolete nautilus-open-terminal. I wonder if that didn't > work for some reason? Or is this something else? Rishi, I think it is something different since only the webdav folder is affected (and I don't have nautilus-open-terminal installed)
(In reply to Pavel Grunt from comment #3) > (In reply to Debarshi Ray from comment #1) > > The duplicate "open in terminal" entry used to be due to both > > gnome-terminal-nautilus and nautilus-open-terminal being installed. Since > > gnome-terminal-nautilus is the one users are meant to use, we tweaking the > > Fedora package to obsolete nautilus-open-terminal. I wonder if that didn't > > work for some reason? Or is this something else? > > Rishi, I think it is something different since only the webdav folder is > affected (and I don't have nautilus-open-terminal installed) You are right. I can reproduce it too.
*** Bug 775572 has been marked as a duplicate of this bug. ***
I saw a bug report about this on Debian, https://bugs.debian.org/765369#15. The "Open in Terminal" option also shows up twice for SMB shares. I think that this has always been a problem in gnome-terminal's nautilus plugin, but old versions of nautilus and GTK would reject duplicate menu entries with a "Refusing to add non-unique action" warning. It comes from this section of terminal_nautilus_get_background_items in terminal-nautilus.c: if (terminal_file_info == FILE_INFO_SFTP || terminal_file_info == FILE_INFO_DESKTOP || uri_has_local_path (uri)) { /* local locations or SSH */ item = terminal_nautilus_menu_item_new (nautilus, file_info, terminal_file_info, gtk_widget_get_screen (window), FALSE, terminal_file_info == FILE_INFO_SFTP, FALSE); items = g_list_append (items, item); } if ((terminal_file_info == FILE_INFO_SFTP || terminal_file_info == FILE_INFO_OTHER) && uri_has_local_path (uri)) { /* remote locations that offer local back-mapping */ item = terminal_nautilus_menu_item_new (nautilus, file_info, terminal_file_info, gtk_widget_get_screen (window), FALSE, FALSE, FALSE); items = g_list_append (items, item); } FILE_INFO_OTHER files, as long as they have a local path, will have two menus created.
Created attachment 356154 [details] [review] fix-duplicated-open-menus.patch This is my attempt to fix this. This modifies the two menu_item_new statements so that the first statement only applies to SSH URIs and the second applies to all local and locally-mappable URIs. This fixes the duplicate menu entries in google-drive and smb shares for me without regressions for ssh or local files, though I couldn't find any FILE_INFO_DESKTOP URIs to test with.
No more duplicate 'open in terminal' with usb sticks or network mounts with this patch. Thank you!
Perhaps someone can take a look at the patch. I've been using it till today with no visible regressions.