Search code examples
vagrantatom-editorshared-directory

Using Atom editor in the Vagrant


I have set up Ubuntu Vagrant box on my Mac. In the Ubuntu terminal I would like to type command Atom foldername (just like in Mac terminal) which would open Atom code editor that is installed on my Mac. Is it possible?


Solution

  • As the other answer says that's not possible. what you can do is either configure a sync folder something like this

     config.vm.synced_folder "macfolder/", "/srv/vagrantfolder"
    

    That basically will do the same as your vagrant folder, only you can add aditional folders. With that you are sharing folders so you can use your atom editor and your changes will be reflected on the ubuntu VM.

    Or you can install atom on your ubuntu and forward the x server like this

      config.ssh.forward_x11 = true
    

    Im no mac user so not sure if you need to install an X server on your mac. basic google search points me to this direction

    http://www.xquartz.org/

    That will give you the feeling you are using the atom editor in your mac. Only your mac is only "rendering" the editor

    Hope it helps