-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Terminal does not allow to paste multi-lined command blocks #21228
Comments
I have the same issue. Firefox. Ubuntu 24.04.1. |
Let's change the test to something that doesn't affect the filesystem. This should be simple enough:
FirefoxWorks for me ChromeWorks for me WebKit (GNOME Web)Works for me This is all on Fedora 41 Silverblue, in fish shell, with all browsers in Flatpaks on GNOME on Wayland. I tried bash as well, and it works fine there too, so it's probably not the shell. Which things vary between us all, for which is working and which isn't? |
I might have unintentionally misinformed you. When I said that the problem was on Fedora 41 I meant the server-side. On the client-side I used Windows 11. I will try to make myself clear this time. So this problem really bothers me and I want to help as much as possible to get rid of it. Thus I tested some of the mentioned configuration plus some more and found out that the problem is specific to Windows + Chrome. Every OS, app and package on server and client sides are updated to the latest available version as of 14.02.2024. This means Fedora Server 41, Cockpit 332. On the client side Fedora Silverblue installations are all using Wayland.
This seems specific to Chrome on Windows and not because of any extensions, cache, etc. as I double and triple checked by using incognito mode and another VM with freshly installed Chrome.
|
That's an important distinction! It's really easy to report the wrong thing; it happens. Cockpit is kind of running in 2 places at once (backend and in-browser) so it's possible to have a bug in either place. Thanks for clarifying!
This is extremely useful to know. Thanks!
Thank you for taking the initiative at testing this! That would've been my next question and suggestion. 😉 The fact that you're hitting it in a VM that has Windows and Chrome inside is useful too. I don't know how many people on the team have a Windows installation on bare metal. We can spin up VMs for sure, though. (I have a dusty Windows VM I can spin up and try things out. Or use quickemu (which can run from within a toolbox container) for testing locally with minimal hassle.) I wonder if this affects all Chromium browsers (like Edge) or just Chrome itself. I'll try to see if I can figure this out locally. |
Windows 11 24H2, Chrome 133 Windows 11 24H2, Chrome 133 (Incognito Mode)
I am using Ubuntu 22.04.5 LTS in WSL2. Running cockpit in chrome in Windows. I am not able to reproduce the given issue. |
@Danik1601: Following up on @Mash707's point, many Windows apps and extensions can modify the clipboard, sometimes even affecting line breaks, especially as Windows uses CRLF (carriage return and line feed) instead of just LF (line feed) like most other OSes. To help figure out what's happening, could you please tell us here if you're using any of these?
Knowing this will help us narrow down the cause. Using anything above isn't necessarily a problem, but they can sometimes interfere. (There's also a possibility of malware doing things like this. Hopefully your computer doesn't have that.) Thanks! Hopefully we can solve what's going on. |
@Danik1601 Could you check your clipboard history once to see if the Copy function is working correctly or not. |
Yes. Latest Microsoft PowerToys is installed on all of my machines. I should also note that for VMs I use VirtualBox with shared clipboard enabled. So if anything messed with clipboard on host OS, the clipboard is definitely messed up in guest OS.
Copied both command blocks from this GitHub thread: Then I turned off Advanced Paste, PowerToys itself and even Logitech G Hub, cleared my clipboard history, refreshed cockpit web page and copy-pasted the command again. Nothing changed, the issue still persists.
It surely looks like only Chromium browsers are affected. |
When you turned off PowerToys (including Advanced Paste), did you reboot before testing? It might modify your system in ways that aren't fully undone until a reboot. (I don't know for sure, but a reboot after turning off something like that is a good idea just to be sure.) I'm still leaning toward PowerToys being the problem we're hitting here, as I've seen evidence elsewhere where copy/pasting is sometimes completely or subtly broken for others, and we know there's a specific feature to alter the clipboard. VPNs could cause the issue, but I doubt it. Microsoft Defender is good to keep on, of course. Malware probably isn't an issue (especially since you have Microsoft Defender on). Logitech software might be doing weird things, but I think it only does things on request (like a button for AI) instead of intercepting your clipboard — but I really do not know. Something other than PowerToys might still be causing this, but I think they're much less likely. So, could you please reboot after turning off PowerToys and let us know if the issue persists, just to be sure? Thanks! |
Explain what happens
Cockpit Terminal can not correctly paste commands that consist of multiple lines from clipboard, executing only the first line (or whatever it is doing).
Steps to reproduce:
Paste it into Cockpit Terminal
See this happen (only the first line is executed):

Version of Cockpit
327
Where is the problem in Cockpit?
Terminal
Server operating system
Fedora
Server operating system version
41
What browsers are you using?
Chrome
System log
No response
The text was updated successfully, but these errors were encountered: