General issues with non-ncurses programs
phillid opened this issue · 2 comments
Using abduco to manage sessions with ncurses programs works just fine. Things like nano
or vim
can be attached and detached etc without issue. However, since non-ncurses programs don't start printing on a fresh screen and abduco (directly or indirectly?) sets the cursor to the top left, any output from the programs gets mixed up with anything already on the screen. For example, running:
ls /
abduco -c test ls /
can result in something like:
bin dev home lost+found opt root sbin sys usr
boot etc libe mntt+fo proc runt srv tmp var
abduco: test: session terminated with exit status 0 var
$ abduco -c test ls /
I know you don't tend to detach ls
, but it was the first, most common example I could think of. This is actually happening with wvdial
for me, not ls
. It's not much of an issue for me personally, as I don't tend to look at wvdial
's output, but I can imagine it's not the way abduco is intended to make things look and it could potentially cause issues for others.
Sorry for the late reply, I was busy with other things. abduco git switches to the alternate screen buffer before executing the given command. The issue you describe happens if the terminal doesn't support the alternate screen buffer in which case the cursor is most likely just placed at the left top most position, thus overwriting previous output.
As far as I know all modern terminal emulators are xterm compatible in this regard and support the alternate screen buffer. I tested it in st and dvtm git without problem. The one notable exception is the linux framebuffer console. Which terminal are you using?
It would be possible to query the terminfo database for the smcup/rmcup
entries to use for the switch to the alternate screen buffer instead of hard coding xterm specific values. However I would like to avoid a dependency on termcap/terminfo libraries if possible. A somewhat hacky but less invasive change would be to check for $TERM=linux
and avoid the use of the alternate screen buffer in this case.
I'm using st (0.5) and dvtm (0.12). This issue doesn't happen when running plain st without dvtm. Perhaps it is something to do with dvtm-0.12? I'll install dvtm-git later and report back.
Okay, yep. With dvtm-git installed, the issue disappears. I'll run on the git package for now then.