csshx icon indicating copy to clipboard operation
csshx copied to clipboard

csshx is not working in New Mac OS Release MacOS Mojave

Open ghost opened this issue 7 years ago • 59 comments

csshx is not working in New Mac OS Release MacOS Mojave.

Getting the following errors :

$ ./csshX host1 host2 host3 host4 **** ERROR **** PerlObjCBridge:: sendObjcMessage: Can't get NSMethodSignature for message "qualifiedSpecifier" **** ERROR **** PerlObjCBridge: error [1] sending message [NSObject qualifiedSpecifier] at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/PerlObjCBridge.pm line 248. $

ghost avatar Jul 02 '18 15:07 ghost

For me the error is:

Can't call method "qualifiedSpecifier" on unblessed reference at /usr/local/bin/csshx line 524.

If I add print commands to Line 523 I get the same like you.

history -d $(($HISTCMD-1)) && clear && exec '/usr/local/bin/csshx' '--master' '--sock' '/var/tmp/tmp.0.COSUMX' '--launchpid' '64635' '--screen' '0' '--debug' '0' '--tile_y' '0' '--tile_x' '0' **** ERROR **** PerlObjCBridge:: sendObjcMessage: Can't get NSMethodSignature for message "qualifiedSpecifier" **** ERROR **** PerlObjCBridge: error [1] sending message [NSObject qualifiedSpecifier] at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/PerlObjCBridge.pm line 248.

banyartibi avatar Jul 19 '18 14:07 banyartibi

Same issue

bessudnov avatar Jul 23 '18 22:07 bessudnov

Same error here.

With the last Mojave Beta and csshX versoin.

parera10 avatar Aug 01 '18 19:08 parera10

Same here 😞

emotality avatar Aug 16 '18 12:08 emotality

