Added DISPLAY to env.

Did you know echo cmd was unstable? I didn't.
This commit is contained in:
Bastian Hofmann 2022-09-28 16:09:49 +02:00
parent bbea59dc40
commit 44f9d1dd2a
2 changed files with 5 additions and 3 deletions

View File

@ -18,16 +18,19 @@ if [ "0" == "$(cat /home/ros/docker_image_version)" ]; then
echo "Created workspace"
su ros -c "cd /home/ros/workspace; colcon build --event-handlers console_cohesion+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja"
echo "Built workspace"
echo "1" > /home/ros/docker_image_version
printf "1" > /home/ros/docker_image_version
fi
if [ ! -f /home/ros/.ssh/id_rsa ]; then
su ros -c "ssh-keygen -N '' -f /home/ros/.ssh/id_rsa"
echo "Generated SSH Keys."
fi
echo "ros:ros" | chpasswd
su ros -c "echo 'source /opt/ros/$ROS_DISTRO/setup.bash\nsource /home/ros/workspace/install/setup.bash' > ~/.rosrc"
su ros -c "printf 'source /opt/ros/$ROS_DISTRO/setup.bash\nsource /home/ros/workspace/install/setup.bash' > ~/.rosrc"
printf "DISPLAY=$DISPLAY" > /etc/profile.d/display.sh
echo "Ready to connect."

View File

@ -26,7 +26,6 @@ for host in ${hosts[@]}; do
done
echo "Attaching."
echo "You are ready for shell access."
sudo docker-compose up
echo "Removing from xhost:"