You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the /usr in the flatpak sandbox is different from the host /usr, it's difficult to edit files there with flatpak'd vim: org.vim.Vim /usr/etc/dracut.conf.d/endless.conf results in vim opening a new empty file in a new directory rather than editing the file at that location on the host. Since nano is not installed via flatpak, nano /usr/etc/dracut.conf.d/endless.conf works fine.
A workaround is to use org.vim.Vim /run/host/usr/etc/dracut.conf.d/endless.conf but it would be nice to have a seamless solution to this.
The text was updated successfully, but these errors were encountered:
Yeah. If you have ideas for what a seamless solution would be, I'm all ears. I do have some alternative seams you might like to try!
I have EDITOR=org.vim.Vim, which means sudoedit /usr/etc/dracut.conf.d/endless.conf does the right thing, because sudoedit copies the file to a temporary file in /var/tmp, which is visible in the sandbox for this reason. https://github.com/flathub/org.vim.Vim/blob/master/org.vim.Vim.json#L18
flatpak run has a --file-forwarding argument. Try flatpak run --file-forwarding org.vim.Vim @@ /usr/etc/dracut.conf.d/endless.conf. The .desktop files are rewritten to use this syntax so if you browse to /usr/etc/dracut.conf.d/ in Nautilus and open the file in (G)Vim then it can open the file. If the path in question is visible at that path inside the sandbox, it's passed through verbatim; otherwise it's mapped through the document portal. I think this could be made smarter in Flatpak itself: files in /usr could be mapped to /run/host/usr if the latter is visible.
I previously opened flatpak/flatpak#1947 about something similar and the conclusion was that it's not really possible to make the bare org.vim.Vim wrapper script smarter (without requiring that the user type @@ themself) because Flatpak can't otherwise distinguish between filename arguments and options. I've grown used to typing it out longhand but also at one point had a wrapper script, vim-ff, which was effectively an alias for flatpak run --file-forwarding org.vim.Vim @@ "$@".
Since the
/usr
in the flatpak sandbox is different from the host/usr
, it's difficult to edit files there with flatpak'd vim:org.vim.Vim /usr/etc/dracut.conf.d/endless.conf
results in vim opening a new empty file in a new directory rather than editing the file at that location on the host. Since nano is not installed via flatpak,nano /usr/etc/dracut.conf.d/endless.conf
works fine.A workaround is to use
org.vim.Vim /run/host/usr/etc/dracut.conf.d/endless.conf
but it would be nice to have a seamless solution to this.The text was updated successfully, but these errors were encountered: