Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 8 of 8
  1. #1
    frey is offline Registered User
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    default application for unrecognised filetypes

    Hey there

    Is there any way to launch a default application when I try to open an unrecognised file type?

    On Windows I had it set up so that if I double-clicked on an unrecognised file type it would open it up in a good text editor (this was a registry hack). How do I do something like this on my new Mac?

    Also, can I make my Mac remember my Open With applications? I sometimes want to open .js files with a text editor rather than with Safari (the default) - it's a pain having to go through the whole Open With->Other->locate the text editor steps, I'd prefer the text editor to live on the Open With menu by default.

  2. #2
    MisterMe is offline Registered User
    Join Date
    Jun 2002
    Location
    USA
    Posts
    3,986
    Thanks
    7
    Thanked 140 Times in 136 Posts
    Drag & Drop works.

  3. #3
    frey is offline Registered User
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by MisterMe View Post
    Drag & Drop works.
    But drag and drop is still more of a pain than just double-clicking and opening in a text editor by default. I'm a programmer, I like to see the contents of random files, and I like to do so often, and I don't like using the mouse so much.

  4. #4
    MisterMe is offline Registered User
    Join Date
    Jun 2002
    Location
    USA
    Posts
    3,986
    Thanks
    7
    Thanked 140 Times in 136 Posts
    Quote Originally Posted by frey View Post
    But drag and drop is still more of a pain than just double-clicking and opening in a text editor by default. I'm a programmer, I like to see the contents of random files, and I like to do so often, and I don't like using the mouse so much.
    In order to get what you want, you are going to have to do some work. As a programmer, you know this already.

  5. #5
    frey is offline Registered User
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, I do. Problem is I have no idea how to even begin, which is why I'm asking here. Should I be looking for some obscure preferences, or is there a file somewhere I can edit, and if so, where? Or am I going to have to write my own context-menu plugin? Can you even write context-menu plugins on OSX? and if so, how do you apply them to all unrecognised files, rather than specific file types?

  6. #6
    DeltaMac is offline Tech
    Join Date
    Jun 2001
    Location
    Dover, DE
    Posts
    7,703
    Thanks
    3
    Thanked 629 Times in 619 Posts
    You already have a contextual menu that gives you an Open With item. Clicking on that gives you a variety of apps that OS X thinks is a likely match. If you prefer another app, choose Other... and browse to your desired app. Likely that you wouldn't need to do that too often. If you have a normal doc that you open, you can set all like documents to open with the app of your choosing in Get Info for that file.

    I prefer drag-n-drop, as you will immediately know if the app will even try to open your file, then quickly move to a different possible app. I have a folder on the desktop with aliases for a variety of video apps. Takes 2 seconds to drag a potential file to the various apps. If the app doesn't highlight, then I move on. Easy to rule out a couple of dozen choices in one mouse-rollover.
    Last edited by DeltaMac; March 11th, 2007 at 04:19 PM.
    Serendipity is a lucky guess !

  7. #7
    Mikuro's Avatar
    Mikuro is offline Crotchety UI Nitpicker
    Join Date
    Mar 2005
    Posts
    2,832
    Thanks
    8
    Thanked 74 Times in 64 Posts
    Quote Originally Posted by frey View Post
    Also, can I make my Mac remember my Open With applications? I sometimes want to open .js files with a text editor rather than with Safari (the default) - it's a pain having to go through the whole Open With->Other->locate the text editor steps, I'd prefer the text editor to live on the Open With menu by default.
    Yes. Select the file and go to File > Get Info. Set your preferred app there, and your selection will stick for that file. You can also set that app to be the default for all files of that same type.

    As a shortcut to making your selection stick for the one file, you can hold down the Option key while using the contextual menu. That will change "Open with" to "Always open with".

    I'm not aware of any way to set a catch-all for unknown file types. I've never really looked for one, though, so that doesn't mean there is no way. If you're itching to hack your way to a solution, I recommend starting your quest with ~/Library/Preferences/com.apple.LaunchServices.plist. RCDefaultApp could also prove useful.
    Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8
    MacBook Pro — 2.26GHz C2D, 8GB RAM — OS 10.6.8

    Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc

  8. #8
    Satcomer's Avatar
    Satcomer is offline In Geostationary Orbit
    Join Date
    Jul 2002
    Location
    Northern Virginia
    Posts
    8,886
    Thanks
    54
    Thanked 385 Times in 369 Posts
    Get Info on the file like Mikuro said or get the System Preference pane RCDefaultApp.
    Mac Pro Dual 2.8 Quad (2nd gen), 14G Ram, Two DVD-RW Drives, OS X 10.8.3
    2006 Mac Book Pro 2.16 (first Gen) OS X 10.7.4
    2TB Time Capsule, 2 TB
    32G iPhone 4S Black, iPad (3rd Gen) 32G Black

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •