MOC should use the XDG directories


As I get “Your submission has triggered the spam filter and will not be accepted.” when I post the content of my bug report, I have hosted my request here:

Link Mauve

I've been trying to figure out whether the XDG specification
to which you link is actually relevant to console-based text
applications (which MOC is, albeit often run in an xterm window).
The specification gives no indication of the environment to which
it is applicable, but its origins in XDG/ suggests
it's not.

In particular, the specification of $XDG_RUNTIME_DIR says that:

"The lifetime of the directory MUST be bound to the user being
logged in. It MUST be created when the user first logs in and if
the user fully logs out the directory MUST be removed."

That would make it difficult for the MOC server to survive user
logout as a daemon if it were to follow the $XDG_RUNTIME_DIR's
intended use as:

"... the base directory [under which] runtime files ... such as
sockets, named pipes ... should be stored."

Many console programs are XDG compliant (ranger/ncmpcpp etc...) because the XDG specs bring benefits whatever the usecase.

"That would make it difficult for the MOC server to survive user
logout as a daemon if it were to follow the $XDG_RUNTIME_DIR's
intended use as."
Isn't it expected behavior ?

At least "last_directory" and "playlist.m3u" could go to XDG_CACHE_HOME. (along with softmixer / equalizer ?)

After the length of time since the original post, I'll have to re-read the linked pages to refresh my memory.

Home directory pollution is becoming a nightmare ;) I agree that XDG is usually beneficial even for console programs. They are not required to follow those guidelines but they can.

I wouldn't like MOC to move its files to new locations, I have already old paths memorized very well. However most people now would expect to find cached data in ~/.cache, settings in ~/.config and so on. I don't know where the socket should go in this setting since, as you noticed, the usual place might not (or isn't supposed to) survive X environment restart. Some programs put files like these in in /tmp/username-mocp.socket.

So, from my personal point of view I would be against, but from a theoretical point of view, I would be for it :)

I concur with what has been said.
XDG standards is really helpful in having a less cluttered home, and also for doing backups: you can just save $XDG_CONFIG_HOME (eventually XDG_DATA_HOME as well) instead of copying the cache etc...
Also I use git and it's easier to track my config files when they follow xdg standards.