mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.5k stars 370 forks source link

New X11docker Breaks KeepassXC's Clipboard Sharing with Host #484

Open matinraayai opened 1 year ago

matinraayai commented 1 year ago

Problem

Hello, I have a KeepassXC Docker container that worked fine in earlier versions of x11docker. I was able to copy passwords from the container to my host. KeepassXC was able to delete the copied password after 10 seconds. The clipboard sharing is bidirectional. I use xsel to enable clipboard sharing.

After I updated the x11docker on my host recently, every time I try to copy an entry from the container I cannot copy and paste anything on my host system. I can't even view the content of my clipboard. Anything related to clipboard freezes when I do this, until I kill the container.

I noticed that some new capabilities regarding the --clipboard option was added recently. So I'm wondering if this has something to do with it.

The verbose log complains that some extensions for xlib is missing, but they all seem to be installed, at least inside the container.

My system Info

Dockerfile

FROM debian:bookworm-slim
LABEL maintainer="Matin Raayai Ardakani raayaiardakani.m@northeastern.edu"

RUN apt-get update && apt-get upgrade -y keepassxc \
    && rm -rf /var/lib/apt/lists/* && apt-get clean 
CMD ["keepassxc"]

Command Used to Run the Container

x11docker --name=keepassxc --gpu --clipboard --home --  -- keepassxc

Partial Log When I try to Copy/Paste

==> /home/matinr/.cache/x11docker/825321525224-keepassxc/share/stderr <==
qt.qpa.xcb: XKeyboard extension not present on the X server

==> /home/matinr/.cache/x11docker/825321525224-keepassxc/share/container.log <==
qt.qpa.xcb: XKeyboard extension not present on the X server

DEBUGNOTE[13:55:36,454]: containerrc: HOME is not empty. Not copying from /etc/skel
Xlib:  extension "XInputExtension" missing on display ":0".

==> /home/matinr/.cache/x11docker/825321525224-keepassxc/share/stderr <==
Xlib:  extension "XInputExtension" missing on display ":0".

==> /home/matinr/.cache/x11docker/825321525224-keepassxc/share/container.log <==
Xlib:  extension "XInputExtension" missing on display ":0".

qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1081, resource id: 10485762, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1082, resource id: 10485762, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1085, resource id: 10485762, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1086, resource id: 10485762, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1089, resource id: 29360190, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1090, resource id: 29360190, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1093, resource id: 4194318, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1094, resource id: 4194318, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1097, resource id: 79691788, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1098, resource id: 79691788, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 10 (BadAccess), sequence: 1101, resource id: 75497484, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1102, resource id: 75497484, major code: 25 (SendEvent), minor code: 0

Link to Full Log

https://gist.github.com/matinraayai/3ff1134ca8d517b48b060d6f95ebee92

matinraayai commented 1 year ago

Upon further investigation, it seems that more than one application gets affected by this. GNOME Evolution and QEMU virt-manager also suffer from the clipboard issue.

mviereck commented 1 year ago

Sorry for my late and short response. x11docker does not support xsel anymore. Please install xclip and try again. x11docker should print a message about missing xclip if it is not installed.

mviereck commented 1 year ago

I had a look in the log, x11docker checks for xclip but does not print a missing message. I'll have to fix that.

matinraayai commented 1 year ago

Actually it seems I also have xclip installed so there isn't a missing message problem.