2
[~%]open ~/Pictures/upload.png
LSOpenURLsWithRole() failed with error -10810 for the file /Users/bryanhunt/Pictures/upload.png.

Before this update I used to be able to open images, PDFs, etc. from the command line.

Now I have to open the directory, and click on the file to open it, which is a waste of my finger strength.

Anyone know how to make it work again?

  • What update are you referring to? Yosemite? iTerm2? tmux? – grg Jan 17 '15 at 12:15
  • Here is a similar question on SuperUser. Perhaps one of these answers would work for you. superuser.com/questions/834525/… – Alistair McMillan Jan 17 '15 at 14:09
  • 1
    That looks like the best bet, looks like it is only a problem for tmux users. – bryan hunt Jan 18 '15 at 19:24
  • Yeah it works, ugly hack going on there :) – bryan hunt Jan 18 '15 at 19:32
4

The fix.

Install homebrew.

Install reattach-to-user-namespace:

 brew install reattach-to-user-namespace

Then create an alias which your shell can use:

 alias open='reattach-to-user-namespace open'
  • Why does this work? and brew is not part of OS X – Mark Jan 18 '15 at 19:58
  • @Mark You sohuld read about Bootstrap Namespaces here: developer.apple.com/library/mac/technotes/tn2083/_index.html#//… . There's common problem for devs when they want to launch GUI app from daemon for example. That's why when running tmux You have to attach to User namespace in order to be able to "talk" to proper launchd. – Mateusz Szlosek Jan 20 '15 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .