cockpit-podman icon indicating copy to clipboard operation
cockpit-podman copied to clipboard

Shell commands like `ls` do not work on the first line of the Console.

Open urbenlegend opened this issue 2 years ago • 8 comments

Explain what happens

I was trying to run a few commands within a podman container and I noticed that the first command always breaks, even on really basic commands. Here's a screenshot of what I mean: image

The shell works fine afterwards. It's just the first line that is broken. I've tested this with Jellyfin and Nextcloud

Version of Cockpit

cockpit 300.1-1, cockpit-podman 76-1

Where is the problem in Cockpit?

Navigation & Shell

Server operating system

Arch Linux

Server operating system version

up to date as of 9/18/2023

What browsers are you using?

Firefox

System log

No logs appear in journalctl when triggering the bug.

urbenlegend avatar Sep 19 '23 17:09 urbenlegend

What jellyfin container do you use? Because the upstream one docker.io/jellyfin/jellyfin:latest will have an entrypoint meaning you'll have to either override that or ctrl-c which likely restarts the container.

Container console image for reference. image

jelly avatar Nov 10 '23 09:11 jelly

I've seen this issue as well, with many different containers.

It seems a control character is sent in the input, which invalidates the first line.

chabad360 avatar Nov 10 '23 14:11 chabad360

Right, but I can't reproduce it. What browser do you use and what containers can you reproduce it with?

jelly avatar Nov 13 '23 10:11 jelly

Hmm, it happens in Firefox, with any container I've tried iirc. Try postgres 14?

I may look into this at some point this week.

chabad360 avatar Nov 13 '23 14:11 chabad360

Interesting, under Firefox I indeed spotted ^L with our cockpit-website container but that starts

image

So if I create a container with that image and then change the Command to sh in the create image modal I can reproduce it:

image

So looking a bit further into it, ^L is a Form Feed. And I can reproduce this under Chromium as well so it's not a browser specific issue.

jelly avatar Nov 14 '23 08:11 jelly

What jellyfin container do you use? Because the upstream one docker.io/jellyfin/jellyfin:latest will have an entrypoint meaning you'll have to either override that or ctrl-c which likely restarts the container.

Container console image for reference. image

Yes I am using the upstream Jellyfin container, but this also happens on the upstream Nextcloud container and the linuxserver SWAG container.

urbenlegend avatar Nov 14 '23 17:11 urbenlegend

I can reproduce it now with the steps above, so when I can find time I'll look into it.

jelly avatar Nov 15 '23 09:11 jelly

same issue here workaround i've been using to just press backspace before first command; it clears the bad input and allows the command to run fine

cmd430 avatar Apr 27 '24 15:04 cmd430