Opened 4 years ago

Last modified 2 years ago

#14393 new defect

Users may be confused by relocated directories

Reported by: mikeperry Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-usability
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The fact that we set $HOME to the Tor Browser folder for most platforms may be confusing to users. The download and open dialogs default to weird locations for the user's Documents, Desktop, home, and Download folders. I wonder if we can fix this without letting Tor Browser otherwise leak outside its directory.

Child Tickets

Change History (2)

comment:1 Changed 3 years ago by txrvtn

Severity: Normal

First, let's recap how these directories are defined.

  • The user's home directory is normally determined by the "HOME" environment variable. However, older versions of GLib (which some users will still be using) used getpwnam or getpwuid instead. (On top of that, Debian patched GLib to use the "G_HOME" environment variable in preference to either HOME or getpwuid.)
  • The XDG "user configuration" directory is determined by the "XDG_CONFIG_HOME" environment variable. If that variable is not set, "$HOME/.config" is used.
  • The Desktop, Downloads, Templates, Public, Documents, Music, Pictures, and Videos directories are defined in the file "$XDG_CONFIG_HOME/user-dirs.dirs". If this file doesn't exist, the corresponding subdirectory of the home directory is used by default.

As a result:

  • The start-tor-browser script really ought to set XDG_CONFIG_HOME explicitly. If this variable is set in the environment beforehand, or if the user is using an older version of GLib that doesn't honor HOME, they won't be using the TBB-specific config directory.
  • For similar reasons, the script should also set the XDG_CACHE_HOME, XDG_DATA_HOME, and XDG_RUNTIME_DIR variables.
  • It would be reasonably straightforward for the start-tor-browser script to generate an appropriate 'user-dirs.dirs' file so that Desktop, Downloads, etc., point to the correct locations defined by the user's desktop environment.

What I personally find most annoying, though, is that typing "~" in the save dialog doesn't yield my home directory, but rather, the Browser directory. So let me ask, is it really necessary to set HOME to begin with? Are there any parts of the bundle that store files relative to HOME, rather than relative to XDG_CONFIG_HOME / XDG_DATA_HOME / XDG_CACHE_HOME?

comment:2 Changed 2 years ago by gk

Marked #18979 as duplicate.

Note: See TracTickets for help on using tickets.