Can not click checkboxes in preferences in gedit

When I use gedit in Ubuntu 20.04, whenever I click on any of the checkboxes in Preferences, nothing happens.

Preferences

For example, when I click on Display line numbers, the checkbox is still marked as checked. For some reason, clicking Display grid pattern, Enable text wrapping, and Do not split words over two lines works, but when I exit out of Preferences and come back in, they go back to their original status, as shown in the picture.

All other options in other tabs can not be changed.

Edit: Apparently Preferences works when using gedit as a normal user, and not root. Previously, I was trying to change the Preferences as root

Now, I wonder why Preferences can not be changed as root. I noticed that when I use gedit as a normal user, nothing pops up at the terminal, but when I open gedit as root, the following message is displayed in the terminal:

(gedit:2024): dconf-WARNING **: 21:01:08.260: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.270: failed to commit changes to dconf: The connection is closed
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

(gedit:2024): dconf-WARNING **: 21:01:08.509: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.509: failed to commit changes to dconf: The connection is closed

(gedit:2024): dconf-WARNING **: 21:01:08.510: failed to commit changes to dconf: The connection is closed
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)

(gedit:2024): dconf-WARNING **: 21:04:00.840: failed to commit changes to dconf: The connection is closed
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
1
задан 12 August 2020 в 07:05

1 ответ

When starting a GUI application, like gedit, using sudo, you must use sudo -H, like so:

sudo -H gedit /path_to/filename
1
ответ дан 21 August 2020 в 08:01

Другие вопросы по тегам:

Похожие вопросы: