Skip to content

Conversation

@realh
Copy link

@realh realh commented Nov 8, 2025

I've got Hints to work with GNOME/Wayland by writing a gnome-shell extension to provide a dbus service which hints uses in its new WindowManager implementation and as an alternative to wlr_layer_shell.

The extension is in [email protected]. You are welcome to change the part after the @, but remember to also edit metadata.json to match. The directory can be copied or symlinked into ~/.local/share/gnome-shell/extensions/ and enabled with gnome-extensions enable [email protected] or with the extensions applet. It might be necessary to restart the desktop.

I couldn't get the systemd service for hintsd to work properly. It can't connect to DISPLAY, but I don't know whether that's because it tries to start too early or because systemd's environment is independent from the desktop session. As an alternative I wrote hintsd.desktop which can be installed in ~/.config/autostart.

@AlfredoSequeida
Copy link
Owner

Well this is awesome. Thank you! I'll try to review this soon. As for the dbus service, yes this is a know issue, but I haven't had time to look into it. But yes, I think the service does start too soon. I have been able to get around this on one of my systems where I have seen this by just launching the service with a delay.

@AlfredoSequeida
Copy link
Owner

AlfredoSequeida commented Nov 16, 2025

I am running into some issues with this:

hints -v 

Traceback (most recent call last):
  File "/home/test/.local/bin/hints", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/test/.local/share/pipx/venvs/hints/lib/python3.13/site-packages/hints/hints.py", line 362, in main
    window_system = get_window_system(config["window_system"])()
  File "/home/test/.local/share/pipx/venvs/hints/lib/python3.13/site-packages/hints/window_systems/gnome.py", line 20, in __init__
    dbus_proxy.get_focused_window_info()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/test/.local/share/pipx/venvs/hints/lib/python3.13/site-packages/hints/dbus.py", line 26, in get_focused_window_info
    return self.proxy.call_sync(
           ~~~~~~~~~~~~~~~~~~~~^
                method_name = "FocusedWindowInfo",
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
                cancellable = None
                ^^^^^^^^^^^^^^^^^^
            )   # type: ignore
            ^
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable (2)

The extension is installed and enabled:

gnome-extensions info [email protected]

[email protected]
  Name: Hints
  Description: A GNOME Shell extension for Hints
  Path: /home/test/.local/share/gnome-shell/extensions/[email protected]
  Enabled: Yes
  State: OUT OF DATE

I am running this on Wayland gnone-shell version 48.5.

I don't know much about Gnome extensions, but I read you can use d-feet to see the running dbus processes. I don't see the hints extension there, but I do see it in looking glass under "Extensions" and there I also see:

[email protected] has not emitted any errors

So I don't think there is anything wrong with the extension itself.

Any ideas? This is clean install of Gnome on Manjaro Linux, maybe there is a dependency I am missing? What distro did you test this with?

@realh
Copy link
Author

realh commented Nov 16, 2025

It looks very much like the extension isn't actually running, so I don't know why gnome-extensions isn't showing that. I haven't got a PC handy with an earlier version of GNOME than 49 to test with, so that was the only version I listed in metadata.json. I've just added 48 to the list, and I'm fairly confident that will work, because I was able to fix all the extensions I use when GNOME upgraded to 49 simply by adding 49 to their metadata files, so there seem to have been far fewer dissruptive changes to the API this time.

It would probably be worth adding 46 and 47 as well, for Ubuntu LTS and Debian Trixie respectively. I think that stands a good chance of working with no other changes anyway, but I'll see if it's possible to enable an extension on a live USB.

@realh
Copy link
Author

realh commented Nov 16, 2025

Regarding the systemd service, I know there's a target for XDG autostart, but I'm not sure how to use it. I just found something that might help.

@realh
Copy link
Author

realh commented Nov 16, 2025

I did manage to load the extension on Ubuntu 24.04 without any error messages. I haven't tested its functionality, but I'm pretty sure the parts of the API I'm using have been stable for quite a long time.

@betoco-de
Copy link

Good work, thank you so much.

But it only works in GNOME apps; it doesn't work in others.

Do you know what might be causing that?

@realh
Copy link
Author

realh commented Nov 29, 2025

Good work, thank you so much.

But it only works in GNOME apps; it doesn't work in others.

Do you know what might be causing that?

ISTR I had to edit /etc/environment as described in step 2 of System Requirements. Have you done that?

@piedpipr
Copy link

piedpipr commented Jan 3, 2026

Hi, @realh this is real good work!

It seems to be working fine with the supported apps, however, I am having some issues to make it work for all the apps on my system. Most gnome/system apps seem to work fine with hints and the overlay appears but almost none of the user apps like Firefox, Brave seem to allow the overlay to appear. I wonder if it is just my system!

This warning appears when I run hints, I also added the environment variables and tried enabling --force-renderer-accessibility for Chromium and Electron apps as well. Nothing seems to resolve the issue.

(hints:11462): dbind-WARNING **: 02:51:18.292: AT-SPI: Unable to open bus connection: Failed to connect to socket /run/user/1000/at-spi2-BG3KI3/socket: No such file or directory
Gdk-Message: 02:51:18.479: Window 0x8954070 is a temporary window without parent, application will not be able to position it on screen.

System Info:

OS: Fedora Linux 43.20251231.0 (Silverblue) x86_64
DE: GNOME 49.2
WM: Mutter (Wayland)
Packages: 1617 (rpm), 136 (flatpak-system), 1 (flatpak-user)

@realh
Copy link
Author

realh commented Jan 4, 2026

I have had it working with Firefox, but it doesn't seem to do a good job of identifying buttons etc. Try setting /etc/environment as described in README: System Requirements. @AlfredoSequeida also posted a useful link in #77.

@piedpipr
Copy link

piedpipr commented Jan 4, 2026

@realh It seems like the issue is with the Flatpak apps . It is most likely that your extension is unable to access the system Flatpak (installed with flatpak install --system or just flatpak install) D-bus session. Hints is working fine with flatpaks installed on ~/.local/share/flatpak/ (installed with flatpak install --user), but unable to access the Flatpaks that are in /var/lib/flatpak/.

I was wrong with my assumption of hints working with user flatpak apps. It doesn't work across the board even when I supplied the socket to hints which was not accessible for some apps. My second guess is now that the flatpak is isolated with its own namespace and PID hints can't access it. @AlfredoSequeida maybe you can reason it better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants