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?

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

1 Answer 1

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'
2
  • Why does this work? and brew is not part of OS X
    – mmmmmm
    Commented Jan 18, 2015 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. Commented Jan 20, 2015 at 10:22

You must log in to answer this question.

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