[lxc-users] Snap 2.20 - Default Text Editor
Stéphane Graber
stgraber at ubuntu.com
Fri Nov 24 07:44:27 UTC 2017
Because of the way the snap works, it doesn't actually have access to
your system's filesystem and so can't run commands from your system.
Only binaries that are part of the snap or the minimal copy of Ubuntu
that the snap uses can be used by it.
We ship a copy of vi in our snap to make the editor function work,
that's why you get vi regardless of what EDITOR/VISUAL points to in your
environment.
You can workaround this by using something like:
lxc config show NAME > out.yaml
<favorite editor> out.yaml
lxc config edit NAME < out.yaml
The same is possible for all the other objects which come with an "edit"
command.
On Wed, Nov 22, 2017 at 09:57:11AM -0500, Lai Wei-Hwa wrote:
> Ron,
>
> You're telling me the normal way to set your default editor. I know how to do this. The problem is that my default editor is nano, which I want, but when I:
> $ lxc profile edit default
> It still opens in VI. This is an LXC issue.
>
> Thanks!
> Lai
>
> ----- Original Message -----
> From: "Ron Kelley" <rkelleyrtp at gmail.com>
> To: "lxc-users" <lxc-users at lists.linuxcontainers.org>
> Sent: Tuesday, November 21, 2017 10:07:32 PM
> Subject: Re: [lxc-users] Snap 2.20 - Default Text Editor
>
> sudo update-alternatives --config editor
>
> http://vim.wikia.com/wiki/Set_Vim_as_your_default_editor_for_Unix
>
>
>
>
>
> > On Nov 21, 2017, at 7:49 PM, Lai Wei-Hwa <whlai at robco.com> wrote:
> >
> > Thanks, but that's the problem, it's still opening in VI
> >
> > Thanks!
> > Lai
> >
> > ----- Original Message -----
> > From: "Björn Fischer" <bf at CeBiTec.Uni-Bielefeld.DE>
> > To: "lxc-users" <lxc-users at lists.linuxcontainers.org>
> > Sent: Tuesday, November 21, 2017 7:46:58 PM
> > Subject: Re: [lxc-users] Snap 2.20 - Default Text Editor
> >
> > Hi,
> >
> >> $ lxc profile edit default
> >> Opens in VI even though my editor is nano (save the flaming)
> >>
> >> How can we edit the default editor?
> >
> > $ EDITOR=nano
> > $ export EDITOR
> >
> > Cheers,
> >
> > Björn
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20171124/96b02ea1/attachment.sig>
More information about the lxc-users
mailing list