Linux Flatpak

Post Reply
allthecoffee
Posts:9
Joined:Sat Jun 17, 2017 5:27 pm
Linux Flatpak

Post by allthecoffee » Tue Jul 18, 2017 8:26 pm

A problem with paintstorm right now is the inconsistent behavior across multiple Linux distributions. This is due to variations in system libraries across the distros. One way around this is to compile a version of paintstorm for every distro. This is completely unrealistic and not going to happen due to the sheer amount of linux distros out there. Another option is to use flatpak. Flatpak is a new form of package distribution that has software run in a sandbox with a `runtime`. A runtime is bascially just a specific collection of system libraries that the software will use instead of your native systems. Any libs not included in the runtime can be packaged with the application. With this approach, you can drastically reduce the variability of behavior across systems.

Over the past little while I have been trying to get paintstorm to run in a flatpak sandbox. For the most part I was able to get it working. I had to compile quite a few libs myself, but I got it done. The real problem was the hardcoded path of `/usr/share/paintstorm` in the executable. In flatpak, `/usr` is read-only and the only directory you have access to is `/app`. Fortunately, I was able to find the path and hex edit it to be `/app/share/paintstorm`. It took a lot longer than I was expecting because I didn't think to search for the path as a wide string in the hex editor. Now that I've done it, it works (for the most part, there are still some bugs). If anyone would like to help me on this project or would like to test it, I have it all in a gitlab repo.
OS: Arch Linux x86_64
Kernel: 4.11.9-1-ARCH
WM: BSPWM / OpenBox
CPU: AMD FX-6300 Six-Core @ 3.5GHz
GPU: AMD Radeon RX 480 8GB
allthecoffee
Posts:9
Joined:Sat Jun 17, 2017 5:27 pm

Re: Linux Flatpak

Post by allthecoffee » Wed Jul 19, 2017 2:38 pm

If you guys don't want to deal with git and stuff, I've created a standalone flatpak file for you guys to install. You can download it here:
http://mdit.to/files/flatpak/paintstorm ... 17.flatpak.
OS: Arch Linux x86_64
Kernel: 4.11.9-1-ARCH
WM: BSPWM / OpenBox
CPU: AMD FX-6300 Six-Core @ 3.5GHz
GPU: AMD Radeon RX 480 8GB
ChaosOver
Posts:1
Joined:Wed Sep 20, 2017 11:43 pm

Re: Linux Flatpak

Post by ChaosOver » Fri Oct 13, 2017 11:34 pm

Thanks for the flatpak. It works well!
I'm on CentOS7.4 and dunno how to setup flatpaks myself. Would you mind to flatpak the latest release? Or share some knowledge about flatpaks? Can you remember the linie where you changed the filepath?


Thanks
Post Reply