Statusbar preferences options aren't stored

Bug #1880806 reported by Balazs Gyurak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Unknown
gedit (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Hi,

Since upgrading to Ubuntu 20.04, Gedit is unable to save preferences. By default, it came with the following:
Display line numbers: on
Display right margin: off
Highlight current line: on
Text wrapping: on

I wanted to disable the first and third option, so I did. It works as long as gedit is open, but if I close and reopen it, the settings were reverted.

Repro steps:
1. Open gedit
2. Toggle the "Highlight current line" preference
3. Close gedit
4. Open gedit again
5. Observe that the "Highlight current line" preference is reverted to the original value

Expected behavior
Gedit persists preferences after closing & reopening

Actual behavior:
Gedit does not persist preferences after closing & reopening

Workaround:
Using gsettings seemed to do the trick. I've run:
gsettings set org.gnome.gedit.preferences.editor highlight-current-line false
gsettings set org.gnome.gedit.preferences.editor display-line-numbers false

This persists the settings correctly, so I believe the bug is related to the UI.

Additional information:
OS: Ubuntu 20.04
Package: /usr/bin/gedit
Version: 3.36.2-0ubuntu1

Thanks,
Balazs

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gedit 3.36.2-0ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-31.35-generic 5.4.34
Uname: Linux 5.4.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed May 27 06:37:36 2020
InstallationDate: Installed on 2018-11-05 (568 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: gedit
UpgradeStatus: Upgraded to focal on 2020-05-22 (4 days ago)

Revision history for this message
Balazs Gyurak (ba32107) wrote :
Revision history for this message
Balazs Gyurak (ba32107) wrote :

It's also worth mentioning that before upgrading to 20.04, I had both of those gedit settings off. Then I upgraded to 20.04, and that seemed to have enabled both those settings automatically.

I've upgraded from 19.10.

description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Do you see any error if you start gedit from a command line? Could you add the 'journalctl -b 0' log from the session after getting the issue?

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Balazs Gyurak (ba32107) wrote :

There aren't any errors on the command line. Which portion of the journalctl log would you need? The complete log from boot, or just when I start gedit?

The reason I'm asking it that the boot logs contain some personal information that I would need to redact if you need the whole lot.

Thanks

Revision history for this message
Sebastien Bacher (seb128) wrote :

the section when you start gedit is fine, you can do
$ journalctl -f

start gedit, change the settings

and see if anything gets printed in the journal

Revision history for this message
Balazs Gyurak (ba32107) wrote :

Ah ok got you. There is absolutely nothing in those logs, apart from the normal messages. The log snippet below was produced by following the repro steps above.

Out of curiosity, is this something that you are able to reproduce, or is it just on my system?

jún 04 19:47:54 balazs-thinkpad dbus-daemon[2597]: [session uid=1000 pid=2597] Activating service name='org.gnome.gedit' requested by ':1.53' (uid=1000 pid=2922 comm="/usr/bin/gnome-shell " label="unconfined")
jún 04 19:47:54 balazs-thinkpad dbus-daemon[2597]: [session uid=1000 pid=2597] Successfully activated service 'org.gnome.gedit'
jún 04 19:48:07 balazs-thinkpad dbus-daemon[2597]: [session uid=1000 pid=2597] Activating service name='org.gnome.gedit' requested by ':1.53' (uid=1000 pid=2922 comm="/usr/bin/gnome-shell " label="unconfined")
jún 04 19:48:07 balazs-thinkpad dbus-daemon[2597]: [session uid=1000 pid=2597] Successfully activated service 'org.gnome.gedit'

Revision history for this message
Sebastien Bacher (seb128) wrote :

> Out of curiosity, is this something that you are able to reproduce, or is it just on my system?

The issue seems specific to your system.

Could you do
$ gsettings monitor org.gnome.gedit.preferences.editor display-line-numbers

change the setting in gedit and see if there is a change printed

and
$ dpkg -l | grep dconf

and could you try if doing
$ gsettings set org.gnome.gedit.preferences.editor display-line-numbers false

works and keeps the change?

Revision history for this message
Balazs Gyurak (ba32107) wrote :

> The issue seems specific to your system.
Interesting, I assumed it was a bug with Focal. I appreciate you taking the time to look into it!

> change the setting in gedit and see if there is a change printed
No change is printed while 'gsettings monitor' is running. Tried with other 'org.gnome.gedit.preferences.editor' keys as well. I presume this is why it doesn't persist? The change made on the UI does not get through to gsettings?

> gsettings set org.gnome.gedit.preferences.editor display-line-numbers false
Yes this works, setting the properties with the above command persists as expected.

> $ dpkg -l | grep dconf
ii dconf-cli 0.36.0-1 amd64 simple configuration storage system - utilities
ii dconf-editor 3.36.0-1 amd64 simple configuration storage system - graphical editor
ii dconf-gsettings-backend:amd64 0.36.0-1 amd64 simple configuration storage system - GSettings back-end
ii dconf-service 0.36.0-1 amd64 simple configuration storage system - D-Bus service
ii libdconf1:amd64 0.36.0-1 amd64 simple configuration storage system - runtime library

Revision history for this message
Sebastien Bacher (seb128) wrote :

Weird, do you start gedit with your user? Do changes to other applications (e.g nautilus) are correctly stored? Could you maybe try with another user account on the same computer to see if that has the issue?

Revision history for this message
Balazs Gyurak (ba32107) wrote :

Yes, I start gedit with my own user. I tried with `sudo gedit`, as well as with another, freshly created non-admin user. The issue is present with both.

Nautilus is correctly saving preferences. I am not sure what other applications use gsettings under the hood, so I don't know what else I can try.

Revision history for this message
Balazs Gyurak (ba32107) wrote :

I do not believe that this problem is specific to my system. I just created a VM and did a fresh install of 20.04, and I can reproduce the issue there as well.

Here are the steps I followed:
1. Created an Ubuntu 64 bit VM in VirtualBox
2. Downloaded the latest 20.04 image from Ubuntu.com
3. Installed it (all defaults, only clicked "next" in the install wizard)
4. Started Ubuntu, and performed the same exact repro steps right away as I mentioned in the bug description

The issue is there.

Revision history for this message
Balazs Gyurak (ba32107) wrote :

Did you manage to reproduce it on your system or a clean installation?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you do a screencast/video of the issue?

Yes I just tried with a fresh ISO
- downloaded a focal desktop amd64 iso
- started it in VM on the live session
- ctrl-alt-T

$ gedit

- opened the popdown menu
- selected preferences
- unselected the checkbox for the 'highlight selected line'

verified that the first emtpy line is selected

- closed gedit
- type gedit on the command line again

gedit opens with the first line not selected

Revision history for this message
Balazs Gyurak (ba32107) wrote :

Ah! I see why we have a discrepancy. I'm sorry, I was not explicit enough with my repro steps. Following your steps, it works for me as well.

What I am doing is the following:
- ctrl+alt+T
- $ gedit
- first line is highlighted by default
- *** open the "Ln1, Col 1" menu in the bottom right corner ***
- uncheck "Highlight current line"
- first line is NOT highlighted now
- close gedit
- in the terminal: $ gedit
- first line is highlighted again

So, it seems that the quick menu in the bottom right corner is the one that's not working. I do not go into the "Preferences" dialog at all.

If this doesn't help, I can do a video of the problem.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, confirming the issue with the statusbar menu items. Those options aren't supposed to be editing gedit preferences though but they should apply to the current document and be stored for it. Could you maybe report the issue upstream on https://gitlab.gnome.org/GNOME/gedit/-/issues to get their feedback on the intended behaviour?

summary: - Gedit unable to save preferences on 20.04
+ Statusbar preferences options aren't stored
Changed in gedit (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Balazs Gyurak (ba32107) wrote :

Thanks. I've opened https://gitlab.gnome.org/GNOME/gedit/-/issues/330.

I am actually a bit confused by your answer, could you please help me understand a few things?
1. How is the statusbar different from the preferences dialog? Why isn't it supposed to edit gedit preferences?
2. I'm relatively new to the Linux world, I don't quite understand why you refer to Gnome as "upstream". Is it because Gnome is used by Ubuntu, so you build on top of what Gnome offers? And the statusbar problem is in Gnome's remit? Although to be honest I'm still confused as to why, from a user's perspective they are the same application, just different ways to trigger the same option.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for reporting it on gitlab!

1. That's the gedit design, the preference dialog changes the default settings, the menu at the bottom is for the current view/document. I think the idea is that you go to preference not often and set defaults there, where the bottom menu is a quick access for temporary changes

2. We call 'upstream' the people writting the software. The Gedit project is written by GNOME people and they are the one working on the code, releasing new versions, etc. Ubuntu does distribute their software (the example might be easier to understand if you think about chrome or firefox, we include those software but we are not the ones written them). The Ubuntu team does spend time working on issues and contribute to fixing problems but the people knowing the code and design of the project the best remain 'upstream'

Changed in gedit (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Balazs Gyurak (ba32107) wrote :

Ah right makes sense! So I should have reported there in the first place. The reason I was confused is I thought that *only* the status bar problem concerned Gnome, not the preferences, but I see now that is not the case.

Thanks!

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for reporting the issue upstream!

Changed in gedit:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.