Open AndreasAZiegler opened 3 years ago
I can't reproduce any of these issues testing rocker --x11 ubuntu
The X11 plugin only adds some extra runtime mounting devices. Are you running an X based terminal on top?
Please provide the full set of commands that you're running to produce this problem. And possibly a recording of the behavior. Also any information about your keyboard setup.
Thanks @tfoote for investigating this issue.
My problem comes from the fact that TERM
is not set. The problem is now, that if I set TERM
with
rocker --nvidia --x11 --user --home --privileged --env TERM=xterm --volume /dev/bus/usb:/dev/bus/usb --volume
/data:/data -- prophesee-ros
this results in
docker run --rm -it -e TERM=xterm -v /home/ziegler:/home/ziegler --gpus all --privileged -v /dev/bus/usb:/dev/bus/usb -v /data:/data -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 -e XAUTHORITY=/tmp/.docker4k4p15ro.xauth -v /tmp/.docker4k4p15ro.xauth:/tmp/.docker4k4p15ro.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro 5ba210881fbd
and therefore, TERM
is not set as it is overwritten. My workaround is to set TERM
manually with export TERM=xterm
, but this is obviously annoying. Is there a way to set TERM
without having it overwritten?
Currently there's not. When injecting the argument here: https://github.com/osrf/rocker/blob/acbbff59d6aef6a9654eabc0ff7e3f823936d6e3/src/rocker/nvidia_extension.py#L49 it would need to be able to check for other environment variables set and only set it if unset.
There's a possibilty that you could use parameter substitutions: https://unix.stackexchange.com/a/122848/83370
However looking back at it, the x11 is passing through your host TERM settings. So the trivial solution is to prepend TERM=xterm
to your command like this. Or set your TERM variable in your environment.
TERM=xterm rocker --nvidia --x11 --user --home --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /data:/data -- prophesee-ros
Also https://github.com/osrf/rocker/pull/130 might help with this issue too, but putting the user envs later in the evaluation logic.
When I start rocker with the
--x11
option, I observe the following unexpected behavior:ziegler@c729.......:/$ aziegler@c7s9.....:/$ a
wherea
is the key I pressed before the left arrow key