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 793519 - Terminal > Save Contents feature always wants to save to ~/Desktop
Terminal > Save Contents feature always wants to save to ~/Desktop
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
3.27.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-16 19:04 UTC by Jeremy Bicha
Modified: 2018-02-16 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Save to home dir (677 bytes, patch)
2018-02-16 20:30 UTC, Egmont Koblinger
none Details | Review
Save to Documents dir (759 bytes, patch)
2018-02-16 20:58 UTC, Egmont Koblinger
committed Details | Review

Description Jeremy Bicha 2018-02-16 19:04:56 UTC
gnome-terminal 3.27.90
vte 0.51.90
Ubuntu 18.04 Alpha

I tried out the latest gnome-terminal development release. It has a File > Save Contents menu option I don't see in the 3.26 version. When I click it, it opens a file browser pointed at my ~/Desktop folder every time.

While some people store temporary files there, GNOME itself disables the desktop by default since GNOME 3. It's a very unusual choice. Instead, I would expect it show the last directory used for saving contents or documents, or fall back to just my home directory.
Comment 1 Egmont Koblinger 2018-02-16 20:21:27 UTC
> Save Contents menu option I don't see in the 3.26 version.

It's only enabled in unstable versions:

#if 1
/*
* We don't want to enable content saving until vte supports it async.
* So we disable this code for stable versions.
*/
#include "terminal-version.h"

#if (TERMINAL_MINOR_VERSION & 1) != 0
#define ENABLE_SAVE
#else
#undef ENABLE_SAVE
#endif
#endif

> While some people store temporary files there, GNOME itself disables the
> desktop by default since GNOME 3. It's a very unusual choice.

There's an internal todo about it:

  /* XXX where should we save to? */
  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP));

I, for one, have an empty ~/Desktop. I agree that it's not a good choice, the user's home would probably be a better one (assuming that we're lazy and don't want to keep track of the last directory :)).
Comment 2 Egmont Koblinger 2018-02-16 20:30:37 UTC
Created attachment 368445 [details] [review]
Save to home dir

There's another use of
  g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)
somewhere in the nautilus plugin, which I have pretty much no clue about. We'd need to double check that too.
Comment 3 Christian Persch 2018-02-16 20:38:43 UTC
Comment on attachment 368445 [details] [review]
Save to home dir

Why not default to the DOWNLOADS or DOCUMENTS folder instead? IMHO more useful.
Comment 4 Egmont Koblinger 2018-02-16 20:44:17 UTC
Downloads is weird to me, it's not something you download. Documents sounds good to me.
Comment 5 Egmont Koblinger 2018-02-16 20:58:07 UTC
Created attachment 368446 [details] [review]
Save to Documents dir
Comment 6 Egmont Koblinger 2018-02-16 21:12:14 UTC
Jeremy, are you okay with ~/Documents ?
Comment 7 Jeremy Bicha 2018-02-16 21:19:49 UTC
(In reply to Egmont Koblinger from comment #6)
> Jeremy, are you okay with ~/Documents ?

Yes. I vaguely suggested that in my original post here. :)
Comment 8 Egmont Koblinger 2018-02-16 21:37:47 UTC
Submitted. I'm inclined to close this bug,

> show the last directory used for saving contents or documents

leaving this bit as wontfix (at least as long as this feature is dev-only).
Comment 9 Jeremy Bicha 2018-02-16 21:58:21 UTC
No problem. Here, I'll close it for you. :)