Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Is /var/xdg-app a typo? #82

Closed
trans opened this issue Aug 23, 2015 · 3 comments
Closed

Is /var/xdg-app a typo? #82

trans opened this issue Aug 23, 2015 · 3 comments

Comments

@trans
Copy link

trans commented Aug 23, 2015

In https://wiki.gnome.org/Projects/SandboxedApps there is line that says: "System-wide installations end up in /var/xdg-app, while..." but that location doesn't seem right, and seems to contradict prior explanation. Is it perhaps a mistake? And it is supposed to be "/usr/local/xdg-app", instead?

@trans trans changed the title Possible Typo? Is /var/xdg-app a typo? Aug 23, 2015
@alexlarsson
Copy link
Owner

I'm not sure what prior explanation you think it contradicts? We used to place the system wide installs of apps in /usr/share/xdg-app, but that is not a great place if you're using a read-only /usr, so instead we moved this to /var, which should always be writable.

@trans
Copy link
Author

trans commented Aug 24, 2015

​Under Concepts it reads, "Both runtimes and app bundles can be installed per-user and system-wide. With the way things are currently set up, per-user installations end up in $HOME/.local/share/xdg-app/ and system-wide installations in /usr/share/xdg-app."

/usr is only read-only to non-root users, so isn't that the proper system-wide install location according to FHS? Though maybe /usr/local/ makes more sense if it is done by hand rather than by the OS.

@alexlarsson
Copy link
Owner

Ah, thanks. I updated that reference to point to /var too.

Both /usr and /var are generally read-only to non-roots, in that sense they are the same. However, in recent years there has been a lot of work from various parties to have /usr be completely read-only, where any updates to the system would be an atomic switch to a new /usr. This can be done in many ways, such as loopback image mounts, btrfs snapshots, ostree-like hardlink farms, etc. This has been popularized by projects such as coreos and atomic, as well as nix.

In such a setup the installation of apps will be "separate" from the host os, and make more sense in /var (i.e. treat it like data).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants