Closed YellowOnion closed 1 year ago
This looks like an issue for custom cursors in ~/.icons etc
If XCURSOR_PATH
is unset on the host system, inside the container XCURSOR_PATH
will be set to match the default fallback behavior of libXcursor https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/blob/80192583/src/library.c#L32
If instead you have a custom XCURSOR_PATH
in your host system, inside the container its value will be set to just the two /run/host/user-share/icons:/run/host/share/icons
This could probably be improved by keeping/converting the XCURSOR_PATH
values from the host system, and bind mounting them inside the container.
both these folders have only what looks like two default cursor themes, Adwata should be i installed system wide tho, and doesn't appear, so might be an issue with the NixOS wrapper.
This is similar to what Flatpak does. /run/host/share/icons
is /usr/share/icons
from the host system and /run/host/user-share/icons
is $XDG_DATA_HOME/icons
If I move my user cursors from ~/.icons/
to ~/.local/share/icons
they start to appear in /run/host/, still can't see my system wide cursor, and it looks like FHSEnv doesn't have the Adwaita folder, but /run/current-system/sw/share/icons
is accessible, and set via XCURSOR_PATH
, and I can confirm that value is set, as it works from native linux games like Factorio.
This could probably be improved by keeping/converting the XCURSOR_PATH values from the host system, and bind mounting them inside the container.
Something akin to this seems to me the correct solution, it looks like PV currently merges all directories, so ~./local/share/icons
and the steam runtime icons are inside /run/host/share/icons, but something is breaking in the way it bindmounts, since this PR does seem to do something with XCURSOR_PATH: https://github.com/Sonicadvance1/steam-runtime-tools/commit/5ed2b67c636aea7bd86bc431ea612fc29429600b.
Funny thing is, there's a line of code that's set when XCURSOR_PATH is unset:
pv_search_path_append (new_xcursor_path, "~/.icons");
But ~/.local/share/icons
isn't set, so it must be pull some info out of XCURSOR_PATH, just not all of it.
both user icons, just folders, nothing fancy, but /run/current-system/ is a bunch of symlinks so maybe something is breaking.
hold up, looking at the code of pv_wrap_set_icons_env_vars()
, the variable original_xcursor_path
is not used to set XCURSOR_PATH in the pv environment, no wonder it doesn't work...
Here's a patch: https://github.com/YellowOnion/steam-runtime-tools/commits/main
As I briefly mentioned before, the current logic is:
XCURSOR_PATH
is unset in the host system -> set XCURSOR_PATH
inside the container to match the default fallback behavior of libXcursorXCURSOR_PATH
is set in the host system -> set XCURSOR_PATH
to basically /usr/share/icons
and $XDG_DATA_HOME/icons
Here's a patch: https://github.com/YellowOnion/steam-runtime-tools/commits/main
Given the nature of the container setup, this could have some unexpected implications.
For example let's assume that you have set XCURSOR_PATH
to /var/opt/my_cursors:/usr/local/my_other_cursors:/home/user/.icons
.
In this scenario, if we simply append XCURSOR_PATH
from the host system, the first two directories will be not accessible. That's because we don't bind-mount them in the same path, or at all, and only the last /home
path will work as expected.
This is what we do for XDG_DATA_DIRS
(used only to grab the icons from the host system), so probably we could implement that for XCURSOR_PATH
too. Even if it's not ideal, it could still be better than what we have right now.
I thought there might be issues here, but the logic doesn't make sense, we don't use the contents of XCURSOR_PATH, so why do we then decide how to set it inside the container based on if it's set or not, We shouldn't be checking if it's NULL we should just always set the hard coded defaults, that's why ~/.icons/
is ignored.
A fix to keep the XCURSOR_PATH
values from the host has been merged and will be included in the next Steam Linux Runtime Soldier release.
This is now in the client_beta
branch. To have this fixed, you want to see pressure-vessel 0.20230314.0
or later in SteamLinuxRuntime_soldier/VERSIONS.txt
.
Closing as fixed.
This change progressed from beta to the default branch a while ago.
How can I fix this is my question?
How can I fix this is my question?
The issue described here is (believed to be) fixed. If you have encountered similar symptoms, please open a new issue with full details.
Your system information
Steam Runtime Version:
Distribution (e.g. Ubuntu 18.04): NixOS-unstable
Link to your full system information (Help -> System Information) in a Gist:
Have you checked for system updates?: Yes (broken since pressure-vessel came out)
What compatibility tool are you using?: Proton Experimental
If you are using Steam Linux Runtime, or Proton 5.13 or newer:
Please describe your issue in as much detail as possible:
inside my shell:
while inside pressure-vessel (PRESSURE_VESSEL_SHELL=instead - can I use a custom terminal for this?):
This looks like an issue for custom cursors in
~/.icons
etc, both these folders have only what looks like two default cursor themes, Adwata should be i installed system wide tho, and doesn't appear, so might be an issue with the NixOS wrapper.