linuxwineflatpak

Wine - syntax to run .exe from terminal


I have KDE Neon linux and installed Wine flatpak. I want to run the windows program winbox64.exe. Now when I click on it in the file manager it works, but when I try to run it from terminal by executing the follwing command:

flatpak run org.winehq.Wine /home/mz/Programy_Win/winbox64.exe

i gen an error:

wine: failed to open "/home/mz/Programy_Win/winbox64.exe": c0000135

What's wrong? Please help.


Solution

  • That's because flatpak has a sandbox. It can't access files outside runtime,app and ~/.var/app/$APPID by default. However, you can guarantee it with proper permission.

    Like this:

    flatpak run --filesystem=home org.winehq.Wine /home/mz/Programy_Win/winbox64.exe
    

    I think it's OK now.

    For more information: https://flatpak-doc.readthedocs.io/zh-cn/latest/sandbox-permissions.html

    You can also run flatpak run --help for more arguments.