docker-baseimage-gui
docker-baseimage-gui copied to clipboard
Arrow keys do not work for terminal emulators
Arrow keys passed to the terminal emulator inside the docker image through NoVNC or VNC client does not work. The app shows ^[[A, ^[[B, ^[[C, or ^[[D instead.

It seems to be an issue with the terminal itself, which is not handling arrow keys properly. I tried with xterm and it works perfectly.
@jlesage Thank you for telling me that.
But It does occur to xterm and Debian 10. It can also be reproduced using xfce4-terminal, and it occurs no matter if you connect to it through Firefox, Chromium, or TigerVNC.
Dockerfile
FROM jlesage/baseimage-gui:debian-10
COPY startapp.sh /startapp.sh
RUN \
apt-get update && \
apt-get install -y xterm
ENV APP_NAME="Testarrow"
startapp.sh
#!/bin/sh
exec /usr/bin/xterm
start.sh
#!/usr/bin/env sh
docker build -t docker-xterm .
docker run --rm -p 5800:5800 -p 5900:5900 docker-xterm
Should I try Alpine Linux instead?
Sorry for the delay. Alpine is working fine. If you want to stick with Debian images, you can use the SHELL variable to set the shell to be used by xterm. So for example, your startapp.sh could be:
#!/bin/sh
export SHELL=/bin/bash
exec /usr/bin/xterm
Closing this issue. Please re-open if needed.