Skip to content

Conversation

@Kyuyrii
Copy link

@Kyuyrii Kyuyrii commented Dec 26, 2025

I noticed that the location used when UMU is being used by a Snap is quite bad, so I'd like to change it.

The problem with the current location is that since the $HOME folder is considered to be the $HOME/.local/share folder, this generates the creation of folders like applications and desktop-directories, polluting the user's $HOME with folders that may not even be useful, and perhaps confusing the user, since a Steam folder is created when umu-run downloads umu-proton.

I chose the AppsFiles folder because it's the same one I use in Zordeer and Meganimus, and I'm trying to make a Snap version of Zordeer.

@Kyuyrii
Copy link
Author

Kyuyrii commented Dec 26, 2025

Since Heroic also uses the UMU launcher, when umu is launched in the Snap version of Heroic, the umu folder is created in the $HOME folder.

@Kyuyrii
Copy link
Author

Kyuyrii commented Dec 26, 2025

I specified an exact location because I'm assuming choosing hidden folders might be a problem.

But if it isn't, I suppose it makes sense to allow umu-run within a Snap to use the XDG_DATA_HOME environment variable instead of forcing a fixed location.

@loathingKernel
Copy link
Contributor

FWIW the location is deliberately shared to avoid duplication of steam runtimes and protons between launchers and packaging methods.

@Kyuyrii
Copy link
Author

Kyuyrii commented Dec 26, 2025

FWIW the location is deliberately shared to avoid duplication of steam runtimes and protons between launchers and packaging methods.

In this case, because the $HOME folder is being treated as XDG_DATA_HOME, the Steam folder created by UMU is not used by any version of Steam.

And even if you allow UMU Snap to define XDG_DATA_HOME, each Steam version has its own folder, as far as I remember.

This objective is only achieved by using UMU outside of a Snap app and using only the native version of Steam.

@loathingKernel
Copy link
Contributor

loathingKernel commented Dec 26, 2025

In this case, because the $HOME folder is being treated as XDG_DATA_HOME, the Steam folder created by UMU is not used by any version of Steam.

Indeed, that's true, but that seems like a different issue than setting XDG_DATA_HOME to an arbitrary directory different than flatpak or native.

@Kyuyrii
Copy link
Author

Kyuyrii commented Dec 26, 2025

In this case, because the $HOME folder is being treated as XDG_DATA_HOME, the Steam folder created by UMU is not used by any version of Steam.

Indeed, that's true, but that seems like a different issue than setting XDG_DATA_HOME to an arbitrary directory different than flatpak or native.

I chose to change the location to $HOME/AppsFiles/UMU-launcher to avoid creating the applications and desktop-directories folders in the $HOME folder, as well as to avoid confusion about the Steam folder.

If someone opens the AppsFiles folder and sees a folder called UMU-launcher, they will immediately understand that the Steam folder is something from the UMU launcher and not something that Steam created.

I was very confused when I saw the Steam folder in the $HOME folder; it took me a while to understand that it was the UMU launcher that was creating it.

I know there's an option to let the user/developer define where the XDG_DATA_HOME will be, but I imagine that wasn't done due to the desktop-launch of the gnome and kde-neon-6 extensions.

Currently I'm testing the UMU launcher in 3 Snaps: zordeer, heroic, and umu-run.

If XDG_DATA_HOME is not set by the UMU launcher, XDG_DATA_HOME will be "$SNAP_USER_DATA/.local/share", so SteamRT3 will be downloaded 3 times.

@loathingKernel
Copy link
Contributor

loathingKernel commented Dec 26, 2025

I am probably missing something here, because I do not have any experience with Snap, but what is stopping us from setting the path to the following?

    XDG_DATA_HOME: Path = Path(os.environ["SNAP_REAL_HOME"]).joinpath(".local", "share")

@Kyuyrii
Copy link
Author

Kyuyrii commented Dec 26, 2025

I am probably missing something here, because I do not have any experience with Snap, but what is stopping us from setting the path to the following?

    XDG_DATA_HOME: Path = Path(os.environ["SNAP_REAL_HOME"]).joinpath(".local", "share")

The default behavior of Snap apps is to not have access to hidden folders, but there are some exceptions. I suppose the decision not to use $SNAP_REAL_HOME/.local/share was for that reason.

However, I can't say whether they didn't use that location because it caused some problem with UMU within Snap, or if they didn't use that location to avoid problems with other Snap apps.

@Kyuyrii
Copy link
Author

Kyuyrii commented Jan 1, 2026

I made a modification that I think makes more sense.

It's now possible to define the location of the umu and Steam folders.

If it's not defined by the user or developer, it will use the default location, within XDG_DATA_HOME.

This solves the problem and gives more freedom.

@Kyuyrii Kyuyrii changed the title Changing the location of XDG_DATA_HOME when run in a Snap. Allow the user/developer to define the location of the umu and Steam folders Jan 1, 2026
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.

2 participants