Ok I implemented a wrapper around xdg-open
as you suggested and it works perfectly fine!
It’s not as smooth as vanilla and it’s opening the editor in a separate window of course but it really fine.
Thank you very much everyone for your help, I really appreciate!
Just to summarized everything:
- Use homeishome-launch to make Go use the right home directory
- Use
xdg-open
to edit the files (add add thedesktop
interface) - Write a wrapper around
xdg-open
to wait for the user to finish editing a file - Make
$TMPDIR
point to$SNAP_USER_DATA
to allowxdg-open
to access temp files