Open fastrizwaan opened 3 years ago
This is most likely due to /tmp not beeing accessible from within the flatpak sandbox, see https://docs.flatpak.org/en/latest/sandbox-permissions.html
I don't know geany nor flatpak well enough to make highly qualified suggestions, but in general would do one of this: 1) Make the temporary directory configurable, so I could set it to /home/user/.geany/tmp myself 2) If geany respects some environment variable like TMPDIR, maybe it could be set to some shared place that makes sense 3) If the blacklisting of /tmp is not put in stone, make that directory accessible for geany within the sandbox
In the hope that could help, HC
I don't think it's a thing of it being unable to access /tmp
. I am pretty sure that is something we already wrestled with and fixed in this package. The problem is indeed that xterm isn't available:
❯ flatpak run --command=bash org.geany.Geany
📦 [📦 org.geany.Geany ~]$ xterm
bash: xterm: command not found
I don't know why it wants to spawn a separate terminal instead of running the program in its integrated terminal. There is not a terminal available in the FD.O SDK runtime. However, VTE, which we do pull in (and I think was in the GNOME SDK), does provide its own terminal, /app/bin/vte-2.91
. We could patch Geany to make that the default, but I think that might be a fool's errand, because something tells me the name of that binary will change over time. I think the most straightforward way to fix this is to include a shell script called xterm
that serves as a wrapper around the VTE terminal.
Do any of the other maintainers object to this? This would likely fix #4 as well.
In com.visualstudio.code they install host-spawn which enables a host shell in the integrated terminal.
here's a solution:
replace xterm -e "/bin/sh %c"
with vte-2.91 -- /bin/bash -c "chmod +rx %c; %c;read"
Here's the traditional hello world program
compiles fine
Builds fine
Bug:
I think we should include xterm along with geany flatpak, so that C and other programs execute.
Thanks.