Set XDG_RUNTIME_DIR if needed
This commit is contained in:
parent
85b083a4b2
commit
9a6e567738
2 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@ export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||||
|
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp/.runtime-$(id -un)}"
|
||||||
|
|
||||||
# Locale and language.
|
# Locale and language.
|
||||||
## Clear the existing locale settings and set options I always want.
|
## Clear the existing locale settings and set options I always want.
|
||||||
|
|
|
@ -39,6 +39,7 @@ if [ ! -d "$XDG_DATA_HOME" ] ; then install -d -m 0700 "$XDG_DATA_HOME" ; fi
|
||||||
if [ ! -d "$XDG_CACHE_HOME" ] ; then install -d -m 0700 "$XDG_CACHE_HOME" ; fi
|
if [ ! -d "$XDG_CACHE_HOME" ] ; then install -d -m 0700 "$XDG_CACHE_HOME" ; fi
|
||||||
if [ ! -d "$XDG_CONFIG_HOME" ] ; then install -d -m 0700 "$XDG_CONFIG_HOME" ; fi
|
if [ ! -d "$XDG_CONFIG_HOME" ] ; then install -d -m 0700 "$XDG_CONFIG_HOME" ; fi
|
||||||
if [ ! -d "$XDG_STATE_HOME" ] ; then install -d -m 0700 "$XDG_STATE_HOME" ; fi
|
if [ ! -d "$XDG_STATE_HOME" ] ; then install -d -m 0700 "$XDG_STATE_HOME" ; fi
|
||||||
|
if [ ! -d "$XDG_RUNTIME_DIR" ] ; then install -d -m 0700 "$XDG_RUNTIME_DIR" ; fi
|
||||||
if [ ! -d "$HOME/.local/bin" ] ; then install -d -m 0700 "$HOME/.local/bin" ; fi
|
if [ ! -d "$HOME/.local/bin" ] ; then install -d -m 0700 "$HOME/.local/bin" ; fi
|
||||||
|
|
||||||
_acp_add_path () {
|
_acp_add_path () {
|
||||||
|
@ -162,8 +163,8 @@ alias pruncerts='prun --volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro --volume /
|
||||||
|
|
||||||
if command -v ssh-agent > /dev/null
|
if command -v ssh-agent > /dev/null
|
||||||
then
|
then
|
||||||
export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-$XDG_STATE_HOME/ssh-agent.socket}"
|
export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-$XDG_RUNTIME_DIR/ssh-agent.socket}"
|
||||||
export SSH_AGENT_PID="${SSH_AGENT_PID:-$XDG_STATE_HOME/ssh-agent.pid}"
|
export SSH_AGENT_PID="${SSH_AGENT_PID:-$XDG_RUNTIME_DIR/ssh-agent.pid}"
|
||||||
if [ ! -S "$SSH_AUTH_SOCK" ]
|
if [ ! -S "$SSH_AUTH_SOCK" ]
|
||||||
then
|
then
|
||||||
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null
|
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null
|
||||||
|
|
Loading…
Reference in a new issue