tconbeer / harlequin

The SQL IDE for Your Terminal.
https://harlequin.sh
MIT License
3.58k stars 79 forks source link

Error copying data to system clipboard in docker container #430

Closed ErikXu closed 7 months ago

ErikXu commented 7 months ago

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

To Reproduce

FROM python:3.11

RUN pip install harlequin-mysql
docker build -t harlequin-mysql:latest -f ./Dockerfile .
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"

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?

For example, for my system, these are:

tconbeer commented 7 months ago

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

tconbeer commented 7 months ago

(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)