Re: [lxc-users] Snap 2.20 - Default Text Editor
Or perhaps you can consider providing plug interfaces for other editors (editors would need to be snaps as well and provide slot interfaces)? Thanks! Lai - Original Message - From: "Lai Wei-Hwa" <wh...@robco.com> To: "lxc-users" <lxc-users@lists.linuxcontainers.org> Sent: Monday, November 27, 2017 1:06:56 PM Subject: Re: [lxc-users] Snap 2.20 - Default Text Editor Thanks for the clarification, Stephane. I was actually unaware that snaps couldn't interact with binaries outside of the ones it owns. Makes sense and adds some security. That being said, are there any plans to add nano and/or vim to the snap package? While it would make for a larger snap package, a lot of our breed are quite particular about their editors and I can see this being an annoyance for many. Thanks! Lai - Original Message - From: "Stéphane Graber" <stgra...@ubuntu.com> To: "lxc-users" <lxc-users@lists.linuxcontainers.org> Sent: Friday, November 24, 2017 2:44:27 AM Subject: Re: [lxc-users] Snap 2.20 - Default Text Editor 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 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" <rkelley...@gmail.com> > To: "lxc-users" <lxc-users@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 <wh...@robco.com> wrote: > > > > Thanks, but that's the problem, it's still opening in VI > > > > Thanks! > > Lai > > > > ----- Original Message - > > From: "Björn Fischer" <b...@cebitec.uni-bielefeld.de> > > To: "lxc-users" <lxc-users@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@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > ___ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Snap 2.20 - Default Text Editor
Thanks for the clarification, Stephane. I was actually unaware that snaps couldn't interact with binaries outside of the ones it owns. Makes sense and adds some security. That being said, are there any plans to add nano and/or vim to the snap package? While it would make for a larger snap package, a lot of our breed are quite particular about their editors and I can see this being an annoyance for many. Thanks! Lai - Original Message - From: "Stéphane Graber" <stgra...@ubuntu.com> To: "lxc-users" <lxc-users@lists.linuxcontainers.org> Sent: Friday, November 24, 2017 2:44:27 AM Subject: Re: [lxc-users] Snap 2.20 - Default Text Editor 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 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" <rkelley...@gmail.com> > To: "lxc-users" <lxc-users@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 <wh...@robco.com> wrote: > > > > Thanks, but that's the problem, it's still opening in VI > > > > Thanks! > > Lai > > > > - Original Message ----- > > From: "Björn Fischer" <b...@cebitec.uni-bielefeld.de> > > To: "lxc-users" <lxc-users@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@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > ___ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Snap 2.20 - Default Text Editor
Can you check if you VISUAL environment variable is set to vi? Here's the relevant code for opening the text editor in lxd: https://github.com/lxc/lxd/blob/70ce5ff10417133417fdfd611a7ec148e4590a44/shared/util.go#L596 Benjamin On 2017-11-22 01:45, Lai Wei-Hwa wrote: > $ lxc profile edit default > Opens in VI even though my editor is nano (save the flaming) > > How can we edit the default editor? > > Best Regards, > > LAI WEI-HWA > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users 0xAD7427D8.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Snap 2.20 - Default Text Editor
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" <rkelley...@gmail.com> To: "lxc-users" <lxc-users@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 <wh...@robco.com> wrote: > > Thanks, but that's the problem, it's still opening in VI > > Thanks! > Lai > > - Original Message - > From: "Björn Fischer" <b...@cebitec.uni-bielefeld.de> > To: "lxc-users" <lxc-users@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@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
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 <wh...@robco.com> wrote: > > Thanks, but that's the problem, it's still opening in VI > > Thanks! > Lai > > - Original Message - > From: "Björn Fischer" <b...@cebitec.uni-bielefeld.de> > To: "lxc-users" <lxc-users@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@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Snap 2.20 - Default Text Editor
Thanks, but that's the problem, it's still opening in VI Thanks! Lai - Original Message - From: "Björn Fischer" <b...@cebitec.uni-bielefeld.de> To: "lxc-users" <lxc-users@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@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
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@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] Snap 2.20 - Default Text Editor
$ lxc profile edit default Opens in VI even though my editor is nano (save the flaming) How can we edit the default editor? Best Regards, Lai Wei-Hwa ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users