After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 537112 - improve paste of uris from clipboard
improve paste of uris from clipboard
Status: RESOLVED OBSOLETE
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 562002 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-07 13:34 UTC by Christian Persch
Modified: 2021-06-10 19:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2008-06-07 13:34:14 UTC
On paste-from-clipboard (ctrl-shift-V), we should not just always paste as text, but instead look if the text/uri-list target is present, and if so, paste as quoted fuse paths, just like we do when dnd'ing text/uri-list to the terminal.
Comment 1 Christian Persch 2008-06-07 13:35:03 UTC
Not very useful without bug 314120 making nautilus offer text/uri-list on the clipboard.
Comment 2 Christian Persch 2008-06-08 11:37:06 UTC
Fixed in trunk.
Comment 3 Behdad Esfahbod 2008-06-08 14:10:08 UTC
Umm.  Not sure about the fuse path..   What if I want to paste the URI to wget it?
Comment 4 Christian Persch 2008-06-08 14:15:18 UTC
Hmm. 

If it translates into a fuse path, you can just gvfs-copy it. OTOH, maybe we should make this an extra action, have "Paste as text" and "Paste as paths" ?
Comment 5 Behdad Esfahbod 2008-06-09 19:58:07 UTC
Humm, that would require a bunch of new API, right?  Not sure what the best practice here is.
Comment 6 Christian Persch 2008-06-09 20:13:27 UTC
No new API needed, no. It's just a regular menu entry, all the paste logic is already there in g-t.
Comment 7 Behdad Esfahbod 2008-06-09 20:26:57 UTC
Ah ok then.

So how does ctrl+shift+insert work then?  /me likes that to keep pasting URLs.
Comment 8 Christian Persch 2008-06-09 20:46:18 UTC
C-S-[KP_]Insert is handled directly inside vte, doing paste-as-text.

I guess adding a separate accel-less PasteAsPaths action, shown only if text/uri-list is present on the clipboard, would be the best here?
Comment 9 Behdad Esfahbod 2008-06-09 20:49:32 UTC
Something like that, yeah.  Though, not sure how discoverable/intuitive that would be.  The whole fuse gio stuff is a hack that is supposed to be hidden from users.  But then again, terminal users are not normal users.
Comment 10 Christian Persch 2008-06-15 20:44:54 UTC
Fixed in svn.
Comment 11 Benjamin Otte (Company) 2008-11-23 13:00:04 UTC
I have a problem here.

If I copy a file from nautilus into the terminal, I get a file:///foo/bar url - there is almost no terminal application that accepts URIs (think cat, ls, ...). So the solution to paste URIs by default is wrong for file URIs.

However, for http or ftp URIs I'd want the real URI instead of some gvfs nonsense - again, because almost no terminal app takes gvfs paths, but wants real URIs.

So my solution would be to use the filename for the file:// URI scheme and use the full URI for all other schemes. Does that make sense?
Comment 12 Benjamin Otte (Company) 2008-11-23 13:00:49 UTC
*** Bug 562002 has been marked as a duplicate of this bug. ***
Comment 13 Benjamin Otte (Company) 2008-11-23 13:06:19 UTC
(In reply to comment #11)
> However, for http or ftp URIs I'd want the real URI instead of some gvfs
> nonsense - again, because almost no terminal app takes gvfs paths, but wants
> real URIs.
> 
I should clarify this:
no terminal app takes gvs paths => no terminal app I use for working with http or ftp URIs (like wget, lftp etc)

It might make sense to have a "paste as gvfs path" for treating ftp and http URIs as files though, no idea.
Comment 14 GNOME Infrastructure Team 2021-06-10 19:40:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/6594.