ssh-askpass icon indicating copy to clipboard operation
ssh-askpass copied to clipboard

/usr/local/bin/ssh-askpass:1432:1493: execution error

Open schwedenmut opened this issue 6 years ago • 3 comments

Running macOS 10.14.5, I wasn't able to get ssh-askpass working with default brew installation.
After following the solution from https://github.com/theseal/ssh-askpass/issues/23#issuecomment-451637836, it still didn't work with error sign_and_send_pubkey: signing failed: agent refused operation.

Then I took a look into the ssh-askpass applescript and tried to find a failure in the code. Running ssh-askpass results on my computer into the following error:

/usr/local/bin/ssh-askpass:1432:1493: execution error: „Terminal“ hat einen Fehler erhalten: Angegebene Taste existiert nicht (-50)

When running ssh-askpass something: it works, but running ssh-askpass something i run into the same error as described above. My system language ist de_DE.UTF-8 and we use OK just as in en-US.UTF-8, but Cancel is not a German word. So if I change in ssh-askpass#L29 from "Cancel" to "Abbrechen" - ssh-askpass works as intendet and integration with the settings from KeePassXC also.

But it seems these changes would break the ability to run on different system languages.

schwedenmut avatar Jul 12 '19 16:07 schwedenmut

Went ahead and created a fix for that.

schwedenmut avatar Jul 12 '19 19:07 schwedenmut

This Issue shouldn't be closed till the error still exists! The change to {get localized string of "Cancel"} is still resulting in:

execution error: Angegebene Taste existiert nicht (-2700)

I'm not that deep into Apple script, so not sure where the localization bundles are located. However "Cancel" is not found, if German language is your system language! Adding English as second language seems sadly not helping out here. So for now i change the line to Abbrechen

Unfaehig avatar Jul 26 '22 14:07 Unfaehig

Does your fix still work for you @schwedenmut ?

From my test with Swedish it won't work

{get localized string of "Cancel"}

returns "Cancel" Skärmavbild 2022-08-23 kl  20 19 04

theseal avatar Aug 23 '22 18:08 theseal

I wonder if we should just use default button 1 instead, see https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW12

But I also wonder how that plays with locales that read right to left? I tested with Arabic locale and it seems like display dialog args with icon agent default button 1 giving up after dialog_timeout selects the cancel button even though the cancel button is on the right.

I'm all for changing it to default button 1.

Anyone up for some free imaginary internet points?

simmel avatar Mar 22 '23 12:03 simmel

I am getting this error too, with an OS in French...

mboisson avatar Aug 16 '23 15:08 mboisson

Changing for default button 1 works for me in French, and in English

mboisson avatar Aug 16 '23 15:08 mboisson