You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
This came up while debugging xpra on KDE. This issue has been reported upstream, but it seems to uniquely affect KDE on nix. We communicated with the xpra author who added a mitigation for this, but it does not address the underlying issue in pyxdg. It seems the issue is due to the envvar XDG_DATA_DIRS only when it contains both ${plasma-workspace}/shareandcurrent-system/sw/share. Those are the only two directories that seem to matter. I'm wondering if this is because some entries from plasma-workspace/share are a subset of what is symlinked into current-system/sw/share?
For the following you'll need the /share directory for the installed KDE. You can get this by echo $XDG_DATA_DIRS > out.txt and searching for plasma-workspace, or on nix repl
❯ sudo nix repl
[sudo] password for mjlbach:
Welcome to Nix version 2.3.4. Type :? for help.
nix-repl> :l <nixpkgs>
Added 11495 variables.
nix-repl> "${plasma-workspace}"
"/nix/store/2gc5fsahhfxvffdrfz2vmr4g2askadia-plasma-workspace-5.17.5"
nix-shell -p "python3.withPackages (ps: with ps; [ pyxdg ])" --command "XDG_DATA_DIRS=/run/current-system/sw/share:/nix/store/2gc5fsahhfxvffdrfz2vmr4g2askadia-plasma-workspace-5.17.5/share python -c 'from xdg.Menu import parse;parse()'" -> Error occurs (change the path to point to your plasma workspace)
Describe the bug
A clear and concise description of what the bug is.
This came up while debugging xpra on KDE. This issue has been reported upstream, but it seems to uniquely affect KDE on nix. We communicated with the xpra author who added a mitigation for this, but it does not address the underlying issue in pyxdg. It seems the issue is due to the envvar XDG_DATA_DIRS only when it contains both
${plasma-workspace}/share
andcurrent-system/sw/share
. Those are the only two directories that seem to matter. I'm wondering if this is because some entries from plasma-workspace/share are a subset of what is symlinked into current-system/sw/share?To Reproduce
Steps to reproduce the behavior:
nix-shell -p "python3.withPackages (ps: with ps; [ pyxdg ])" --command "python -c 'from xdg.Menu import parse;parse()'"
-> Error occursFor the following you'll need the /share directory for the installed KDE. You can get this by echo $XDG_DATA_DIRS > out.txt and searching for plasma-workspace, or on nix repl
nix-shell -p "python3.withPackages (ps: with ps; [ pyxdg ])" --command "XDG_DATA_DIRS=/run/current-system/sw/share:/nix/store/2gc5fsahhfxvffdrfz2vmr4g2askadia-plasma-workspace-5.17.5/share python -c 'from xdg.Menu import parse;parse()'"
-> Error occurs (change the path to point to your plasma workspace)nix-shell -p "python3.withPackages (ps: with ps; [ pyxdg ])" --command "XDG_DATA_DIRS=/run/current-system/sw/share python -c 'from xdg.Menu import parse;parse()'"
-> Error doesn't occurnix-shell -p "python3.withPackages (ps: with ps; [ pyxdg ])" --command "XDG_DATA_DIRS=/nix/store/2gc5fsahhfxvffdrfz2vmr4g2askadia-plasma-workspace-5.17.5/share python -c 'from xdg.Menu import parse;parse()'"
-> Error doesn't occurA clear and concise description of what you expected to happen.
pyxdg loads cleanly
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: