From f9e0077b0bcab647dac98fce08699e2a4599d70a Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Wed, 22 Dec 2021 23:16:55 +0100 Subject: [PATCH] create: fix difference between HOME and PWD path resolution (#44) * 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 --- distrobox-create | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/distrobox-create b/distrobox-create index 960abebe95..6fe03ad6f7 100755 --- a/distrobox-create +++ b/distrobox-create @@ -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