From 3c18a1e2dbc6d11252675807f45b239a484f405b Mon Sep 17 00:00:00 2001 From: Bastian Hofmann Date: Tue, 27 Jun 2023 14:24:44 +0200 Subject: [PATCH] Better env handling --- build_ros/entrypoint.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build_ros/entrypoint.sh b/build_ros/entrypoint.sh index 60f81ce..3e2915e 100755 --- a/build_ros/entrypoint.sh +++ b/build_ros/entrypoint.sh @@ -29,11 +29,10 @@ if [ ! -f /home/ros/.ssh/id_rsa ]; then fi echo "ros:ros" | chpasswd -su ros -c "printf 'source /opt/ros/$ROS_DISTRO/setup.bash\nsource /home/ros/workspace/install/setup.bash' > ~/.rosrc" -printf "export DISPLAY=$DISPLAY" > /etc/profile.d/display.sh -printf "export XAUTHORITY=$XAUTHORITY" > /etc/profile.d/xauth.sh -chmod +x /etc/profile.d/display.sh -chmod +x /etc/profile.d/xauth.sh +su ros -c "printf 'source /opt/ros/$ROS_DISTRO/setup.bash +source /home/ros/workspace/install/setup.bash +export DISPLAY=$DISPLAY +export XAUTHORITY=$XAUTHORITY' > ~/.rosrc" echo "Ready to connect."