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

Ctrl + C is not updating the clipboard. #6

Open
calandoa opened this issue Sep 6, 2021 · 8 comments
Open

Ctrl + C is not updating the clipboard. #6

calandoa opened this issue Sep 6, 2021 · 8 comments

Comments

@calandoa
Copy link

calandoa commented Sep 6, 2021

I select with shift + arrows some words, I press Ctrl + C, I can see the Copied. message in the status bar, but the clipboard (primay or clipboard) is not updated. Same with Ctrl + X : Cut. is shown, the selection is deleted, but the clipbord is not updated.

I am using Ubuntu 18.04.5 LTS with XFCE 4.12.

I have these settings :

LANG=en_US.UTF-8
LANGUAGE=en_US:
> setxkbmap -query
rules:      evdev
model:      pc105
layout:     us
variant:    altgr-intl
@calandoa
Copy link
Author

calandoa commented Sep 6, 2021

Also, I am using xterm:

TERM=xterm
XTERM_LOCALE=en_US.UTF-8
XTERM_SHELL=/bin/zsh
XTERM_VERSION='XTerm(330)'

@ahmednooor
Copy link
Owner

@calandoa
I am using copypasta lib for accessing OS clipboard. As of now it only supports wayland and x11 clipboards (see: https://docs.rs/copypasta/0.7.1/copypasta/). I am not much of a deep systems person so pardon me if I am wrong but maybe it is because xfce under the hood, doesn't use x11 or wayland clipboard and instead has its own implementation? Can you conform? Thanks.

@calandoa
Copy link
Author

XFCE use the standard X11 clipboard system. Unfortunately XFCE is the only manager I have on my system so I cannot try with another one. I also tried with gnome-terminal and I get the same problem.

ahmednooor added a commit that referenced this issue Sep 22, 2021
@ahmednooor
Copy link
Owner

Seems like a missing library. I am using copypasta for clipboard access, this lib is a fork of rust-clipboard which requires the xorg-dev lib to be installed.

Please check the links below for further.
[WARNING]: Steps mentioned in the links below, might break your OS. So please proceed with caution.

https://github.com/ahmednooor/lino/tree/main#build

copypasta

rust-clipboard prerequisites

I have also created a separate branch with the name issue-6 in which I have commented out accessing the OS clipboard manager. Please clone and run that and share the findings.

Thanks.

@calandoa
Copy link
Author

So I installed xorg-dev, I checked out issue-6, I built and ran with cargo run... and I can copy and paste stuff internally. So the culprit seem to be the library again.

@ahmednooor
Copy link
Owner

Thank you. Try to build and run the main branch as well and see if installing xorg-dev fixed it or not.

@calandoa
Copy link
Author

Well, thanks to you for your work!

After installing xorg-dev and switching back to main, the copy/paste is working fine at the system level.

But afterwards, I tried to desinstall xorg-dev, clean, reboot and rebuild all to be sure... and it is still working!

I searched a bit and finally the difference is just building lino from the source (git clone) is working, but installing it directly with cargo install breaks the copy/paste. I did not investigate further, so maybe this is finally cargo the culprit.

@ahmednooor
Copy link
Owner

Thank you. That is quite strange. I am keeping this issue open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants