Skip to content

Conversation

@kossebau
Copy link
Contributor

No description provided.

@probonopd
Copy link
Member

probonopd commented Dec 30, 2018

I think we cannot retroactively change this without negatively affecting users because existing scripts are already relying on $HOME/.local/share.

https://github.com/search?utf8=%E2%9C%93&q=%22%24HOME%2F.local%2Fshare%2F%24VENDORPREFIX%2Fno_desktopintegration%22&type=Code

At least 56 projects are already relying on the currently specified location. (Gosh, do I love GitHub full text search - how cool is it that you can check if you break something in advance.)

Using $HOME/.local/share also makes the code easier and less error-prone (I have to admit that I dislike configurability because it adds complexity and makes the testing matrices larger).

@kossebau
Copy link
Contributor Author

kossebau commented Dec 30, 2018

I understand the little risk this change might bring.

But I would hope that those 56 projects are actively developed and might release new versions which have adapted that check. I have not seen XDG_DATA_HOME set that often, so chance that users will be affected might be low (they might have complained already otherwise, given that "broken software looks in the wrong place and ignores XDG_DATA_HOME").

Using the hard-coded $HOME/.local/share instead of the specified variable, which is otherwise well respected in lots of code, sends a bad signal IMHO to everyone one wants to work together on new specifications in the future :(

So I would rather go and fix the AppImage spec to comply with the XDG spec in this early phase, before a first released version of the spec has been released. After all, right now the spec is a draft, or?

@probonopd
Copy link
Member

probonopd commented Dec 30, 2018

After all, right now the spec is a draft, or?

There you have a point. For reasons exactly like this.

Can we have it check both places?

@shoogle
Copy link
Contributor

shoogle commented Dec 31, 2018

+1 for following the XDG Base Directory Specification. By the way, the spec says:

If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

So switching to $XDG_DATA_HOME and specifying $HOME/.local/share as a fallback should do the trick.

@TheAssassin
Copy link
Member

I am with @kossebau here, the change shouldn't significantly break stuff. Many tools using AppImages use XDG_DATA_HOME already.

Copy link
Member

@TheAssassin TheAssassin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support merging this.

@probonopd
Copy link
Member

Can we explicitly add a pointer to

If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used

@kossebau? Just to ensure that implementers don't forget this important detail. Thanks!

@TheAssassin
Copy link
Member

@probonopd just add a link to the XDG spec, as that's defined by them, and that way the information doesn't look like an invention of us.

@probonopd
Copy link
Member

Yes, something like "Please especially note that as per the XDG spec, If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used".

@Samueru-sama
Copy link

I voice my support for this, many appimage related applications already support the XDG spec, and at AM we even went beyond and started supporting $XDG_BIN_HOME even though it is not in the spec.

It should be as simple as changing this, for example changing:

$HOME/.local/share/appimagekit/no_desktopintegration

for

${XDG_DATA_HOME:-$HOME/.local/share}/appimagekit/no_desktopintegration

No need to make a separate line for each instance where a XDG variable is applicable.

@probonopd probonopd merged commit f1631a2 into AppImage:master Aug 9, 2024
The software inside the [AppImage] **SHOULD NOT** attempt to do desktop integration if at least one of the following conditions are met:

* A file `$HOME/.local/share/appimagekit/no_desktopintegration` exists on the [target system]
* A file `$XDG_DATA_HOME/appimagekit/no_desktopintegration` exists on the [target system] (with `$XDG_DATA_HOME` as defined in the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does libappimage respect this file? I don't think we ever implemented this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I guess then it needs to be updated.

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.

5 participants