Skip to content

Support XDG Base Dir Spec 0.8.#2129

Open
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
stefan11111:xorg-836
Open

Support XDG Base Dir Spec 0.8.#2129
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
stefan11111:xorg-836

Conversation

@stefan11111
Copy link
Contributor

This version of the spec (latest as of 27.12.2021) adds a variable $XDG_STATE_HOME that may be used for log files, as described:

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

The $XDG_STATE_HOME contains state data that should persist between
(application) restarts, but that is not important or portable enough to
the user that it should be stored in $XDG_DATA_HOME. It may contain:

actions history (logs, history, recently used files, …)
...

Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/836

This version of the spec (latest as of 27.12.2021) adds a variable
`$XDG_STATE_HOME` that may be used for log files, as described:

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

The $XDG_STATE_HOME contains state data that should persist between
(application) restarts, but that is not important or portable enough to
the user that it should be stored in $XDG_DATA_HOME. It may contain:

actions history (logs, history, recently used files, …)
...
```

- https://specifications.freedesktop.org/basedir/0.8/

Signed-off-by: Edênis Freindorfer Azevedo <edenisfa@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/836>
@github-actions
Copy link

Merge Conflict found

@cepelinas9000
Copy link
Contributor

I have nothing against it, maybe @NexusSfan or @artist4xlibre have comment. The point is with this change when XServer started as ordinary user. Default log directory changes from ~/.local/share/xorg to ~/.local/state/xorg

@NexusSfan
Copy link
Contributor

I do have ~/.local/state and see it being used (mostly for rc files but some are logs) but $XDG_STATE_HOME is not defined.

@Samueru-sama
Copy link

I do have ~/.local/state and see it being used (mostly for rc files but some are logs) but $XDG_STATE_HOME is not defined.

When XDG_STATE_HOME is not declared a default of ~/.local/state is used so that is correct.

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