Skip to content

Commit

Permalink
Merge pull request canonical#373 from simondeziel/XDG-variables-5.21-…
Browse files Browse the repository at this point in the history
…edge

Xdg variables (5.21-edge)
  • Loading branch information
tomponline authored Mar 14, 2024
2 parents a2a30bb + 5178fb4 commit 7e88786
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions snapcraft/wrappers/editor
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ run_cmd() {
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export HOME="${SNAP_REAL_HOME}"
export USER="${USERNAME}"
[ -z "${XDG_DATA_HOME:-}" ] && export XDG_DATA_HOME="${HOME}/.local/share/"
[ -z "${XDG_CONFIG_HOME:-}" ] && export XDG_CONFIG_HOME="${HOME}/.config/"
[ -z "${XDG_STATE_HOME:-}" ] && export XDG_STATE_HOME="${HOME}/.local/state/"

# shellcheck disable=SC2145
exec unshare --kill-child -U -m -p -r -f --root="/var/lib/snapd/hostfs/" "/bin/sh" -c "mount -t proc proc /proc 2>/dev/null || true; exec \"${CMD}\" \"$@\""
Expand Down
3 changes: 0 additions & 3 deletions snapcraft/wrappers/remote-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ run_cmd() {
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export HOME="${SNAP_REAL_HOME}"
export USER="${USERNAME}"
[ -z "${XDG_DATA_HOME:-}" ] && export XDG_DATA_HOME="${HOME}/.local/share/"
[ -z "${XDG_CONFIG_HOME:-}" ] && export XDG_CONFIG_HOME="${HOME}/.config/"
[ -z "${XDG_STATE_HOME:-}" ] && export XDG_STATE_HOME="${HOME}/.local/state/"

exec unshare -U -r chroot "/var/lib/snapd/hostfs/" "${CMD}" "$@"
}
Expand Down

0 comments on commit 7e88786

Please sign in to comment.