kumakichi / Deepl-linux-electron

DeepL(https://www.deepl.com/) Integration for Linux. Select text in any application and simply press Ctrl+C and another shortcut to translate it.
MIT License
103 stars 14 forks source link

DeepL must have changed something... #23

Open Mr-McGregor opened 1 month ago

Mr-McGregor commented 1 month ago

For a few days now, the application hasn't been working, and neither has this little alternative script:

#!/usr/bin/env bash text="$(xsel -o)’ text=‘${text//$’\n'/%0A}’ x-www-browser ‘https://www.deepl.com/fr/translator#auto/$text’

It seems that DeepL has changed its code and that ‘#auto’ is no longer recognised. However, this line works for translating text from English into French:

x-www-browser ‘https://www.deepl.com/fr/translator#en/fr/$text’

Would it be possible to fix the application? And also to allow sandboxing under Ubuntu 24.04 ?

Thankx in advance.

kainonergon commented 1 month ago

I hoped that this PR will fix the issue, but it seems that it helps only partially. With it translation works OK, the shortcut moves the window into focus, but the clipboard is not inserted into the translation input field.

Mr-McGregor commented 1 month ago

Thank you very much for the attempt, @kainonergon. I am increasingly convinced that the problem is due to a change that DeepL has made. I've just contacted the technical department at DeepL. Best regards.

kumakichi commented 1 month ago

have a try: v1.5.0

kainonergon commented 1 month ago

Thanks! Now it really works again.

Mr-McGregor commented 1 month ago

Sorry to say that it doesn't work at all on Ubuntu Budgie 24.04 (24.04 is nasty with AppImages):

$ ./Deepl-Linux-Electron-1.5.0.AppImage [16900:1013/180020.856909:FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_dl.App84leyE/chrome-sandbox is owned by root and has mode 4755. [appimagelauncher-binfmt-bypass/lib] ERROR: child exited with code 5

Wouldn't it be possible to make 'chrome-sandbox' have natively sufficient rights?

sudo chown root:root chrome-sandbox sudo chmod 4755 chrome-sandbox

It works when you disassemble the appimage with --appimage-extract and run "AppRun".