user3089610
user3089610

Reputation:

Showing graphical interface from text editor when using vagrant ssh from cmd?

I am using vagrant ssh though cmd to a oracle virtual box running Ubuntu. I am trying to use sublime to edit my files through vagrant ssh but the application will not popup through cmd (running subl will do nothing). I think its because its in headless mode? Is there any way I can bypass this?

Upvotes: 0

Views: 1098

Answers (1)

Terry Wang
Terry Wang

Reputation: 13920

To edit the files within the guest, you need to configure synced folders. See -> http://docs.vagrantup.com/v2/synced-folders/index.html

vagrant ssh simply establish a ssh connection to the vagrant base box, and they are normally Linux base installs without X or even its client libs, you won't be able to run GUI applications without X Server.

NOTE: technically it is possible to install X client libs in the vagrant base box and do X11 forwarding to your host (provided that there is a X Server running e.g. Ubuntu with GNOME or Xming on Windows) -> ssh -p 2222 -X vagrant@localhost, once the connection is established, when you run subl it'll be displayed on your host (although it is physically in the guest).

Upvotes: 1

Related Questions