clusterssh icon indicating copy to clipboard operation
clusterssh copied to clipboard

Issue pasting curly brackets

Open lminiero opened this issue 5 years ago • 9 comments

Hi,

not sure if this has been mentioned already, but I couldn't find any related issue or discussion on this, so I thought I'd open one here.

Apparently, when pasting (CTRL+V) something that contains curly brackets, the operation fails. Specifically, assuming you have more than one terminal open and try to paste something for all of them, if the text contains a curly bracket only one of the terminals will get the text up until the character before the bracket, and nothing will show up on the other ones.

Easy enough to replicate in my case, as all I need to do is paste something simple, e.g.:

hi{

and I'll see hi on one and nothing on the others. Tried with the version available in my Fedora 28 repo (4.13.2), I'll have to check if more recent versions are available as soon as I can upgrade it.

Please let me know if there's anything else I can provide to help figure out what's wrong.

lminiero avatar Jul 19 '19 21:07 lminiero

I experience the same thing; Curly braces disappear completely. Also, "$"-signs become "¼". Strange paste bug.

mtr avatar Jul 07 '20 11:07 mtr

Hmm... I am able to paste echo ${USERNAME} and get the expected result. What terminal are you using and what is your $LANG set to? It seems that something is getting mapped from one character set to another during the paste.

tmancill avatar Jul 12 '20 23:07 tmancill

I'm also affected by this old bug on non-english locales (LANG=en_GB.utf8, the rest is cs_CZ.UTF-8). And also copy pasting $ is problematic:

Use of uninitialized value within %keyboardmap in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 498.
Use of uninitialized value $state in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 502.
Use of uninitialized value $code in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 502.
Use of uninitialized value $_ in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 505.
Use of uninitialized value $_ in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 509.
Use of uninitialized value $_ in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 513.
Use of uninitialized value $_ in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 517.
Tk::Error: Should never reach here at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 522.
 App::ClusterSSH::Window::Tk::get_keycode_state at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 522
 App::ClusterSSH::Window::Tk::send_text at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 704
 App::ClusterSSH::Window::Tk::__ANON__ at /usr/lib/perl5/vendor_perl/5.30.1/App/ClusterSSH/Window/Tk.pm line 1365
 <<Paste>>
 (command bound to event)

$keysym in sub get_keycode_state($) in Window/Tk.pm: $keysym: 'dollar'. Shell I report that in separate ticket (IMHO the same issue)?

$ locale
LANG=en_GB.utf8
LC_CTYPE=cs_CZ.UTF-8
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE=cs_CZ.UTF-8
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES=C
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=

pevik avatar Jul 13 '20 08:07 pevik

Hmm... I am able to paste echo ${USERNAME} and get the expected result. What terminal are you using and what is your $LANG set to? It seems that something is getting mapped from one character set to another during the paste.

Just tested again and if I try to paste hi{ I still only get hi. The terminal cssh starts is xterm, and LANG is set to en_GB.utf8 (even though I have an Italian keyboard). This is on Fedora 31, which ships a 4.14.1 version of cssh.

lminiero avatar Jul 13 '20 08:07 lminiero

Got similar Errors by pasting: apt install dpkg --get-selections | grep -oP 'linux-image[a-z-]+amd64' && uname -a && apt autoremove && apt clean

Errors:

Use of uninitialized value within %keyboardmap in pattern match (m//) at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 497.
Use of uninitialized value $state in concatenation (.) or string at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 501.
Use of uninitialized value $code in concatenation (.) or string at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 501.
Use of uninitialized value $_ in pattern match (m//) at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 504.
Use of uninitialized value $_ in pattern match (m//) at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 508.
Use of uninitialized value $_ in pattern match (m//) at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 512.
Use of uninitialized value $_ in pattern match (m//) at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 516.
Tk::Error: Should never reach here at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 521.
 App::ClusterSSH::Window::Tk::get_keycode_state at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 521
 App::ClusterSSH::Window::Tk::send_text at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 703
 App::ClusterSSH::Window::Tk::__ANON__ at /home/philipp/clusterssh/bin_PL/../lib/App/ClusterSSH/Window/Tk.pm line 1364
 <<Paste>>
 (command bound to event)

locale


LANG=de_DE.utf8
LANGUAGE=
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=

Version: latest

hahaxd35 avatar Oct 05 '20 13:10 hahaxd35

Seems to be related to the keyboard map that is configured on clusterssh start and independent of the locale. If I use setxkbmap de neo and then start clusterssh, characters like : or / are replaced by other characters. If I change the keyboard map after starting clusterssh (e.g. setxkbmap de), it gets even crazier :-) if I have "uiae" in my clipboard, it pastes "asdf" (which are actually the same keys, but I would have expected it to paste "uiae" nontheless).

exic avatar Dec 03 '20 12:12 exic

Yes, it's really based on keyboard map. I thought also locale is somehow affected, but probably it's not. It'd be great to solve this bug.

pevik avatar May 18 '21 09:05 pevik

same here, keyboard layout Italian, tests made: paste @ -> nothing paste ` -> ¬

This happen only when I paste it in the cssh command window.

Please, could you explain us when it will be fixed or a possible workaround?

Edit: Distributor ID: Ubuntu Description: Ubuntu 16.04.7 LTS Release: 16.04 Codename: xenial Kernel: 4.15.0-142-generic Keyboard layout: QUERTY Language: Italian

JackThird avatar Dec 27 '21 12:12 JackThird

I think this is the same bug as #38

sylvainfaivre avatar Jan 12 '22 10:01 sylvainfaivre