Multiple configuration editors

I noticed that for the lxc package there are multiple editors for the configuration file. The user can choose between nano, vim.tiny or some other editor with environment variables EDITOR and VISUAL.

That is only available to packages with classic confinement, right? I am packaging just a single editor (nano) for that same purpose with the fidus writer snap as couldn’t find a way to access the system wide ones. Is that correct?

Correct. Other than including all the editors in your snap, there’s no way to run those from a strict snap.

This would have to be a specific interface and likely support from userd, snapd's user session counterpart.

We’re working on a way to run other apps from privileged snaps, and are in need of running a command in the user’s default terminal app. Something similar would have to be devised for editing files in the user’s preferred editor.

1 Like