[xterm.js] two usability issues

Keeper of the Keys

Active Member
Jul 7, 2021
68
18
28
Hey recently I have been using "serial" consoles instead of noVNC on my guests much more heavily as it allows me to copy/paste text.

I'm having two issues that I have not been able to resolve so far and hope that others here maybe did solve already:
1. Select/middle click paste does not work from xterm (I can middle click paste text from other tabs/windows just not from the console output) -- this one is killing me/my muscle memory.

2. I often end up with garbled output especially when recalling long commands from the history or viewing files, some Internet sleuthing seems to suggest that this is an issue with newline characters and usually handled by changing console client settings however I don't see any place where I can adjust this setting.

Thanks!
 
1. Select/middle click paste does not work from xterm (I can middle click paste text from other tabs/windows just not from the console output) -- this one is killing me/my muscle memory.
i can't reproduce this, middle click in xtermjs works as expected. Though this is mostly a client issue (browser/os) not directly an xtermjs one...


2. I often end up with garbled output especially when recalling long commands from the history or viewing files, some Internet sleuthing seems to suggest that this is an issue with newline characters and usually handled by changing console client settings however I don't see any place where I can adjust this setting.
i guess you use the guest with serial terminal configured so xtermjs works?

if yes, you have to keep in mind that the guest processes know nothing about the capabilities of the terminal, so you may have to set the correct TERM variable and/or terminal settings (e.g. the size can be changed with stty https://man7.org/linux/man-pages/man1/stty.1.html )
 
ok on firefox 151 on wayland (sway here) i can see that the copy action with middle click does not work (in chrome it does)
not sure why that is though and if were even able to fix it from our side (might be a firefox issue)

could you please open a bug for the copy issue on firefox on https://bugzilla.proxmox.com (so we can track that better)

as for garbled output, if the guest has the correct $TERM variable defined (e.g. linux or xterm) it all works here, even in firefox
 
  • Like
Reactions: Keeper of the Keys
Thanks will open a ticket, if I recall correctly there were some murmuring recently from some people about primary paste being obsolete but since it works outside of the xterm context I don't think they killed it yet (that would be a sad sad day for me if they ever do).
 
It seems this setting needs to be there from the beginning of the session, I tried first to do `export TERM=xterm` but then scrolling through history on the console still garbled the output, after adding `TERM=xterm` to `.bashrc` and logging back in it seemed to work very nicely.