Adding NFO Filetype to QuickLook

Discussion in 'macOS' started by covertsurfer, Jul 30, 2008.

  1. covertsurfer macrumors 6502a

    Joined:
    Jan 18, 2007
    #1
    I have found a few posts saying you can edit the plist of the application you want to associate this with and it should just work. However I cannot get it to work. I use Smultron to open NFO files as they are text based but I cannot use QuickLook for NFO files.

    Has anyone got this working?
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    This should work - however, getting it working requires delving into the details of Apple's Universal Type Identifier (UTI) system.

    Essentially, what you need to do is tell Mac OS X that NFO files are just plain text files with an NFO extension. Take a look at Simultron's Info.plist file in Apple's Property List Editor tool (comes with the developer tools). There should be a section in there with file extensions and their associated UTI mappings. You need to add an entry to this section.
     
  3. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
  4. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #4
    You'll need to rebuild the LaunchServices database for the change to take effect. There's a Terminal command you can run to do this.
     
  5. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
    #5
    I did log off and log on again but that didn't work, maybe this will do it
     
  6. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
    #6
    I can't get the LaunchServices thing to work. Terminal says "command not found"
     
  7. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #7
    Make sure you put that long string of text on ONE line. It won't work otherwise - oh, and you'll need to remove those backslashes at the end, too.

    The final command will look something like this:
    Code:
    /System/Library/Frameworks/ApplicationServices.framework\Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
     
  8. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
    #8
    I now get No such file or directory

    I'm on Leopard if that matters?
     
  9. kolax macrumors G3

    kolax

    Joined:
    Mar 20, 2007
    #9
    QuickLook is only available on Leopard ;)
     
  10. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
    #10
    Alright smarty pants!

    I got it working with the following for those that want to do it.

    Edit the TextEdit plist:

    <key>UTExportedTypeDeclarations</key>
    <array>
    <dict>
    <key>UTTypeConformsTo</key>
    <array>
    <string>public.text</string>
    <string>public.plain-text</string>
    </array>
    <key>UTTypeDescription</key>
    <string>NFO information file</string>
    <key>UTTypeIdentifier</key>
    <string>com.macromates.textmate</string>
    <key>UTTypeTagSpecification</key>
    <dict>
    <key>com.apple.ostype</key>
    <string>TEXT</string>
    <key>public.filename-extension</key>
    <array>
    <string>nfo</string>
    </array>
    </dict>
    </dict>
    </array>

    Then run the following in the Terminal : `locate lsregister` -kill -r -all local,system, user
     
  11. rauz macrumors newbie

    rauz

    Joined:
    Dec 13, 2007
    #11
    Worked great, covertsurfer! Thanks...been looking for a working solution to this that didn't require me to install Smultron or the likes.
     
  12. wrexual macrumors newbie

    Joined:
    Jul 2, 2008
    #12
    Legend!! Thanks covertsurfer!!
     
  13. La Curandera macrumors newbie

    Joined:
    Apr 28, 2007
    #13
    Sorry to grave dig a thread, but I'm can't get this to work (although I'm also flying blind with editing plist files!)

    Basically I copy/pasted covertsurfer's text into the info.plist at the end, just inside the last </array> - is that right?

    Then, after running the terminal command an nfo file now shows up with a Text Mate icon, and saying it's a text document in the description - but QuickLook just "zooms" the textmate icon, rather than showing the document itself.

    Am I missing something very simple?

    Thanks in advance
     
  14. wrexual macrumors newbie

    Joined:
    Jul 2, 2008
    #14
    I followed covertsurfer's instructions and added the code just after the last </array> which has worked fine for me.

    Code:
    ...
    ...
    ...
    </array>
    INSERT THE TEXT IN HERE
    </dict>
    </plist>
    
     
  15. procom32 macrumors newbie

    Joined:
    Aug 9, 2008
    #15
    hey everybody, can someone upload their plist for text edit, with nfo mod, i messed mine up and not it wont launch text edit.
     
  16. wrexual macrumors newbie

    Joined:
    Jul 2, 2008
    #16
    I've uploaded my plist for you. enjoy
     

    Attached Files:

  17. west.acre macrumors member

    Joined:
    Aug 26, 2008
    #17
    I'm new to mac, and I'm having trouble finding the textedit plist. Where do I find it?
     
  18. wrexual macrumors newbie

    Joined:
    Jul 2, 2008
    #18
    Locate the Textedit app in your Applications folder, right click on it and select "Show Package Contents". That'll open a finder window which will contain the Info.plist file.

    Open that file in Textedit and make your changes (keep a backup of the Textedit app if you're not feeling too confident with what you're doing).
     
  19. west.acre macrumors member

    Joined:
    Aug 26, 2008
    #19
    Many thanks, this was a great success! Thanks for your help.
     
  20. procom32 macrumors newbie

    Joined:
    Aug 9, 2008
  21. covertsurfer thread starter macrumors 6502a

    Joined:
    Jan 18, 2007
    #21
    Just going back to this after wiping my machine and couldn't get the terminal stuff to work for some reason so I remembered Onyx would rebuild the LaunchServices under the Maintenance tab!
     
  22. iRezaa macrumors newbie

    Joined:
    Feb 10, 2012
    #22
    Thanks guys y'all are awesome! :):apple:

     

Share This Page