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

~/.var should be moved to ~/.local/var #1651

Closed
Tids opened this issue May 6, 2018 · 12 comments

Comments

Projects
None yet
8 participants
@Tids
Copy link

commented May 6, 2018

According to https://github.com/flatpak/flatpak/wiki/Filesystem ~/.var is for

In addition to /app and /usr, each application sandbox gets a per-app data directory mounted which persists over app upgrades. It is stored as a subdirectory of the $HOME/.var/app directory (e.g. $HOME/.var/app/org.gnome.GEdit/). The $XDG_DATA_HOME, $XDG_CONFIG_HOME and $XDG_CACHE_HOME environment variables are set to point at data/, config/ and cache/ subdirectories respectively in this location.

So it's a Data directory, wich means it itself belongs to:

$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

So ~/.var really should be moved to $XDG_DATA_HOME/var | ~/.local/share/var

On top of that it also looks wrong to have this in there and I think in the long run, this is a bit of a hold-back for flatpak.

Edit: #1651 (comment)

@bogdancovaciu

This comment has been minimized.

Copy link

commented May 6, 2018

Just came by to confirm/support what @Tids was mentioning, hopefully something will be done regarding this.
Cheers!

@TingPing

This comment has been minimized.

Copy link
Member

commented May 6, 2018

It isn't really "a data directory". It contains configs, caches, and data for all apps. I'm not sure it fits anywhere into XDG nicely. You might argue that if it is supposed to be like /var that it belongs in ~/.local/var, dunno.

@Tids

This comment has been minimized.

Copy link
Author

commented May 6, 2018

~/.local/var looks indeed like a much better place.

@Tids Tids changed the title ~/.var should be in $XDG_DATA_HOME/var | ~/.local/share/var ~/.var should be moved to ~/.local/var May 9, 2018

@larchunix

This comment has been minimized.

Copy link

commented May 13, 2018

Seems similar to #46 which has been rejected, so I guess it is unlikely to happen.

@soc

This comment has been minimized.

Copy link

commented Jun 11, 2018

Also replace "var" with "flatpak", but see flatpak/flatpak.github.io#191.

@Tids

This comment has been minimized.

Copy link
Author

commented Jun 11, 2018

@soc it would be ~/.local/var/flatpak.

@soc

This comment has been minimized.

Copy link

commented Jun 11, 2018

Maybe. Tbh, they should just follow the XDG spec instead of trying to hide that they are violating it. :-)
I always wondered what would happen if another application started dumping stuff into .var.

@matthiasclasen

This comment has been minimized.

Copy link
Collaborator

commented Jun 11, 2018

There is no actual problem here.

@Tids

This comment has been minimized.

Copy link
Author

commented Jun 11, 2018

For "No" problem, there are really many reports for this kind of thing.
In our company network for example we don't allow a .var directory inside users home. Because it's not part of the xdg specification. So flatpakbis not an option here. You guys really should consider to implement a switch via env var. So we can use it the way we want/need

@soc

This comment has been minimized.

Copy link

commented Jun 11, 2018

@Tids Agree. If you search for "XDG support" on GitHub it returns 6k results (that's a massive number, even if one removes some percentage of false positives).

I have also made my $HOME read-only because I'm tired of applications dumping their private data into $HOME. It's regrettable that an application that started as "xdg-app" is grossly violating XDG rules.

@falkTX

This comment has been minimized.

Copy link

commented Aug 14, 2018

Writing here to voice my opinion on this.
Really hope you can reconsider and allow to move the ~/.var dir to a more fitting place.

@alexlarsson

This comment has been minimized.

Copy link
Member

commented Aug 14, 2018

The ~/.var/app location for per-application data as reached after a long discussion, including with some of the developers of the xdg basedir spec. We never got to updating the spec for this, but that will happen eventually.

@flatpak flatpak locked as resolved and limited conversation to collaborators Aug 14, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.