cryptomator / cryptomator-linux

Cryptomator .AppImage for Linux
GNU General Public License v3.0
14 stars 7 forks source link

Handle (not) installed GTK+-Version #26

Closed infeo closed 3 years ago

infeo commented 4 years ago

If GTK+-2.0 is not installed on the system, the packaged app refuses to start because it is build with passing jdk.gtk.version=2 to the JVM: https://github.com/cryptomator/cryptomator-linux/blob/5a5da37085eaaa57599158fba3ee7a3c5aa00a7a/.github/workflows/appimage.yml#L56

The current workaround is to unpack the resulting AppImage and edit the Cryptomator.cfg file, see https://github.com/cryptomator/cryptomator/issues/1167#issuecomment-625097731.

But the flag cannot be just removed, resulting application start failure on other systems, see https://github.com/cryptomator/cryptomator-linux/issues/9#issuecomment-624107896.

infeo commented 4 years ago

Blocked by #25

The jpackage apporach is not flexible enough, we need a shell script again.

overheadhunter commented 4 years ago

Blocked by #25

Still we won't start #25 until we know for sure there is a way to determine via shell if GTK 2 or 3 should be used.

infeo commented 4 years ago

The usage depends on if the appropiate gtk version is installed.

One way is to check is using the package manger. There are not so many, so for me this seems a feasible approach. With commands for dpkg and rpm we would already cover many major distributions (except ArchLinux):

I would say it is impossible to determine it for sure and use the flag only when we are able to detect that GTK+-2.x is installed.