Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard Doesn't Work Between Host and Container Properly. #1631

Open
zebra-f opened this issue Dec 10, 2024 · 1 comment
Open

Clipboard Doesn't Work Between Host and Container Properly. #1631

zebra-f opened this issue Dec 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zebra-f
Copy link

zebra-f commented Dec 10, 2024

To be fair I don't know what's the best to report this issue.

Describe the bug
I can't paste from the host's clipboard into Neovim running inside an Ubuntu container. I have also tried using $ xclip -o, but the same issue occurs. There are exceptions: whenever I copy something from Discord (*F), Gimp (*F), Spotify (*F), or Steam (*F), it will be available inside the container. Both $ xclip -o and Neovim can access this content. However, copying from other applications, such as Firefox (*F), Easy Effects (*F), Neovim (separate process, *F), KWrite, System Settings, or Konsole, doesn't show up inside the container.
I have also tried copying with Ctrl+C and Mouse.
Xclip shows this error:

$ xclip -o
Error: target STRING not available

(*F - installed via Flatpak.)

Whenever I yank something in Neovim running within the container, it will be available in the host's clipboard, so there is no issue in that direction.

Are you using Podman, Docker, or Lilipod? Podman.
Which version of Podman, Docker, or Lilipod? Podman 5.3.1.
Which version of Distrobox? Distrobox 1.8.0
Which host distribution? Fedora (41) Kinoite, KDE Plasma Version 6.2.4, Wayland.
How did you install Distrobox? Came preinstalled.

How can I fix this issue?

@zebra-f zebra-f added the bug Something isn't working label Dec 10, 2024
@zebra-f
Copy link
Author

zebra-f commented Dec 11, 2024

Solved.
In Fedora container, when installing Neovim, it asks for permission to install dependencies:

Installing:
 neovim                                          x86_64       0.10.2-1.fc41                                     fedora                     29.1 MiB
Installing dependencies:
 binutils                                        x86_64       2.43.1-4.fc41                                     updates                    27.5 MiB
 compat-lua-libs                                 x86_64       5.1.5-26.fc41                                     fedora                    498.2 KiB
 cpp                                             x86_64       14.2.1-3.fc41                                     fedora                     35.0 MiB
 desktop-file-utils                              x86_64       0.27-2.fc41                                       fedora                    230.4 KiB
 emacs-filesystem                                noarch       1:30.0-3.fc41                                     fedora                      0.0   B
 gcc                                              x86_64       14.2.1-3.fc41                                     fedora                    104.3 MiB
 glibc-devel                                     x86_64       2.40-12.fc41                                      updates                     2.3 MiB
 kernel-headers                                  x86_64       6.11.3-300.fc41                                   fedora                      6.4 MiB
 libluv                                          x86_64       1.48.0.2-2.fc41                                   fedora                    207.9 KiB
 libmpc                                          x86_64       1.3.1-6.fc41                                      fedora                    164.7 KiB
 libstdc++-devel                                 x86_64       14.2.1-3.fc41                                     fedora                     15.4 MiB
 libtree-sitter                                  x86_64       0.23.0-2.fc41                                     fedora                    213.4 KiB
 libuv                                           x86_64       1:1.49.2-1.fc41                                   updates                   565.0 KiB
 libvterm                                        x86_64       0.3.3-4.fc41                                      fedora                     78.2 KiB
 libxcrypt-devel                                 x86_64       4.4.36-11.fc41                                    updates                    30.5 KiB
 lua5.1-lpeg                                     x86_64       1.1.0-2.fc41                                      fedora                     67.2 KiB
 luajit                                          x86_64       2.1.1720049189-1.fc41                             fedora                      1.4 MiB
 luajit2.1-luv                                   x86_64       1.48.0.2-2.fc41                                   fedora                    190.9 KiB
 make                                            x86_64       1:4.4.1-8.fc41                                    fedora                      1.8 MiB
 msgpack                                         x86_64       3.1.0-16.fc41                                     fedora                     59.3 KiB
 nodejs-libs                                     x86_64       1:22.11.0-2.fc41                                  updates                    74.3 MiB
 unibilium                                       x86_64       2.1.1-8.fc41                                      fedora                     69.8 KiB
Installing weak dependencies:
 gcc-c++                                         x86_64       14.2.1-3.fc41                                     fedora                     38.2 MiB
 mailcap                                         noarch       2.1.54-7.fc41                                     fedora                     86.0 KiB
 nodejs                                          x86_64       1:22.11.0-2.fc41                                  updates                   149.7 KiB
 nodejs-docs                                     noarch       1:22.11.0-2.fc41                                  updates                    91.9 MiB
 nodejs-full-i18n                                x86_64       1:22.11.0-2.fc41                                  updates                    29.3 MiB
 nodejs-npm                                      x86_64       1:10.9.0-1.22.11.0.2.fc41                         updates                     9.4 MiB
 ripgrep                                         x86_64       14.1.1-1.fc41                                     updates                     4.7 MiB
 tree-sitter-cli                                 x86_64       0.23.2-1.fc41                                     updates                    12.4 MiB
 wl-clipboard                                    x86_64       2.2.1-3.fc41                                      fedora                    140.9 KiB
 xdg-utils                                       noarch       1.2.1-2.fc41                                      fedora                    346.3 KiB
 xsel

I noticed wl-clipboard, installing it via apt in a Ubuntu container solves the issue for Neovim (not for xclip).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant