11-24-2022, 07:53 AM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Jun 2017
Location: In the middle of nowhere in Germany
Device: Android Tablet
|
Start Gimp (flatpak) from Sigil (flatpak)
I use Linux Mint Cinnamon 20.3 and could not figure out how to start Gimp (flatpak) from Sigil (flatpak)
The desktop starter for gimp uses the command: Code:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gimp-2.10 --file-forwarding org.gimp.GIMP @@u %U @@ |
11-24-2022, 08:00 AM | #2 |
Sigil Developer
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Have you tried making a shell script that uses that exact command and then use Sigil's open with menu to invoke that shell script to launch gimp?
That should work. |
11-24-2022, 08:40 PM | #3 |
Member
Posts: 12
Karma: 10
Join Date: Jun 2017
Location: In the middle of nowhere in Germany
Device: Android Tablet
|
Sorry, no
A script "Start_flat_gimp.sh" Code:
#!/usr/bin/bash /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gimp-2.10 --file-forwarding org.gimp.GIMP @@u "$@" @@ runs Gimp with or without pic from the terminal but not from Sigil. I tried also Xviewer (not flatpak) and it did not work with Sigil. Now I have several entries in the "open with". How can I remove them? Thanks Hal |
11-24-2022, 09:32 PM | #4 |
Sigil Developer
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
|
So something is preventing subprocesses from communicating and running with flatpak. Does flatpak use some sort of sandboxing to prevent it from launching sub processes? I am not a flatpak user, as building Sigil from scratch on most linux systems is well documented and quite easy.
The code that does the work in Sigil itself is quite simple: Code:
if (QFile::exists(filePath) && QFile::exists(application)) { QStringList arguments = QStringList(QDir::toNativeSeparators(filePath)); return QProcess::startDetached(QDir::toNativeSeparators(application), arguments, QFileInfo(filePath).absolutePath()); } Try changing the script to echo the input file and see if that helps you figure out how to modify the shell script to make it work. As for removing unwanted things look in the sigil.ini for the editors_image settings and delete the lines you do not want but I recommend backing that file up first to be safe. Last edited by KevinH; 11-24-2022 at 09:41 PM. |
11-24-2022, 10:54 PM | #5 |
Evangelist
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
|
Use flatpak-spawn instead.
|
11-25-2022, 08:04 AM | #6 |
Member
Posts: 12
Karma: 10
Join Date: Jun 2017
Location: In the middle of nowhere in Germany
Device: Android Tablet
|
I returned to the non-flatpak Sigil version 1.1.0 and had no problems with my script and flatpak gimp.
I will test your suggestions later. Thx. |
11-25-2022, 09:18 AM | #7 |
Sigil Developer
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Unfortunately, if your shell script is not part of the sandbox, a change must be done at the Sigil code level and would be completely specific to flatpak (and not on our list of things to do).
Flatpak's sandbox approch has similar issues with other Qt KDE editors like Kate that use things like plugins, use external apps of the user's choosing, ... just like Sigil. The KDE solution is to remove Kate from flatpak completely since it would need too much help and support for what they called "broken sandbox model" of flatpak. See the full discussion here: https://bugs.kde.org/show_bug.cgi?id=431223 Perhaps Sigil should follow the same approach as Kate since the flatpak version of Sigil will not be able to use "Open With" to open external apps of the user's choice, not be able to use Plugins/java, not be able to run PageEdit as XEditor, not be able to open external browsers under flatpak. This is true because neither the default tmp folder for edited files open in Sigil and no commonly available user apps that people might want to use typically live in the user's /home directory which is the only place the sandbox has full access to. Just building your own Sigil on Linux would be a much easier and simpler way to use the latest versions of Sigil on older Linux systems. Last edited by KevinH; 11-25-2022 at 09:22 AM. |
11-25-2022, 09:40 AM | #8 |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Why do you need to sandbox Sigil when you know 100% that it's safe?
|
11-25-2022, 10:03 AM | #9 |
Sigil Developer
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
|
The sandboxing is inherent/built-in to flatpak and mandatory. For some users on older Linux boxes the version of Sigil is very old, so some people choose to use an app container like flatpak to get access to a newer version of Sigil instead of just building it themselves.
Other app containers like AppImage are not sandboxed by default. Sandboxing single function apps on webservers makes sense but sandboxing a general use editor built with plugins and with the ability to open externals apps of the user's choice are not particularly well suited to sandboxing. This is the same issues faced by Kate when the flatpak version is used. Last edited by KevinH; 11-25-2022 at 10:14 AM. |
11-25-2022, 10:18 AM | #10 |
Sigil Developer
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
|
From what I just read, if you install your own set of apps into your personal /home and set Sigil's Preferences for the tmp folder to be someplace in your own /home directory as well you *might* be able to get the flatpak version of Sigil to work as is, but that would take some doing.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Flatpak and Java | jcsalomon | Sigil | 12 | 01-05-2024 09:37 PM |
Linux Mint 20: Binary or Flatpak? | enuddleyarbl | Calibre | 11 | 03-07-2021 08:04 PM |
Flatpak and Kindle | zoliky | Devices | 0 | 11-27-2020 11:20 AM |
Sigil does not start | Edwin49 | Sigil | 10 | 02-06-2014 08:30 AM |
Sigil will not start | menders | Sigil | 16 | 04-17-2012 12:14 AM |