Opened 2 years ago

Last modified 6 months ago

#27903 assigned defect

Tor Browser 8 does not respect gtk3 settings

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-8.0-issues, tbb-regression, TorBrowserTeam202006
Cc: sugrynidos, califuture, schappi, tbb-team Actual Points:
Parent ID: Points:
Reviewer: boklm Sponsor:

Description

Sorting folders first is ignored in Tor Browser 8 on the file chooser dialog. Rather, the default gtk3 behavior is used which mixes files and folders. However, that worked on Tor Browser 7.

Child Tickets

Attachments (1)

gsettings_backend.patch (615 bytes) - added by cypherpunks 12 months ago.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 2 years ago by gapegas7uftp

Also, many preference changes not respected when re-entering file chooser dialog.

To trigger,

  1. Open a file (CTRL-O)
  2. Right-click and change Sort Folders Before Files (check)
  3. Change sorting field (Modified)
  4. Also, could make other changes (like Show hideen files or Show Time)
  5. Double click on a file to open (a test file)
  6. Do other things
  7. Open a file again (CTRL-O)
  8. Setting changes made before are now gone

This also works same way with Save Page (CTRL-S)

Also, new in Tor Browser 8, clicking on Home (Open your personal folder) in File Chooser now goes to tor_browser_LANG/Browser instead of actual home directory. This is not too big of a thing, but it is different than Tor Browser 7. Maybe it is more security better, so not a thing anyway.

On Linux. Also, I am using a settings.ini file for bettter GTK3 ticket:27546

comment:2 Changed 2 years ago by gk

Cc: sugrynidos added

#28428 is a duplicate.

comment:3 Changed 20 months ago by donnm

TBB 8 also clobbers gtk file chooser settings for other gtk programs (reported in #28428). For example, whether the file chooser or Nautilus sorts folders before files.

  1. Running:
$ gsettings set org.gtk.Settings.FileChooser sort-directories-first true
$ gsettings get org.gtk.Settings.FileChooser sort-directories-first
true
  1. Then in TBB 8, CTRL-O or CTRL-S to open file chooser. Close it without doing anything.
  1. Again running:
$ gsettings get org.gtk.Settings.FileChooser sort-directories-first
false

The issue I describe here is more related to #28428, which I would argue is not a duplicate of this report (#27903) because the latter deals with TBB 8 not respecting gtk settings, while #28428 deals with TBB 8 actively clobbering gtk settings.

I created a hack workaround that just tries to maintain my preference:

fix-filechooser.sh

#!/bin/sh

while true; do 
    VAL=$(DISPLAY=:0 gsettings get org.gtk.Settings.FileChooser sort-directories-first)

    if [ $VAL == "false" ]; then
        echo "Fixing file chooser settings."
        DISPLAY=:0 gsettings set org.gtk.Settings.FileChooser sort-directories-first true
    fi
    sleep 1
done

comment:4 Changed 17 months ago by gk

Cc: califuture added

#30587 is a duplicate.

comment:5 Changed 17 months ago by califuture

Thanks for the workaround script.
On Ubuntu 19.04 I had to drop an "=" to get it to work.
I kept getting an error like https://superuser.com/questions/376242/bash-script-while-loop-if-variable-is-true
This fixed it.

if [ $VAL = "false" ]; then

comment:6 Changed 15 months ago by gk

Cc: schappi added

#31171 is a duplicate.

comment:7 Changed 12 months ago by cypherpunks

dconf has a partial client/server architecture. It uses D-Bus. The server is only involved in writes (and is not activated in the user session until the user modifies a preference).

A "user-db" line specifies a user database. These databases are found in $XDG_CONFIG_HOME/dconf/. The name of the file to open in that directory is exactly as it is written in the profile. This file is expected to be in the binary dconf database format. Note that XDG_CONFIG_HOME cannot be set/modified per terminal or session, because then the writer and reader would be working on different DBs (the writer is started by DBus and cannot see that variable).

We can isolate Tor Browser from dconf-service:

export GSETTINGS_BACKEND=memory

comment:8 Changed 12 months ago by cypherpunks

Can confirm that running GSETTINGS_BACKEND=memory ./start-tor-browser fixes it. Using firejail with --nodbus option also works.

I propose that the GSETTINGS_BACKEND fix above be added to the start-tor-browser script which also sets and exports HOME.

comment:9 in reply to:  8 Changed 12 months ago by gk

Replying to cypherpunks:

Can confirm that running GSETTINGS_BACKEND=memory ./start-tor-browser fixes it. Using firejail with --nodbus option also works.

I propose that the GSETTINGS_BACKEND fix above be added to the start-tor-browser script which also sets and exports HOME.

Does not sound unreasonable to me at first glance. Care to write a small patch for that so we can review it?

Changed 12 months ago by cypherpunks

Attachment: gsettings_backend.patch added

comment:10 Changed 12 months ago by gk

Keywords: TorBrowserTeam201910R added
Status: newneeds_review

Thanks!

comment:11 Changed 12 months ago by pili

Keywords: TorBrowserTeam201911 added

Moving tickets to November 2019

comment:12 Changed 12 months ago by gk

Keywords: TorBrowserTeam201911R added; TorBrowserTeam201910R removed

There is no way to do reviews in October 2019 anymore.

comment:13 Changed 12 months ago by gk

Keywords: TorBrowserTeam201911 removed

No need for duplicate keyword.

comment:14 Changed 12 months ago by Librenox

Polite reminder (and +1) that OP was about TBB *ignoring* gtk settings, not about the clobbering issue. I came here because TBB's uses the gtk default "Sort Folders Before Files=False" and I also find that sufficiently irritating to request a fix.

This wouldn't require sharing the user's dconf database, it would be fine if TBB had its own
(settable via DCONF_PROFILE according to https://developer.gnome.org/dconf/unstable/dconf-overview.html#Profiles), and the user had to change the settings separately there. But
right now I think those settings are simply not loaded.

comment:15 Changed 12 months ago by pili

Cc: tbb-team added
Owner: changed from tbb-team to boklm
Status: needs_reviewassigned

Assigning more tickets to boklm for the next few months

comment:16 Changed 11 months ago by sysrqb

Status: assignedneeds_review

comment:17 Changed 11 months ago by gk

Keywords: TorBrowserTeam201912R added; TorBrowserTeam201911R removed

We are in December now.

comment:18 Changed 11 months ago by pili

Reviewer: boklm

comment:19 Changed 10 months ago by sysrqb

Keywords: TorBrowserTeam202001R added; TorBrowserTeam201912R removed

comment:20 Changed 9 months ago by boklm

Keywords: TorBrowserTeam202001 added; TorBrowserTeam202001R removed
Status: needs_reviewnew

I merged the patch from comment:9 to master as commit 4e682a909ec2af4c0452934446392f7ff918d8d1.

I think it doesn't completely fix the issue (so I am keeping this ticket open), but should be an improvement as it solves related issues such as #31171.

comment:21 Changed 9 months ago by pili

Keywords: TorBrowserTeam202002 added; TorBrowserTeam202001 removed

Moving tickets to February

comment:22 Changed 8 months ago by pili

Keywords: TorBrowserTeam202003 added; TorBrowserTeam202002 removed

We are no longer in February, moving tickets

comment:23 Changed 7 months ago by sysrqb

Keywords: TorBrowserTeam202006 added; TorBrowserTeam202003 removed

Move tickets to 2020 June

comment:24 Changed 6 months ago by gaba

Owner: changed from boklm to tbb-team
Status: newassigned

Release all this tickets back into tbb-team.

Note: See TracTickets for help on using tickets.