Adherence to XDG Base Specification #68
Replies: 4 comments 6 replies
-
|
While, admittedly, I don't have much skin in this game. Of course I'd vote we use this standard in some way, since like you said allowing users better control over their systems should be a priority. But otherwise it likely will be much simpler to use a single directory. Because then we just worry about setting And personally I'd vote that to me, the config directory makes since. Since really no matter what that folder will contain a config. It won't always contain packages, unless the user installs them. So to me that seems like the right choice |
Beta Was this translation helpful? Give feedback.
-
|
I wonder if we could/should at look at implementing https://github.com/folder/xdg. It deals with all major OS paths, not just XDG on Linux. |
Beta Was this translation helpful? Give feedback.
-
|
Hello! I'm curious if there's been any more progress/discussion on making Pulsar XDG Base Directory Specification compliant, or at least exposing configuration to make it optional? I recently switched over from VSCode, and I found this discussion while looking for a way to clean the One thing to note on this topic:
If your goal is to be compliant with the XDG spec, then you must split the files into their relevant directories. To do otherwise would not be following the spec, which defines certain kinds of contents for each base dir, and as magenta404 pointed out, some people manage their XDG base dirs differently depending on the type of data expected to be there, such as inclusion or exclusion from backups/version control, placing them on different file systems (e.g. using a tmpfs mount for
Electron/Chromium's default of placing cache files in |
Beta Was this translation helpful? Give feedback.
-
|
I don't think much has been done since then unfortunately. I had been making a draft PR as a proof of concept (pulsar-edit/pulsar#390) but I'm not somebody who has the level of programming skill or knowledge of the overall app base to make this kind of change without support. The tiny thing I changed here works but adding or editing specs and tests, making sure we find any hard coded references or breaking existing packages etc. etc. Back when this was written we were probably being more conservative with our the scope of our changes - the focus was on the big problems like supporting infrastructure (website, package backend etc.) and moving to modern and supported versions of node and electron so I think this could obtain more traction now if we were to push for it. And if we were to do this it makes sense to do it properly and not just half-arse it by throwing the whole lot into one place - for example if we take what is in my
That is just a very quick overview having just scanned through this quickly and seeing what each one feels like it should be classed as. It does seem that there has at least been some development in this area in Electron which should make things easier to implement without hard coding the It seems the only ones I can find that we actively use are:
Newer electron versions also have
Obviously the electron cache is the big blocker we don't have control over. Some of it should be Ultimately I don't know the "right" answer here, what we would probably need to is to:
Now there is one weird exception to this, at least with the official packages, in that the AppImage can actually create its own folders when using portable mode. If you make a folder in the same root as the AppImage with the same name as the AppImage but plus I'm adding this to my ever growing list of things to look at, I've just come back from a long hiatus from FOSS in general. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Started from this Discord conversation
So I'm almost certain this question will come up eventually so thought it best to pre-empt it seeing as it has frequently come up on the Joplin project.
Basically it seems that Pulsar (by way of Atom) has its Config folder set to
~/.atomon Linux (and macOS).This by itself isn't really an issue as such but there is mounting pressure for projects to correctly adhere to the XDG Base Directory Specification rather than forcing configuration files and application data to write to a specific location chosen by the developers.
Pulsar/Atom can already be made to adhere to it by exporting
ATOM_HOME:export ATOM_HOME="$XDG_CONFIG_HOME"/atom(and the same forapm).There are a few benefits to supporting the XDG spec:
We are at a point, being at the very start of the project really, where we could look at implementing this with as little impact on users as possible.
There are potentially a few things we would need to look out for, such as any quirks or clashes with the portable mode.
One thing of note is that Electron by default already does seem to support
$XDG_CONFIG_HOMEas this is where it will write theAtomelectron cache (~/.config/Atom) and it does change location depending on the location of your$XDG_CONFIG_HOME.The other question is, what is actually the correct place. You will note that both the Arch wiki page on the topic recommends setting
ATOM_HOMEto$XDG_DATA_HOMErather than$XDG_CONFIG_HOMEas does the Flatpak script above.So either we would need consensus as to which is correct or we look at splitting the current
.pulsardirectory between them to support both data (packages in particular) and config files in different places.Another alternative is that we put the
~/.pulsarinside the existing$XDG_CONFIG_HOME/PulsarElectron cache folder - which is exactly what VSCode seems to do. Then we only have one folder to worry about and not two.There are a few more resources if you want to have a look at other info or conversations on the topic.
Beta Was this translation helpful? Give feedback.
All reactions