Outils pour utilisateurs

Outils du site


issue218:mon_opinion

Get your hack on!

FCM Comic

To draw the FCM comic, I use Gravit designer, the free drawing application. I use version 3.33 or 3.49, as they clock in at around 64MB and do what I need them to do. I have version 2020 1.2.1 as well, that is three times the size (198MB), and honestly, I don’t see a difference, except that the bigger one tries to contact gravit.io the whole time and if you allow it, it downloads s#1t to your computer, and turns into “nagware”, and forces you to sign in. Not on my watch! With Ubuntu updating from 22.04, Gravit designer stopped working. No error message, nada! So it has been a hot minute since I have made any comics for the magazine. Trawling through the human knowledge base, I came across people saying that it is the sandboxing. The “fix” was supposed to be relaxing apparmour, like so:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

spoiler: it did not work!

If you search for the reason that AppImages do not run on Ubuntu 24.04, you will find that people point to libfuse as the culprit. Apparently libfuse2 was replaced with libfuse3, and I was living under a rock. While it may be the case in Ubuntu Gnome, it certainly was not in Xubuntu derivatives. If one tries to install libfuse2, apt tells you that it has been superseded by libfuse2t64 and that it was already the latest version. I made doubly sure with: sudo apt install libfuse2t64. This did not solve my issue, but gave me insights into why so many of my AppImages failed during testing (Markdown editors).

After dredging through some documentation, I found that the ”sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0” command does nothing permanent, so I ran it. (This will reset as soon as you reboot, so I was not worried). This time around, there was an error. It was apparently missing “libgconf-2.so.4”. As it is supposed to be self-contained, why is it not contained? I tried to look for the file, but it seemed that it was deprecated. However, this error only appeared on the smaller/older version, which was curious in itself. Finding the file was not so easy. According to the Debian website, it was contained in “libgconf-2-4_3.2.6-7_amd64.deb”. I downloaded the file from a Debian repository, to take it apart. (Remember, I only needed the .so-file). I created a folder to unpack the .deb-file, copied the .deb-file to the unpack folder, and used Engrampa to unpack it. I then rummaged through the folders and found paydirt in “/UNPACK/usr/lib/x86_64-linux-gnu/”. Not a 100% match, but an updated version, “libgconf-2.so.4.1.5”. Since only my gifted laptop runs Gnome Ubuntu, the others run Linux Mint and Linux Lite, they don’t have gconf installed as they use XFCE. What to do?

My first thought was to stick it in the Gravit designer folders, but this did nothing. You see, this AppImage creates folders in places like .config in your home folder and I tried those first. I was not about to put it in any of my system folders, no matter what. When I say “it”, I mean “libgconf-2.so.4.1.5”, just to clarify, as someone mentioned that I’m too liberal with the word “it”.

At this point you may be asking me, why don’t you just use Inkscape? Well, I have a very fast workflow in Gravit designer, that takes me up to six times as long in Inkscape. (I use a very small portion of the Inkscape landscape, so it is the difference between riding a bike and flying a plane. I have no idea what all the buttons are for, and where the ones I need are hiding.) Maybe I need to get used to it, but I feel like a Photoshop user, moving to GIMP. Though the two programs do exactly the same thing, it is about how intuitive it is for new users to get to grips with… and Inkscape is a sensory overload. Though Gravit designer is constrained, I have learned to work, nay, thrive, within those constraints. I suppose I will have to move some day, but that day is not today, plus, I like taking things apart and tinkering with them. Always have, always will.

Since an AppImage is simply a collection of files all zipped up, it stands to reason that it can be unzipped. Since the application is a Chrome sandbox with Electron, it also stands to reason that I can update the AppImage to the latest Chrome / Electron and enjoy the benefits. (I’m not entirely sure what they are, so don’t quote me.) I’ll be using this opportunity to learn all about Electron and Chrome sandboxing and also packaging up an Appimage, but I’m getting ahead of myself. I need to make it work first. If I look in the larger version of Gravit designer, I do find libgconf-2.so.4 in the “/usr/lib/” folder, but this file is absent in the smaller version. Oh right, you may be wondering how I know this. Well, I unpacked the AppImage as well. :)

To unpack an AppImage, you only need to run it with “- -appimage-extract”. (That’s two dashes, no space). In my case it was: ./GravitDesigner.AppImage –appimage-extract -and it unpacked the contents to a squashfs-root folder. I proceeded to dump the updated .so-file into the “/usr/lib/” folder. (Why? Because that is where the libgconf-2.so.4 file was in the larger AppImage.) But that did nothing for me. While deleting the squashfs-root folder and unpacking again and switching between the larger and smaller specimen, etcetera, I just dumped the “libgconf-2.so.4.1.5” file in the squashfs-root folder, so I could move it later as I needed to copy another file. I was about to copy the “/usr/lib/” folder to the other version, when I clicked on the executable file, to record the error, for a before and after, useful when comparing errors. (There is a bash script in the AppImage too, to integrate it into Linux and launch it, but I wanted to see what just the executable did.) To my surprise it launched! I wish I could say that I planned it or figured it out, but it was sheer luck and not giving up. I tried it on the other version too. When I say “it”, I mean just copying the “libgconf-2.so.4.1.5” file to the squashfs-root folder and running the gravit-designer executable file. This seems to work for all the versions that I have. Hah! Not so obsolete now, eh??? Now our beloved magazine can get comics again, even though the humour is only funny in my head. By-the-way, if any of you want to follow along, you can still find a copy of Gravit designer AppImage on the Pling store. If it is also removed from there, ping me on Telegram and I will give you a copy to play with. Learning whilst playing is the best way. The reason I use the older versions and the AppImage version is that it does not come with the annoying login screen, you can simply fire it up and use it. Just remember to turn off your networking when using this application to avoid wasting your bandwidth and turning a perfectly working program into garbage. If you block it in your firewall, remember that it needs internal connections, but any requests out of the system should be blocked. If you block the internal requests, the application will not launch.

(here you can see it working on the latest LM)

While I was inside the unpacked AppImage file, I used the opportunity to delete all the unnecessary files, like extra languages, the pesky update.yml and whatnot, reducing the file size even more. The question now is, how do I repack it up back into an AppImage file and how do I go about updating Electron?

I think I hit my article word cap again, so if you would like to know more, I’ll tell you about it in the next issue. If you don’t let me know too, I will drop it like a hot potato as I do not like writing for myself. I hope I managed to help someone with a similar AppImage problem.

If anything was unclear: misc@fullcirclemagazine.org

issue218/mon_opinion.txt · Dernière modification : 2025/06/14 16:04 de philou511