Skip navigation
This discussion is archived

open command in Terminal

2392 Views 9 Replies Latest reply: Nov 15, 2009 3:46 PM by Juan Terrazas RSS
Juan Terrazas Calculating status...
Currently Being Moderated
Nov 14, 2009 1:22 PM
When I try to open a folder from Terminal using the open command, instead of a Finder window opening for the folder, another Terminal window opens up with contents like the following:

*Last login: Sat Nov 14 16:14:45 on ttys001*
*jt-imac:~ terrator$ /Users/terrator/Music ; exit;*
*-bash: /Users/terrator/Music: is a directory*

*\[Process completed\]*

In addition, I get the same symptom when I try to open folders from the Dock and Spotlight so I think the problems are related.

I have done the following in trying to resolve this problem:

1. Repair permissions and repair disk with Disk Utility using the Installation DVD after booting from it.

2. Repair LaunchServices using Onyx

3. Created a test user to see if this user has the same problem. No, the problem doesn't happen in this user.

4. Deleted the com.appl.terminal.plist and some other plist files.

5. Reinstalled Snow Leopard on top of my existing installation.

None of those attempts have resolved the problem.

Anyone has any ideas on how to resolve this problem?
iMac Intel 24, Mac OS X (10.6.2)
  • twtwtw Level 5 Level 5 (4,585 points)
    Currently Being Moderated
    Nov 14, 2009 1:41 PM (in response to Juan Terrazas)
    what you've given here doesn't use the open command. that would look like this: open /Users/terrator/Music. does that work? and what do you mean by 'the same symptoms' - are you saying that trying to open a folder from the dock opens a terminal window and tells you that a path is a directory?

    do folder windows open normally in the Finder (by double-clicking)?
    MacBook Pro (2,2), Mac OS X (10.5)
  • twtwtw Level 5 Level 5 (4,585 points)
    Currently Being Moderated
    Nov 14, 2009 2:52 PM (in response to Juan Terrazas)
    do you see any pertinent errors listed in do you have any third-party hacks or haxies installed?
    MacBook Pro (2,2), Mac OS X (10.5)
  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    Nov 14, 2009 5:39 PM (in response to Juan Terrazas)
    Do you have that Microsoft XML Converter installed? I have seen some similar reports from people with that software. I can't seem to find a clever utility to list what application is associated with a file type or folder.
    MacBook, Mac OS X (10.5.8), 2.0 Ghz/4GB Ram/200 HD
  • Jun T. Level 4 Level 4 (2,185 points)
    Currently Being Moderated
    Nov 14, 2009 9:21 PM (in response to Juan Terrazas)
    Does the following work?
    *open -a Finder Music*
    If this works, then maybe LaunchServives database is broken?

    You can use lsregister command to view/modify the database. The lsregister command is in
    /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fram ework/Support

    cd to this directory, and run
    *./lsregister -h*
    to see some help info. To view the whole contents of the database
    *./lsregister -dump | less*
    Search for a string "" and "", and see what types are registered for each app. In my case Folder is registered under as follows (id number may differ):

    claim id: 5964
    name: Folder
    rank: Default
    roles: Editor
    flags: apple-default apple-internal
    bindings: public.folder, 'fold'
    iMac, MB Pro, MB Air, iPhone 3G and iPod's, Mac OS X (10.5.8), also 10.6.2
  • BobHarris Level 6 Level 6 (12,535 points)
    Currently Being Moderated
    Nov 15, 2009 3:26 PM (in response to Juan Terrazas)
    For I don't see anything with name "Folder" but I see one with roles "Editor":

    The Terminal does not execute anything. It is a character terminal emulator that is connected to pseudo (fake) serial terminal device (/dev/pty**)

    The other side of that pty device is attached to an independent process that happens to be running a shell of some kind (default being the bash shell).

    The shell will create child processes on demand and run commands requested by the user. Any text send to standard out or standard error by the shell or any of the children processes started by the shell, will be sent to the pty and the Terminal will read the other side of the pty and display the text in the Terminal window.

    The Terminal will also listen to the keyboard, and send any text you type to the pty where the shell or a child process created by the shell will read the other side of the pty and do what you tell it via the keyboard.

    That is the Terminal's job. communicate through this fake serial device. It does not execute commands. I knows nothing about Folders, nor files, nor TYPE/CREATOR fields, nor file type suffixes. Just reads text you type, and displays text sent back from the shell or its child processes.
    Mac OS X (10.5.8), MacBook, PowerMac G5, Mac mini, iPod Touch, iBook G4, MacBook Pro, iMac G4


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.