tconbeer/harlequin

Error copying data to system clipboard in docker container

ErikXu opened this issue · 2 comments

Describe the bug
Can not copy data to clipboard in docker container.

To Reproduce

  • Dockerfile
FROM python:3.11

RUN pip install harlequin-mysql
  • Build docker image
docker build -t harlequin-mysql:latest -f ./Dockerfile .
  • Run docker container
docker run --rm -it \
harlequin-mysql:latest \
harlequin -a mysql -h localhost -p 3306 -U root --password example --database dev

# or

docker run --rm -it \
harlequin-mysql:latest \
sh -c "harlequin -a mysql -h localhost -p 3306 -U root --password example --database dev"

# or

docker run --rm -it \
harlequin-mysql:latest \
bash -c "harlequin -a mysql -h localhost -p 3306 -U root --password example --database dev"
  • Execute Ctrl + C

image

Expected behavior
Should be able to copy and paste column data.

Actual behavior
A clear and concise description of what happened; please include screenshots or animated gifs of Harlequin if possible.

Please refer To Reproduce section.

Additional context
What is the output of harlequin --version?

harlequin, version 1.13.0

Installed Adapters:
  - mysql, version 0.1.2
  - duckdb, version 1.13.0
  - sqlite, version 1.13.0

What database adapter are you using with Harlequin? (Default is DuckDB)
MySQL

Can you tell us more about your system?

  • Terminal: MobaXterm

For example, for my system, these are:

  • Bash

I think this is expected -- you'll need an x window manager in your container to use a clipboard. See https://harlequin.sh/docs/troubleshooting/copying-and-pasting

(The docs are a little out of date; copying from the results viewer or data catalog now works the same way as copying from the query editor)