Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2022, 08:53 AM   #1
HAL.Unke
Member
HAL.Unke began at the beginning.
 
Posts: 11
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 @@
Thanks for any help!
HAL.Unke is offline   Reply With Quote
Old 11-24-2022, 09:00 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,568
Karma: 4500168
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.
KevinH is offline   Reply With Quote
Old 11-24-2022, 09:40 PM   #3
HAL.Unke
Member
HAL.Unke began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jun 2017
Location: In the middle of nowhere in Germany
Device: Android Tablet
Quote:
Originally Posted by KevinH View Post
That should work.
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
HAL.Unke is offline   Reply With Quote
Old 11-24-2022, 10:32 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,568
Karma: 4500168
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());
    }
So as long as the image file exists and the shell script exists and is executable, it should pass the full file path to the shell script.

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 10:41 PM.
KevinH is offline   Reply With Quote
Old 11-24-2022, 11:54 PM   #5
Sarmat89
Addict
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 390
Karma: 2146264
Join Date: Nov 2015
Device: none
Use flatpak-spawn instead.
Sarmat89 is offline   Reply With Quote
Old Yesterday, 09:04 AM   #6
HAL.Unke
Member
HAL.Unke began at the beginning.
 
Posts: 11
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.
HAL.Unke is offline   Reply With Quote
Old Yesterday, 10:18 AM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,568
Karma: 4500168
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; Yesterday at 10:22 AM.
KevinH is offline   Reply With Quote
Old Yesterday, 10:40 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 68,586
Karma: 113223749
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?
JSWolf is offline   Reply With Quote
Old Yesterday, 11:03 AM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,568
Karma: 4500168
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; Yesterday at 11:14 AM.
KevinH is offline   Reply With Quote
Old Yesterday, 11:18 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,568
Karma: 4500168
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.
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil Flatpak and Java jcsalomon Sigil 8 10-30-2022 04:54 PM
Linux Mint 20: Binary or Flatpak? enuddleyarbl Calibre 11 03-07-2021 09:04 PM
Flatpak and Kindle zoliky Devices 0 11-27-2020 12:20 PM
Sigil does not start Edwin49 Sigil 10 02-06-2014 09:30 AM
Sigil will not start menders Sigil 16 04-17-2012 01:14 AM


All times are GMT -4. The time now is 11:47 AM.


MobileRead.com is a privately owned, operated and funded community.