Add XDG user directories and env variables
This patch adds the rest of XDG user directories as per XDG base directory specification. https://wiki.archlinux.org/index.php/XDG_Base_Directory This fixes launching anbox on sxmo. Furthermore, it makes sure $XDG_RUNTIME_HOME has the correct permissions. Signed-off-by: Miles Alan <m@milesalan.com>
This commit is contained in:
parent
d4cb102c85
commit
92e185b888
1 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,15 @@ envvars() {
|
||||||
command -v "$EDITOR" || export EDITOR=vis
|
command -v "$EDITOR" || export EDITOR=vis
|
||||||
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
|
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
|
||||||
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config
|
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config
|
||||||
|
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME=~/.cache
|
||||||
|
[ -z "$XDG_DATA_HOME" ] && export XDG_DATA_HOME=~/.local/share
|
||||||
|
[ -z "$XDG_RUNTIME_HOME" ] && export XDG_RUNTIME_HOME=~/.local/run
|
||||||
|
}
|
||||||
|
|
||||||
|
setupxdgruntimedir() {
|
||||||
|
mkdir -p $XDG_RUNTIME_HOME
|
||||||
|
chmod 700 $XDG_RUNTIME_HOME
|
||||||
|
chown "$USER:$USER" "$XDG_RUNTIME_HOME"
|
||||||
}
|
}
|
||||||
|
|
||||||
xdefaults() {
|
xdefaults() {
|
||||||
|
@ -54,6 +63,7 @@ startdwm() {
|
||||||
|
|
||||||
xinit() {
|
xinit() {
|
||||||
envvars
|
envvars
|
||||||
|
setupxdgruntimedir
|
||||||
xdefaults
|
xdefaults
|
||||||
daemons
|
daemons
|
||||||
startdwm
|
startdwm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue