You are not logged in.

#1 Today 00:12:52

GavinX
Member
Registered: 2016-06-28
Posts: 6

[SOLVED] Cannot run gnome-tweaks as regular user

I'm experiencing a puzzling issue: each time I try to run Gnome Tweaks as a normal user, I get this error:

(process:5939): Gtk-WARNING **: 20:06:49.150: Theme parser error: gtk.css:4198:3-20: No property named "--accent-bg-color"

(process:5939): Gtk-WARNING **: 20:06:49.150: Theme parser error: gtk.css:4199:3-20: No property named "--accent-fg-color"

(process:5939): Gtk-WARNING **: 20:06:49.150: Theme parser error: gtk.css:4200:3-17: No property named "--accent-color"
Traceback (most recent call last):
  File "/usr/bin/gnome-tweaks", line 99, in <module>
    from gtweak.app import GnomeTweaks
  File "/usr/lib/python3.12/site-packages/gtweak/app.py", line 13, in <module>
    from gtweak.tweakview import Window
  File "/usr/lib/python3.12/site-packages/gtweak/tweakview.py", line 14, in <module>
    from gtweak.tweaks.tweak_group_appearance import TWEAK_GROUP as AppearanceTweaks
  File "/usr/lib/python3.12/site-packages/gtweak/tweaks/tweak_group_appearance.py", line 240, in <module>
    GtkThemeSwitcher(),
    ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gtweak/tweaks/tweak_group_appearance.py", line 27, in __init__
    self._gtksettings3 = GtkSettingsManager('3.0')
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gtweak/gtksettings.py", line 20, in __init__
    os.makedirs(os.path.dirname(self._path), exist_ok=True)
  File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: '/home/gavin/.config/gtk-3.0'

However, if I run th same command using sudo, Gnome Tweaks opens. Not sure what's wrong.

Last edited by GavinX (Today 15:17:14)

Offline

#2 Today 02:29:40

mpan
Member
Registered: 2012-08-01
Posts: 1,302
Website

Re: [SOLVED] Cannot run gnome-tweaks as regular user

Who is the owner of “/home/gavin/.config/gtk-3.0”?


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 Today 10:55:45

GavinX
Member
Registered: 2016-06-28
Posts: 6

Re: [SOLVED] Cannot run gnome-tweaks as regular user

mpan wrote:

Who is the owner of “/home/gavin/.config/gtk-3.0”?


I am.

***UPDATE***
Your question made me have a look at the file in question. Oddly, permissions indicated that I am the owner, the file was in my group, and that I had read and write permissions. However, if I tried to open the file, nothing happened.

So I deleted that file and another (gtk-4.0) and voila, Gnome Tweaks opened.

Thanks so much for your question that made me think a little more.

Last edited by GavinX (Today 15:16:40)

Offline

#4 Today 16:47:34

mpan
Member
Registered: 2012-08-01
Posts: 1,302
Website

Re: [SOLVED] Cannot run gnome-tweaks as regular user

A blind guess: you did run a GUI program, possibly gnome-tweaks or something similar, as root earlier.

Other than security implications,⁽¹⁾ another problem is that it may lead to a chaos in permissions in user’s home directory. What you described resembles that kind of trouble. Realize that a program invoked under a different user does all interaction as that other user. That includes setting/modifying permissions of files, which then pollute your home directory. While what other “normal” users can do is quite limited, root will cut straight through most of access control and spread root-owned files all across your own directories.
____
⁽¹⁾ As indicated in the warning box in “Running GUI applications as root” article.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 Today 18:17:25

GavinX
Member
Registered: 2016-06-28
Posts: 6

Re: [SOLVED] Cannot run gnome-tweaks as regular user

mpan wrote:

A blind guess: you did run a GUI program, possibly gnome-tweaks or something similar, as root earlier.

Other than security implications,⁽¹⁾ another problem is that it may lead to a chaos in permissions in user’s home directory. What you described resembles that kind of trouble. Realize that a program invoked under a different user does all interaction as that other user. That includes setting/modifying permissions of files, which then pollute your home directory. While what other “normal” users can do is quite limited, root will cut straight through most of access control and spread root-owned files all across your own directories.
____
⁽¹⁾ As indicated in the warning box in “Running GUI applications as root” article.

Thanks for this info. Was not aware of it.

Offline

Board footer

Powered by FluxBB