OneMoreGres / ScreenTranslator

Screen capture, OCR and translation tool.
MIT License
908 stars 117 forks source link

Can't run application in Gnome Wayland #124

Open ferroson opened 1 year ago

ferroson commented 1 year ago

Describe the bug Application cannot run on Gnome Wayland

To Reproduce Steps to reproduce the behavior:

Expected behavior Application must run

Logs QTWEBENGINE_DISABLE_SANDBOX=1 ~/Applications/ScreenTranslator-3.3.0.AppImage Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. "Another instance is running. Lock file is busy." lockName= "/tmp/screentranslator.lock"

Screenshots

Desktop (please complete the following information):

Additional context

OneMoreGres commented 1 year ago

"Another instance is running" is unrelated to wayland. It just prevents multiple instances from being opened. The app only has a tray icon, so it might be running already.

Anyway, wayland support is somewhat incomplete. There is an experimental source branch for it, but currently I don't have time to polish it.

Drogunov-S commented 1 year ago
  1. Thank you!
  2. The problem is also observed on versions 3.3.0 and 3.2.3.
  3. The Portable checkmark does not work. Namely, it does not allow downloading scripts from the "Updates" tab
  4. After downloading languages and scripts, the program crashes and does not rise.
  5. Restart is not possible
  6. Linux Ubuntu

Files and videos of errors, logs, and information about the system are placed in the folder by the attached link.

Files.zip

Yandex Disk

OneMoreGres commented 1 year ago

Looks similar to #88, #110, #117 Try setting QTWEBENGINE_DISABLE_SANDBOX=1 (e.g. run QTWEBENGINE_DISABLE_SANDBOX=1 <path>/ScreenTranslator-3.3.0.AppImage)

Drogunov-S commented 1 year ago
  1. Thank you!
  2. The problem is also observed on versions 3.3.0 and 3.2.3.
  3. The Portable checkmark does not work. Namely, it does not allow downloading scripts from the "Updates" tab
  4. After downloading languages and scripts, the program crashes and does not rise.
  5. Restart is not possible
  6. Linux Ubuntu

Files and videos of errors, logs, and information about the system are placed in the folder by the attached link.

Files.zip

Yandex Disk

Спасибо за подсказку! @OneMoreGres .

OS Ubuntu 22.04 ScreenTranslator 3.3.0

Два решения которые я нашел, для того чтобы не держать терминал открытым после использования команды QTWEBENGINE_DISABLE_SANDBOX=1 <path>/ScreenTranslator-3.3.0.AppImage

1) Запуск команды с выходом с терминала, не приводит к закрытию программы. QTWEBENGINE_DISABLE_SANDBOX=1 <path>/ScreenTranslator-3.3.0.AppImage & exit

2) Настройка автозапуска, лучше использовать пункт а.

а) Через стандартную программу Startup application В command указать; env QTWEBENGINE_DISABLE_SANDBOX=1 <path>/ScreenTranslator-3.3.0.AppImage

б) Создать файл в: 1) /home/<user>/.config/autostart/nameFile.desktop 2) Открыть в текстовом редакторе и добавить код;

    [Desktop Entry]
Type=Application
Exec=env QTWEBENGINE_DISABLE_SANDBOX=1 /home/<user>/<path>/ScreenTranslator-3.3.0.AppImage
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[ru_RU]=ST
Name=ST
Comment[ru_RU]=
Comment=

Не забудьте заменить!

\ - на путь к файлу appimage \ - на имя пользователя в системе