1

Is there a way to open a browser window from within the vagrant vm? This is what it says:

$ open .
Couldn't get a file descriptor referring to the console
$ open http://localhost:3000
Couldn't get a file descriptor referring to the console

Since I'm in the vm on ubuntu, probably that open command doesn't work or doesn't exist I'm guessing. But is there a way to accomplish that?

3
  • 1
    Be clear please. You mention OSX in the title, a Vagrant VM and an Ubuntu VM in the question. What exactly are you trying to accomplish?
    – Tonny
    Commented Jun 10, 2014 at 21:52
  • I second @Tonny. Are you trying to open a web browser or a filesystem browser? And when you say native, do you mean Ubuntu-native (Vagrant VM guest OS native) or MacOSX-native (host OS native) browser?
    – Spiff
    Commented Jun 11, 2014 at 3:20
  • By the way, it seems Ubuntu's open(1) is actually a link to openvt(1), which apparently opens a command (such as a shell) in a new virtual terminal window. It's almost nothing like OS X's open(1) command, which does about the same thing as double-clicking an icon in the Finder (open directories in Finder, opens documents in their native editor, opens URLs in the default handler for that URL scheme). That "Couldn't get a file descriptor referring to the console" error is from Ubuntu's open[vt] command, not OS X's open.
    – Spiff
    Commented Jun 11, 2014 at 3:24

1 Answer 1

0

Assuming you want a rough equivalent of OS X's open command, but which opens things within the Ubuntu environment instead of OSX, then you probably want gnome-open or xdg-open.

See also: Linux equivalent command for "open" command on Mac/Windows?

You must log in to answer this question.