Same :( anyone know of an alternative?

devros42 avatar Aug 17 '18 16:08 devros42

I set up iTerm 2 I tagged profiles and then open it with top bar menu, that i turn on “Broadcast input to all tabs”

bessudnov avatar Aug 17 '18 18:08 bessudnov

You can try tmux-cssh but it's not the same.

parera10 avatar Aug 21 '18 18:08 parera10

unfortunately the original dev / project doesn't look very active anymore.

rdelpret avatar Sep 12 '18 22:09 rdelpret

What have you gals/guys switched to using instead of csshx?

sradu avatar Sep 25 '18 01:09 sradu

Hi, I've just hot-fixed it by cherry-picking old stuff from 2010.

just replace open_window with this and it should work.

sub open_window {
    my ($pack, @args) = @_;

    # Quote the command arguements
    my $cmd = join ' ', map { s/(["'])/\\$1/g; "'$_'" } @args;

    # don't exec if debugging so we can see errors
    $cmd = "clear && exec $cmd" unless $config->debug;

    # Hide the command from any shell history
    $cmd = 'history -d $(($HISTCMD-1)) && '.$cmd if get_shell =~ m{/(ba)?sh$};
    # TODO - (t)csh, ksh, zsh 

    my $tabobj = $terminal->doScript_in_($cmd, undef) || return;
    my $tty = $tabobj->tty->UTF8String || return;

    my $windows = $terminal->windows;
     # Quickly check if the tty even exists, since the next code is REALLY slow
    #return unless grep { $tty eq $_ } @{Foundation::perlRefFromObjectRef $windows->valueForKey_("tty")};
    for (my $n=0; $n<$windows->count; $n++) {
        my $window = $windows->objectAtIndex_($n);
        my $tabs = $window->tabs;
        for (my $m=0; $m<$tabs->count; $m++) {
            my $tab = $tabs->objectAtIndex_($m);
            if ($tab->tty && ($tab->tty->UTF8String eq $tty)) {
                my $obj = ref $pack ? $pack : $pack->SUPER::new();
                $obj->set_windowid("".$window->id);
                $obj->set_tabid($m);
                return $obj;
            }
        }
    }
}

pkovtunov avatar Sep 25 '18 07:09 pkovtunov

What have you gals/guys switched to using instead of csshx?

I believe Iterm2 has this functionality built in. Haven't tried it though.

omgp0ni3s avatar Sep 25 '18 18:09 omgp0ni3s

@pkovtuov Thanks for your tips/additional stuffs. When I try, I got this error :

[I] kylix3511$ sh csshX host1 host2 Can't call method "tty" on unblessed reference at ./csshX line 522. [I] kylix3511$

Any idea ?

ghost avatar Sep 26 '18 02:09 ghost

Thank you @pkovtuov @kylix3511 make sure you're executing it from Terminal.app (not iTerm)

zoil avatar Sep 27 '18 12:09 zoil

Thanks So much @pkovtuov @zoil @omgp0ni3s It works as expected. Thanks so much.

ghost avatar Sep 27 '18 23:09 ghost

Thanks to @viratgohil and @pkovtuov. I've forked this repos and applied the pull request from @viratgohil. Additionally I've added the homebrew formula so you can install it with homebrew:

If you already have installed it: brew remove csshx Then add the tap: brew tap parera10/csshx Then install it again: brew install parera10/csshx/csshx

parera10 avatar Sep 28 '18 10:09 parera10

@parera10 thanks! Your instructions left me still installing the original (the pin didn’t seem to stick), I needed to run: brew install parera10/csshx/csshx

lowbatteries avatar Sep 28 '18 15:09 lowbatteries

I can confirm that brew install parera10/csshx/csshx works as before on Mojave. Thanks!

rinchen avatar Oct 01 '18 19:10 rinchen

Thank you @parera10 !!!!

rdelpret avatar Oct 01 '18 19:10 rdelpret

@parera10 worked like a charm; thank you! @zoil is there anyway to have this executable from iTerm2?

wolf3142 avatar Oct 02 '18 13:10 wolf3142

@parera10 Thank you, works here as well!

vincentkersten avatar Oct 03 '18 08:10 vincentkersten

@wolf3142 I'm not sure about that one, sorry.

zoil avatar Oct 03 '18 13:10 zoil

@parera10 Thanks for the fix! Why was the original csshx on 0.74 and your version is tagged with 0.73.2?

Uninstalling /usr/local/Cellar/csshx/0.74... (4 files, 85.1KB)

==> Installing csshx from parera10/csshx
==> Downloading https://github.com/parera10/csshx/archive/0.73-2.tar.gz
==> Downloading from https://codeload.github.com/parera10/csshx/tar.gz/0.73-2
######################################################################## 100.0%
🍺  /usr/local/Cellar/csshx/2: 4 files, 92.3KB, built in 6 seconds

I'm also getting this error:

Can't call method "tty" on unblessed reference at /usr/local/bin/csshx line 526.

And the brew info on your csshx is misleading (lists 0.74 as version, refers old repository).

tholu avatar Oct 05 '18 12:10 tholu

I don't know. I only bundled all together: code from this repo and a fix from a pull request of other user. The version of homebrew seems to come from googlecode. And I've also added a homebrew formula repo for a tap.

The last version tagged here is also a 0.73.

El 5 oct 2018, a las 14:41, Thomas Lutz [email protected] escribió:

@parera10 Thanks for the fix! Why was the original csshx on 0.74 and your version is tagged with 0.73.2?

Uninstalling /usr/local/Cellar/csshx/0.74... (4 files, 85.1KB)

==> Installing csshx from parera10/csshx ==> Downloading https://github.com/parera10/csshx/archive/0.73-2.tar.gz ==> Downloading from https://codeload.github.com/parera10/csshx/tar.gz/0.73-2 ######################################################################## 100.0% 🍺 /usr/local/Cellar/csshx/2: 4 files, 92.3KB, built in 6 seconds — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

parera10 avatar Oct 05 '18 13:10 parera10

it works for me. thanks.

jockjiang avatar Oct 10 '18 04:10 jockjiang

Thanks @parera10

martinbehrens avatar Oct 13 '18 19:10 martinbehrens

I had to reinstall @parera10 's repo and it's throwing an error now


Error: parera10/csshx/csshx: /usr/local/Homebrew/Library/Taps/parera10/homebrew-csshx/Formula/csshx.rb:3: syntax error, unexpected <<, expecting keyword_end <<<<<<< HEAD ^ /usr/local/Homebrew/Library/Taps/parera10/homebrew-csshx/Formula/csshx.rb:8: syntax error, unexpected ===, expecting keyword_end

^ /usr/local/Homebrew/Library/Taps/parera10/homebrew-csshx/Formula/csshx.rb:12: syntax error, unexpected >>, expecting keyword_end

Adding homebrew Formula ^

rinchen avatar Oct 14 '18 13:10 rinchen

CsshX stopped working for me today as well....

wolf3142 avatar Oct 15 '18 14:10 wolf3142

I'm using it normally today. Let me try to reinstall it and try then. Which commands have you used to reinstall it, @rinchen?

parera10 avatar Oct 15 '18 15:10 parera10

@parera10 I used:

brew install parera10/csshx/csshx

wolf3142 avatar Oct 15 '18 15:10 wolf3142

Try to remove formula and tap and re-install it: brew remove csshx brew remove parera10/csshx/csshx brew untap parera10/csshx brew tap parera10/csshx brew tap-pin parera10/csshx #(it should work, at least it worked for me) brew install csshx

If the last brew install is installing the old csshx then remove it and try: brew install parera10/csshx/csshx

parera10 avatar Oct 15 '18 15:10 parera10