jybaek / translate-in-terminal

A terminal version of Google Translator.
MIT License
9 stars 2 forks source link

The clipboard does not work in docker. #6

Open tyhan opened 5 years ago

tyhan commented 5 years ago

The clipboard does not work in docker. ( related with #2 )

$ docker run terminal_translator -c     
usage: translate [-h] [-c] [-d] [data [data ...]]
translate: error: 
    This error should only appear on Linux (not Windows or Mac). 
    You can fix this by installing one of the copy/paste mechanisms:

    sudo apt-get install xsel to install the xsel utility.
    sudo apt-get install xclip to install the xclip utility.
    pip install gtk to install the gtk Python module.
    pip install PyQt4 to install the PyQt4 Python module.
RavenKyu commented 5 years ago

I found a way to solve it. But I think we can't use this way. It needs Xserver for sharing clipboard. https://github.com/mviereck/x11docker/blob/5633f7dcf190cfb4938589b70a3000f6d5a90359/x11docker#L1620