-
Notifications
You must be signed in to change notification settings - Fork 177
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
Copy from far2l to other apps don't works on Wayland Labwc (Raspberry Pi Bookworm) [far2l v2.6.4-2024-12-29-9fb21334-beta] #2608
Comments
Note:
far2l try access to clipboard by Ctrl-C or Ctrl-Ins to copy and Ctrl-V or Shift-Ins to paste. Some of keys may be used in terminal emulator and not transferred to inside far2l (usually in such case terminal by Shift-Ins make bracketed paste - terminal itself get data from clipboard and send it to inside application as characters). far2l directly inside terminal could not access to clipboard: see Note about OSC52 after table in https://github.com/elfmz/far2l/#ui-backends
What far2l freezes: local far2l or remote far2l? Please give additional detail: screenshots |
Is OSC52 turned on in far2l? |
@qrp73 please show screenshots of pseudocommand |
The above results are taken with no clipboard manager. I also have a simple clipboard helper/manager based on wl-clipboard and I get the same issue with it. But I notice interesting thing. When I run local far2l and trying to copy text from it's text editor, the first attempt is ok, but the second fails and it leads to a frozen clipman2 process (my clipboard helper). Debugger shows that it is frozen on waiting data from stdin pipe. I didn't catch such behavior with usual text editors. I added 200 ms timeout on read operation and it solve the issue. But it seems something is going strange on copy/paste operations in far2l. I suspect this freeze may have similar root of cause with infinite wait for read operation. |
Important that you desktop local computer also based on Raspberry Pi with Wayland. If it possible please give info about situations:
|
No, far2l-TTY (from virtual terminal which can be accessed with Alt+Ctrl+F1) on Raspberry Pi with Wayland also fails
I will test it later |
This bug is also reproducible on X11. |
Is where any way to reproduce it on my Cinnamon desktop? |
The freezes began to occur after this commit: d1fed9a |
I also noticed that sometimes far2l may freeze when I press Enter to open a folder. Sometimes it can delay for 20-30 seconds and become unresponsive to keyboard input, but then it may unexpectedly unfreeze. Retrying the same action (pressing Enter on the same folder) usually works without any freeze, it happens with usual user folder, so it don't related to some special folder issues. This is a very annoying issue because it tends to happen unexpectedly. I am not sure if this is related to the copy/paste issue, but the freeze behavior appears similar. |
Workaround: after switching windows with ctrl+tab I managed to see dialog, same method works for selecting item. |
Solved the problem at least partially (no more freezing). There is a bug left: if you press ESC, the background is shown from host-far2l, this is wrong. But you can use it, everything works. Test it please! |
@unxed just tried to apply your patch for ConsoleOutput.cpp, and then tested remote far2l tty started from local far2l wx. And at a glance it works good, no freeze now, copy/paste works as expected. Also tested remote far2l tty started from local far2l tty running on virtual terminal, also works ok with no freeze. But for some unknown reason when I run local far2l --tty in wayland labwc desktop lxterminal, copy operation don't works. When I press Ctrl+Insert it just do nothing and clear current clipboard content. There is no freeze, just copy operation don't works (the same as before patch). While paste operation with Shift+Insert works ok. So, when I open far2l editor, I can paste text from other x11/wayland apps, but unable to copy/paste text within far2l editor. Could you please check it? At the same time when I run far2l --tty from a virtual terminal copy/paste works ok, but it don't see x11/wayland clipboard. While this difference for desktop lxterminal and virtual terminal is acceptable, I'm not sure why copy operation don't works in --tty mode on lxterminal. |
If you mean kernel console, try
This will help far2l to connect to XWayland to "see" clipboard. As for lxterminal, I will look into this. |
Could not reproduce the bug in lxterminal under Wayland in my Cinnamon. Probably, labwc-specific issue. Have you filled an issue to it's bug tracker? What do developers say? |
just checked Also tried But there is interesting difference, I should note that Copy/Paste operations works ok in |
What happens if you set terminal copy key combination to something different, like Alt+Ctrl+Ins, and then try Ctrl+Ins in far2l? Also, still waiting for far:about screen shot of far2l in lxterminal |
Just tested setting for For For Paste operation works ok on both terminals. Later I will try to add hook for clipboard to see what is going on with clipboard exactly in this scenario.
By the way, I'm not sure where is coming from this 850 / 1252 codepage? My system uses UTF8:
|
Just tested it on For For Paste operation works ok on both terminals. Also tested Here is far:about when running |
Thanks! Need to think a bit. |
Tried to reproduce on Ubuntu 24.04 (Wayland session, default). Still not reproduced. Unfortunately, I do not have Pi. Could you please suggest Distro/DE, where I could reproduce an issue on a common x86_64 PC? |
Just tried to add hook on wl_paste and see what happens. It appears, that when I pressing Ctrl+Insert for selected text in The same steps on |
Just tested it on Intel PC running on Linux Arch x64 with KDE Plasma desktop and it shows exactly the same issue for Copy operation in But interesting thing is that when I run Here is far:about from this Linux Arch x64 machine taken on |
Try to enable osc52 in far2l settings, interface section, and try to copy from far2l in alacritty once again. Also, please tell exact versions of Arch and Plasma. It would be great if you could provide virualbox or qemu image for testing as I had problems installing Arch to VM then I tried it last time. |
For some unknown reason, there is no such option: When I started far2l on Arch for the first time, it asked if I want to enable OSC52, I selected Yes, but it don't helps. Copy operation still not works in lxterminal and gnome-terminal.
I installed it manually from installation CD to USB stick. I do it by adding HDD device to VMWare virtual machine with using direct access to USB flash drive instead of hdd image file. Then I boot from this USB stick and installed video driver and other software. Plasma installed with pacman from the main arch repository. |
Thanks! Please: try in alacritty with
OSC52 setting should appear in Interface config section. Check that it is on. Try to copy something. |
OSC52 was disabled, I enable it, but it don't helps. |
Tested far2l as follows:
Worked as expected. To dig into it deeper I need to reproduce it somehow. I have Mint with Cinnamon, and vanilla Ubuntu 24.04 and KUbuntu 24.10 in VMs. By the way, as temporary solution, I recommend trying
Sample SCRIPT for WSL is here: I don't have version for wayland for now, but it should be easy to adopt it to Wayland using This is ai-generated adoption, you can try it first:
|
As I know using |
To start implementing something I need firstly to reproduce an issue and understand it's reasons. Btw, does your environment have XWayland? Can you please show me |
yes, it has XWayland. But clipboard in wayland works through clipboard manager interface, in my case simplified wl-clipboard is used (this is out of the box for Raspberry Pi OS) |
I'm using Raspberry Pi Bookworm with Wayland Labwc desktop.
Just cloned and compiled latest version of far2l v2.6.4-2024-12-29-9fb21334-beta.
When I start
far2l --tty
from desktop withlxterminal
, it can paste clipboard text from other apps (with Shift+Insert). But cannot copy text from far2l to other apps (with Ctrl+Insert).When I do Ctrl+Insert in far2l, wl-paste shows empty, even if before it contained some text (far2l just clears clipboard content).
Here is wl-paste output, the first one is before copy from far2l, the second one is after copy text "Съешь ещё этих мягких французских булок, да выпей же чаю." from far2l. With ASCII text I get the same issue.
If it matters, my terminal shortcuts are configured to use Shift+Insert for Paste and Ctrl+Insert for Copy.
Also, when I try to insert a file from the panel into the command line using Ctrl+Enter in far2l running in desktop mode, it doesn't work. Instead, it just opens the file in an external editor for text files or executes it for bash scripts. However, when I run far2l from a virtual terminal, Ctrl+Enter works as expected.
When I run it in GUI mode with
far2l --wayland
, the clipboard copy/paste works ok in both directions and Ctrl+Enter also works ok.Update: some new finding. When I start
far2l --tty
from lxterminal I cannot copy text from far2l to other app, but can copy text from other apps to far2l. But when I startfar2l --tty
from gnome-terminal it works the other way around - I can copy text from far2l to other apps, but cannot copy text from other apps to far2l.Update2: additional findings. When running far2l remotely over SSH from a virtual terminal (where copy/paste works during local use), copying in the editor (from far2l to far2l) doesn't work for some reason. It was also discovered that text selection in the editor doesn't display properly (the text isn't inverted). However, when connecting over SSH from far2l, text selection in the editor works, but attempting to copy text causes the application to freeze.
The text was updated successfully, but these errors were encountered: