athackst / vscode_ros2_workspace

A template for using VSCode as an IDE for ROS2 development.
https://althack.dev/vscode_ros2_workspace
Apache License 2.0
857 stars 177 forks source link

add xauthority for X11 permission issues #53

Closed SubaruArai closed 3 weeks ago

SubaruArai commented 1 year ago

Under a freshly installed fedora38, this template didn't work due to X11 authentication issues. While this PR should fix it, it needs to be tested with other configurations.

Although to be fair, this should work properly - it's basically the same logic as in osrf/rocker. See: https://github.com/osrf/rocker/blob/2b8d5abb18c829d22f290679b739dc53765198ad/src/rocker/nvidia_extension.py#L36

athackst commented 1 year ago

This doesn't quite work right for me.

I think because nmerge - is looking for a file that doesn't exist?

[3308 ms] Start: Run: /bin/sh -c if [ ! -f /tmp/.1pupkplp20mn9ec9445bfflqpf6b2eoceah3fpn8qv5nc4p0gcrb.xauth ]; then touch /tmp/.1pupkplp20mn9ec9445bfflqpf6b2eoceah3fpn8qv5nc4p0gcrb.xauth; fi && xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f /tmp/.1pupkplp20mn9ec9445bfflqpf6b2eoceah3fpn8qv5nc4p0gcrb.xauth nmerge -
xauth:  file /home/athackst/.Xauthority does not exist
xauth: (argv):1:  unable to read any entries from file "(stdin)"

You also might consider splitting this out into a shell script file and calling it instead of the command inline.

SubaruArai commented 1 year ago

Thanks, I'll check for the error and split into a shell script file.

athackst commented 3 weeks ago

I'm going to close this PR, feel free to re-open if you have updates