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

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

Open
urbenlegend opened this issue Sep 19, 2023 · 8 comments
Open
Labels
bug Something isn't working

Comments

@urbenlegend
Copy link

urbenlegend commented Sep 19, 2023

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 urbenlegend added the bug Something isn't working label Sep 19, 2023
@jelly jelly transferred this issue from cockpit-project/cockpit Sep 19, 2023
@martinpitt martinpitt changed the title [cockpit-podman] Basic shell commands like ls do not work on the first line of the Console. Shell commands like ls do not work on the first line of the Console. Sep 20, 2023
@jelly
Copy link
Member

jelly commented Nov 10, 2023

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

@chabad360
Copy link

chabad360 commented Nov 10, 2023

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.

@jelly
Copy link
Member

jelly commented Nov 13, 2023

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

@chabad360
Copy link

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.

@jelly
Copy link
Member

jelly commented Nov 14, 2023

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.

@urbenlegend
Copy link
Author

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.

@jelly
Copy link
Member

jelly commented Nov 15, 2023

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

@cmd430
Copy link

cmd430 commented Apr 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants