Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting XDG_CACHE_HOME and/or XDG_DATA_HOME breaks application #35

Closed
JoelleJS opened this issue May 14, 2024 · 3 comments
Closed

Setting XDG_CACHE_HOME and/or XDG_DATA_HOME breaks application #35

JoelleJS opened this issue May 14, 2024 · 3 comments

Comments

@JoelleJS
Copy link
Contributor

JoelleJS commented May 14, 2024

Describe the bug
These are two bugs with setting XDG environment variables:

  • Setting XDG_CACHE_HOME makes the application look for nwg-dock-pinned in the $HOME/.config dir:
ERRO[0000] Unable to show grid button: open /home/yourusername/.config/nwg-dock-pinned: no such file or directory
  • Setting XDG_DATA_HOME to anything else than /usr/share makes the application look for the application images in $XDG_DATA_HOME/nwg-dock-hyprland/images instead of /usr/share/nwg-dock-hyprland/images, resulting in a panic:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5e3243]

To Reproduce
Steps to reproduce the behavior:

  1. Start the application with either environment variable set

Expected behavior

  • The application looks for nwg-dock-pinned in $XDG_CACHE_HOME
  • The application looks for its images in /usr/share/nwg-dock-hyprland/images

Desktop (please complete the following information):

  • Linux distribution: Arch Linux
  • go version: go1.22.3 linux/amd64
  • gtk-layer-shell version: 0.8.2-1
JoelleJS added a commit to JoelleJS/nwg-dock-hyprland that referenced this issue May 14, 2024
@JoelleJS JoelleJS mentioned this issue May 14, 2024
JoelleJS added a commit to JoelleJS/nwg-dock-hyprland that referenced this issue May 14, 2024
nwg-piotr added a commit that referenced this issue May 14, 2024
@nwg-piotr
Copy link
Owner

@JoelleJS before I release, I'd like to wait for @dlasky to merge dlasky/gotk3-layershell#8, and then merge #37.

@dlasky
Copy link

dlasky commented May 14, 2024

needs some work to build but its close

@nwg-piotr
Copy link
Owner

@dlasky Thanks!

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

No branches or pull requests

3 participants