Skip to content

Commit

Permalink
create: fix difference between HOME and PWD path resolution (#44)
Browse files Browse the repository at this point in the history
* create: fix difference between HOME and PWD path resolution

* create: add home path for ostree systems

* create: use specific user home path for ostree systems
  • Loading branch information
89luca89 authored Dec 22, 2021
1 parent 1771ac9 commit f9e0077
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion distrobox-create
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,16 @@ generate_command() {
--volume /sys:/sys:rslave
--volume /tmp:/tmp:rslave"

# Mount also the /var/home dir on ostree based systems
if [ -d "/var/home/${container_user_name}" ]; then
result_command="${result_command}
--volume /var/home/${container_user_name}:/var/home/${container_user_name}:rslave"
fi

# Mount also the XDG_RUNTIME_DIR to ensure functionality of the apps.
if [ -d "/run/user/${container_user_uid}" ]; then
result_command="${result_command}
--volume /run/user/${container_user_uid}:/run/user/${container_user_uid}"
--volume /run/user/${container_user_uid}:/run/user/${container_user_uid}:rslave"
fi

# Find all the user's socket and mount them inside the container
Expand Down

0 comments on commit f9e0077

Please sign in to comment.