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 trouble : Periodical incorrect xclip detection (with screenshots) #1752

Open
xintrea opened this issue Jun 30, 2020 · 12 comments
Open

Comments

@xintrea
Copy link

xintrea commented Jun 30, 2020

Description of the problem or steps to reproduce

This bug has been present in the program since the very first versions. It appears in Debian 8, Debian 9 on KDE, LXDE, LxQt DE in any terminal: Konsole, LXTerminal.

Now I was able to capture the bug in the screenshots.

The bug is that from time to time copying text to the clipboard stops working. Apparently, the problem is that Micro at some points in time can not determine that the xclip program is installed. And when Micro "does not see" xclip, the editor does not copy text to the clipboard.

I am showing two screenshots. The first screenshot shows that the clipboard has stopped working, copying is not possible. In the status bar, the inscription "Copied selection (install xclip for external clipboard)" is visible. Moreover, the xclip package is already on the system.

http://i.piccy.info/i9/9bf3158b823c3d0f611334672aa51051/1593531442/165614/1358362/micro_editor_xclip_dont_work.png

The second screenshot was taken after 5 minutes. It shows that there is no warning about installing xclip. And copying to the clipboard is working fine.

http://i.piccy.info/i9/4c24e0f457edb4cbf29993793fc724a2/1593531478/100130/1358362/micro_editor_xclip_work.png

This is similar to the fact that for some reason the automatic detection of the presence of the xclip program in the system does not work from time to time. It should be fixed.

This bug is very annoying, and because of it it is impossible to use the editor normally.

Specifications

Version: 2.0.6
Commit hash: 60846f5
OS: Debian Linux 9
Terminal: Konsole, LXTerminal

@zyedidia
Copy link
Owner

zyedidia commented Jul 1, 2020

When you say that it was working after 5 minutes, did you close micro in between or is it the same instance after 5 minutes?

I think the cause of this issue might be that if the clipboard is empty (i.e. fresh system start, or clipboard was somehow cleared), micro thinks that xclip is not installed/working. Do you think that is consistent with the issue you are seeing?

zyedidia added a commit that referenced this issue Jul 1, 2020
@zyedidia
Copy link
Owner

zyedidia commented Jul 1, 2020

I have now fixed the bug where micro will think xclip is not installed if the clipboard is completely clean (xclip reports an error when reading from such a clipboard).

zyedidia added a commit that referenced this issue Jul 1, 2020
@xintrea
Copy link
Author

xintrea commented Jul 1, 2020

When you say that it was working after 5 minutes, did you close micro in between or is it the same instance after 5 minutes?

Yes, at this 5 minutes I quit the program many times and ran it again.

I think the cause of this issue might be that if the clipboard is empty (i.e. fresh system start, or clipboard was somehow cleared), micro thinks that xclip is not installed/working. Do you think that is consistent with the issue you are seeing?

I can not say exactly. It seems as if immediately after starting Linux, you start working in Micro without having to do anything with the clipboard, then copying to the clipboard works correctly, until a certain point.

@hitchhooker
Copy link

Screen Capture_xfce4-terminal_20200703023933
having same issue when connecting with ssh to ubuntu server with micro and xclip installed.

@zyedidia
Copy link
Owner

zyedidia commented Jul 3, 2020

@hitchhooker I think the issue you are experiencing is different. Copy-paste is difficult to make work over ssh because micro is running solely on the host machine, and therefore can't access your local machine's clipboard. If you copy and paste using your terminal rather than micro (usually Ctrl-shift-v and Ctrl-shift-c) then things might work. You can read all the details in the docs under > help copypaste.

@xintrea If possible, could you try using the latest nightly binaries (2.0.7-dev.8) and see if the issue still occurs?

@xintrea
Copy link
Author

xintrea commented Jul 3, 2020

having same issue when connecting with ssh to ubuntu server with micro and xclip installed.

You must use the option -X for SSH:

ssh -l userName -X myHost.org

This option transfers the clipboard between local host and remote host.

@xintrea
Copy link
Author

xintrea commented Jul 3, 2020

@xintrea If possible, could you try using the latest nightly binaries (2.0.7-dev.8) and see if the issue still occurs?

Where is get nightly binaries?

@hitchhooker
Copy link

having same issue when connecting with ssh to ubuntu server with micro and xclip installed.

You must use the option -X for SSH:

ssh -l userName -X myHost.org

This option transfers the clipboard between local host and remote host.

Seems like error msg about xclip not existing disappears and is replaced by lag and nothing happening.

not sure about that exact binaries but managed to install 2.0.7-dev.10 by cloning master branch and installing

git clone https://github.com/zyedidia/micro
cd micro
make build
sudo mv micro /usr/local/bin # optional

@zyedidia
Copy link
Owner

zyedidia commented Jul 3, 2020

You can find the nightly build here.

@xintrea
Copy link
Author

xintrea commented Jul 3, 2020

You can find the nightly build here.

Hmm... I don't understand. I am report this bug at 3 days ago. But at your page:

zyedidia released this 17 days ago · 37 commits to master since this release

This is correct nightly build?

@zyedidia
Copy link
Owner

zyedidia commented Jul 3, 2020

Yes, you can see that the assets have the correct version. I update the assets regularly (in the description you can see it says the assets were uploaded on July 1), but the release itself is from 17 days ago to avoid spamming people with a new release every night (some people have signed up to get an email from GitHub every time there is a new release).

@xintrea
Copy link
Author

xintrea commented Jul 8, 2020

@xintrea If possible, could you try using the latest nightly binaries (2.0.7-dev.8) and see if the issue still occurs?

I am try working with this release in terminal SSH mode. Copy-paste working, but, approximately once in two hours, copy-paste at some point ceased to work, even within the remote machine side only. Helped exit the editor and restart it.

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

3 participants