bilelmoussaoui / Hardcode-Tray

Fixes Hardcoded tray icons in Linux
Other
863 stars 63 forks source link

Unable to run hardcode-Tray in Debian testing #635

Open jEsuSdA opened 4 years ago

jEsuSdA commented 4 years ago

Specifications

Steps to reproduce the problem

# → hardcode-tray 
Unable to init server: Could not connect: Connection refused
Unable to init server: No se pudo conectar: Connection refused
Welcome to Hardcode-Tray!
Hardcode-Tray replaces some icons on the binary files of some applications. 
Please close all the running applications before running Hardcode-Tray script.
Desktop Environment: Other
Scaling Factor: 1
Icon Size: 22
Traceback (most recent call last):
  File "/usr/bin/hardcode-tray", line 103, in <module>
    if not isinstance(App.theme(), dict):
  File "/usr/lib/python3.7/site-packages/HardcodeTray/app.py", line 177, in theme
    theme = App.get("theme")
  File "/usr/lib/python3.7/site-packages/HardcodeTray/app.py", line 77, in get
    value = method()
  File "/usr/lib/python3.7/site-packages/HardcodeTray/modules/config/system.py", line 67, in theme
    theme_name = Gtk.Settings.get_default().get_property("gtk-icon-theme-name")
AttributeError: 'NoneType' object has no attribute 'get_property'
BlueManCZ commented 4 years ago

Do you have installed pygobject?

Anomalocaridid commented 2 years ago

I'm also having this issue. My Linux distro is the EndeavourOS Sway edition and I have the python-gobject package installed.

BlueManCZ commented 2 years ago

I noticed this problem on a clean Gentoo installation recently. It was caused by missing gtk libraries. I solved it by installing gtk+ package. Check if you have something similar in your distribution.

Anomalocaridid commented 2 years ago

@BlueManCZ Thank you, but I'm having a hard time figuring out which library I need to install, especially since I already have gtk2, gtk3, and gtk4 installed.

BlueManCZ commented 2 years ago

What desktop environment or window manager do you use? How did you set your current icon theme?

Anomalocaridid commented 2 years ago

I use Sway. I set my icon theme using LXAppearance, which set it in ~/.gtkrc-2.0 and ~/.config/gtk-3.0, the latter of which also gets read by this script that gets run every time my Sway config is loaded and uses the gsettings command to set my icon theme, along with a few related settings.

BlueManCZ commented 2 years ago

Do you run the script with sudo -E as regular user as mentioned here? If you run it as a root, problem is, you usually have all the gsettings applied to the user.

Anomalocaridid commented 2 years ago

I was unaware that I had to run it with sudo -E. Now it works. Thanks for your help!