Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.73k stars 12.41k forks source link

Settings schema 'io.github.lxi-tools.lxi-gui' is not installed #179217

Closed manotam closed 1 month ago

manotam commented 2 months ago

brew gist-logs <formula> link OR brew config AND brew doctor output

brew config:

HOMEBREW_VERSION: 4.3.12
ORIGIN: https://github.com/Homebrew/brew
HEAD: 874d2da45344d3b27aa740e555b0210d8c474220
Last commit: 2 days ago
Core tap JSON: 31 Jul 14:56 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 3.3.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: 16-core 64-bit unknown_0x6_0x9a
Clang: 18.1.8
Git: 2.34.1 => /bin/git
Curl: 7.81.0 => /bin/curl
Kernel: Linux 6.5.0-1025-oem x86_64 GNU/Linux
OS: Linux Mint 21.1 (vera)
Host glibc: 2.35
/usr/bin/gcc: 11.4.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: 14.1.0_2
xorg: N/A

brew doctor:

Your system is ready to brew.

Verification

What were you trying to do (and why)?

Installed lxi-tools and ran

lxi-gui

I reached out to the creators of the tool (here the issue and workaround) and suggested to list that issue here. However, I am not sure how to reach out to the creator of the brew instructions for this distro. In case this is misplaced please reach out to me how I can contact the creator. Thanks!

What happened (include all command output)?

output: (lxi-gui:2864): GLib-GIO-ERROR **: 17:08:47.333: Settings schema 'io.github.lxi-tools.lxi-gui' is not installed Trace/breakpoint trap (core dumped)

What did you expect to happen?

gui launching

Step-by-step reproduction instructions (by running brew commands)

run:

$ brew install lxi-tools
$ lxi-gui
cho-m commented 2 months ago

It seems you had XDG_DATA_DIRS set prior to running command?

Homebrew's glib automatically looks up correct directory, but only if XDG_DATA_DIRS isn't set as that overrides the defaults:


If you set XDG_DATA_DIRS, then you will need to make sure to add correct path to your system config as Homebrew cannot install into system's /usr/share.

lundmar commented 2 months ago

It seems you had XDG_DATA_DIRS set prior to running command?

FYI - on most distributions this variable will be set. This will conflict with brew installed applications as is the case here. There must be a more sensible solution than homebrew users having to manually set or unset XDG_DATA_DIRS.

gromgit commented 2 months ago

FYI - on most distributions this variable will be set.

I can confirm this to be true even on GUI-less Ubuntu and Debian server installations with no X11 or Wayland apps installed. The "culprit" is snapd, a cross-distro containerised packaging platform that installs /etc/profile.d/apps-bin-path.sh, in which is the following:

# Ensure base distro defaults xdg path are set if nothing filed up some
# defaults yet.
if [ -z "$XDG_DATA_DIRS" ]; then
    export XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi

that makes Homebrew's glib adjustment null and void.

Since snapd is widely installed by default, I think brew shellenv needs to add Homebrew's share dir to XDG_DATA_DIRS if it exists, otherwise we'll likely be running into the same issue with other glib-enabled formulae down the line.

lundmar commented 2 months ago

I can confirm this to be true even on GUI-less Ubuntu and Debian server installations with no X11 or Wayland apps installed. The "culprit" is snapd, a cross-distro containerised packaging platform that installs /etc/profile.d/apps-bin-path.sh, in which is the following:

FYI - Flatpak is equally a "culprit" in this case as it does something similar in /etc/profile.d/flatpak.sh.

For example, on my Ubuntu system, my XDG_DATA_DIRS looks like this:

$ echo $XDG_DATA_DIRS 
/usr/share/ubuntu-wayland:/usr/share/gnome:/home/lundmar/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
MikeMcQuaid commented 2 months ago
  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.

This is confusing to me given https://github.com/Homebrew/brew/blob/635a776fce1b63b1be554ca39b0cdc5911b4bd95/Library/Homebrew/extend/os/linux/diagnostic.rb#L62-L73

I'm not sure why this brew doctor warning was not displayed for this user.

cho-m commented 2 months ago

This is confusing to me given https://github.com/Homebrew/brew/blob/635a776fce1b63b1be554ca39b0cdc5911b4bd95/Library/Homebrew/extend/os/linux/diagnostic.rb#L62-L73

I'm not sure why this brew doctor warning was not displayed for this user.

Wouldn't the environment variable get filtered out by brew?

MikeMcQuaid commented 2 months ago

@cho-m 🤦🏻 yes, of course. Might be worth passing this through as a HOMEBREW_XDG_DATA_DIRS so we can check it here?

gromgit commented 2 months ago

Also, check_xdg_data_dirs is currently scoped to Linux, but glib is used In various cross-platform formulae, and I was able to replicate the OP's issue on macOS, so I think it makes sense for the check to be cross-platform as well.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.