I been having this bug with foot when i spawn a new terminal everytime it occours
Term spawning with multiple lines #1543
- How are you spawning the terminal?
- Which shell are you using?
- Does it still happen if you run foot and/or the shell with the default config? (e.g.
foot -c /dev/null bash --noprofile --rcfile /etc/profile)
Guessing this is yet another duplicate of #195
@craigbarnes I'm using sway with bindsym $mod+Return exec foot, and i'm using ash from busybox. When i run foot -c /dev/null ash --noprofile --rcfile /etc/profile i get this output.
warn: config.c:3563: Arimo: font does not appear to be monospace; check your config, or disable this warning by setting [tweak].font-monospace-warn=no
warn: wayland.c:1509: fractional scaling not available
warn: wayland.c:1512: no server-side cursors available, falling back to client-side cursors
The font warning is normal i just changed it to the correct font but with or whitout this change i still get this problem
I'd forgotten that the issue mentioned in #195 (and #453) has been known to cause this type of prompt behavior before, but @dnkl's suspicion about that seems to be correct. I can reproduce the same behavior as you observed if I run:
foot busybox ash
...whereas the prompt works as expected if I run either of the following:
foot sh -c 'sleep 0.1; busybox ash'
# Less added latency vs. using sleep; see https://codeberg.org/craigbarnes/waitwinch
foot waitwinch busybox ash
Or in other words, this is a duplicate of several previous issues and the solution is being tracked in #453.
- closed this issue
-
added the duplicatelabel
@dnkl mentioned the following point in #453:
... my guess is applications that exhibit sizing issues (like described in #723) are racy, and request the initial size before registering their SIGWINCH handler.
...which appears to be the case for busybox ash:
# Press Ctrl+D after the interactive shell starts
strace -o ash-trace.txt busybox ash; grep -E 'TIOCGWINSZ|SIGWINCH' ash-trace.txt
ioctl(0, TIOCGWINSZ, {ws_row=47, ws_col=191, ws_xpixel=1910, ws_ypixel=987}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=47, ws_col=191, ws_xpixel=1910, ws_ypixel=987}) = 0
ioctl(1, TIOCGWINSZ, 0x7ffd1ce14df0) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(0, TIOCGWINSZ, {ws_row=47, ws_col=191, ws_xpixel=1910, ws_ypixel=987}) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x4b6a1f, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x4d5bdb}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x4d5bdb}, NULL, 8) = 0
...or in other words, this specific issue could probably be avoided if ash set up its SIGWINCH handler before requesting the initial terminal size.
@craigbarnes your solution for time waiting just work for the new term that are spawned, the previous term still get a new line everytime i spawn a new terminal.
It's not clear what distinction you're making. What do you mean by "the previous term"?
If you're still spawning foot via bindsym $mod+Return exec foot, you'll continue to see the same problem, for the reasons outlined above (and described in #453).
@craigbarnes if you see the image i sended you can see that every terminal is like one more line than the previous, that's what i mean. Try to exec a new term and you see that the last term get a new break line a "enter command". You can see again in this image
Try to exec a new term ...
Do you mean with Ctrl+Shift+N? If so, that just launches your default shell, presumably without the sleep workaround. When I mentioned the example of running:
foot sh -c 'sleep 0.1; busybox ash'
...it was just for demonstration purposes, to highlight that the bug is in ash (and/or sway) and not foot. If you want to use that same workaround for terminals spawned via Ctrl+Shift+N you need to add something like the following to ~/.config/foot/foot.ini:
shell = sh -c 'sleep 0.1; exec busybox ash'
Note that this is just an example workaround and not necessarily a suggestion. My suggestion would be to use a different shell.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?