Anyone have a Terminal command?

Discussion in 'macOS Mojave (10.14)' started by blackxacto, Oct 4, 2018.

  1. blackxacto macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #1
    I want to FORCE Mojave Books to open pdf's in my pdf editor, NOT PREVIEW. I have done the old select a pdf+Apple+I, then designate my editor to open all pdf's. DOES NOT work in Mojave.

    Anyone know a way?
     
  2. CopyChief macrumors regular

    Joined:
    Oct 9, 2007
    #2
    I was going to say, "I think this works the same way as it always has," but I just tried it and it throws an error. This has to be a bug, as it doesn't work to change defaults even to native Apple apps. I reported the error to Apple.
     
  3. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #3
    I just tried reassigning .log to a text editor in the way you describe, changing from the default, Console. Visually, when I select "Open With" it indeed looks like the assignment hasn't worked but when I double click it does open in my selected text editor. The Info dialog does show the correct app assigned also.

    I rebuilt launch services. Same behavior. The reassignment works but doesn't show correctly in the menu.

    Screen Shot 2018-10-04 at 1.39.52 PM.png
     
  4. blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #4
    --- Post Merged, Oct 4, 2018 ---
    Sorry, I’m confused. R u saying you got it to work?
     
  5. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #5
    Basically, yes. When I reassign a file type and hit change all in the Info dialog, that filetype does indeed open in the nominated application when open it by double clicking.

    The only real weirdness was that the right click -> open in menu didn't correctly reflect that
     
  6. chscag macrumors 68040

    chscag

    Joined:
    Feb 17, 2008
    Location:
    Fort Worth, Texas
    #6
    I believe Mojave will not allow your PDF editor over Preview. This is due to the new security procedures and the way GateKeeper operates in Mojave. You will probably have to go to Recovery, open Terminal, and turn off SIP in order to make changes. Not recommended, however.
     
  7. blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #7
    It did not work in my Mojave iMac. I did the old select a pdf, Apple+I, assign the editor to open the pdf, then assign all PDFs to open with editor, Close. Does not work here. Double clicking opens Preview every time.
    --- Post Merged, Oct 4, 2018 ---
    I will try turning off SIP. Have done it before. Reassigning, then turn SIP back on. It’ll be brief. But not sure why this would effect reassignment.
     
  8. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #8
    Ah. Sorry. You might try rebuilding launch services and see if that helps. Before you do this, be aware that it will reset all file associations to the defaults. You can either use an app like Onyx to do that or run the following command in Terminal.

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -apps u

    It will take a few minutes for file associations to be rebuilt so things like the dropdown in the Info dialog, and the menu in the Open With menu will take a while to display at first. Also, there will be not insignificant CPU usage from the lsd process while it rebuilds.

    I was able to reassign PDF files just now and I have, and always have had SIP enabled.
     
  9. blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #9
    Thank you very very much. Will try that too tonite.
     
  10. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #10
    You're welcome. Hope it helps. I'll check back later and let you know if I have any other ideas too.
     
  11. chscag macrumors 68040

    chscag

    Joined:
    Feb 17, 2008
    Location:
    Fort Worth, Texas
    #11
    Are you running Mojave or High Sierra? The new security changes were put in place in Mojave. Prior to that, you could turn GateKeeper off, however, in Mojave you can not without first turning off SIP.
     
  12. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #12
    Mojave. You don't need to disable Gatekeeper or SIP to change file associations though. It's still right there in Finder (for now at least)
     
  13. chscag macrumors 68040

    chscag

    Joined:
    Feb 17, 2008
    Location:
    Fort Worth, Texas
    #13
    Right. I wasn't referring to file associations though. It's new downloads that are affected or applications that have not been signed by Apple. Which PDF editor is our OP trying to use instead of Preview?
     
  14. Feenician macrumors 601

    Feenician

    Joined:
    Jun 13, 2016
    #14
    Ah, I see your line of thinking now. That OP didn’t mention whether they could open the app, right? Though I think if that was the issue and he changed a file association on a file he’d see a Gatekeeper error, rather than the file opening in Preview.
     
  15. blackxacto, Oct 4, 2018
    Last edited: Oct 4, 2018

    blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #15
    OP:
    I opened Mojave Books, double click a pdf in Books, it opens in Preview.
    Restarted holding apple+R, Terminal/ csrutil disable/ return/ restart/
    Terminal/cleared launch services/few errors, see attached jpg/
    Apple+I, a pdf, a jpeg, affinity photo doc, psd doc, individually changed the ALL SIMILAR Docs setting
    Restarted holding apple+R/Terminal/csrutil enable/return/restart/
    Opened Mojave Books, double-click a pdf in Books, it opens in Preview.

    I only want pdf's to open in my pdf editor, ONLY. What else is there?
    Anyone got a terminal command for Mojave in Terminal as I asked before?

    What does it matter what brand pdf editor? I'm assigning default opening apps. PDFExpert

    Addendum: I am now seeing (90%) MOST pdfs in Mojave Books double-click open in Mojave Preview, but some special long multipage pdfs open in PDFXpert as I want ALL pdfs to open. What the heck is going on?
     

    Attached Files:

    • xx.jpg
      xx.jpg
      File size:
      1 MB
      Views:
      20
  16. chscag macrumors 68040

    chscag

    Joined:
    Feb 17, 2008
    Location:
    Fort Worth, Texas
    #16
    I just checked. PDFExpert is offered in the Mac App Store so there should be no problem with it being an app which is signed by Apple and approved. IOW, no blocking by GateKeeper. Don't know if this will work but give it a try:

    Open System Preferences, Security & Privacy. Select the Privacy tab. On the left, select Full Disk Access. Click on the small lock at the bottom and enter your admin password to open the lock. Click on the small + sign at the bottom and then enter PDFExpert. Click the lock to close it and exit System Preferences. Now, try to change the file association to PDFExpert from Preview. Let us know if that works for you.
     
  17. blackxacto, Oct 5, 2018
    Last edited: Oct 5, 2018

    blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #17
    Just added Books, PDFXpert, Preview to FULL DISK ACCESS/ Rebooted/ 90% pdfs open (from Books) in Preview, 10% PDFXpert.

    A PDF - made after Mojave was installed. Double-Click opens from Book app in Preview
    B PDF - was made before Mojave was installed: Double-Click opens from Book app in PDFXpert editor

    A=macOS Version 10.14.1 (Build18B45d) Quartz PDF Context. 8.5x11
    B=Mac OSX 10.13.6 Quartz PDF Context. 10x12.74

    I have done this with SIP and without. I have done this with apps added to Full Disk Access and without.

    Does anyone see a difference in the pdfs that is causing this issue?
    Why would it matter if a pdf is made after Mojave, and before Mojave?

    There must be some Terminal Command that will over-ride this issue. When I double click any pdf, anywhere on my iMac, I ONLY want it to open in PDFXpert app.


    ab.jpg
     

    Attached Files:

  18. blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #18
    Did some more trouble shooting today. I have narrowed the situation.

    I make multi page pdfs from textedit documents, then print to pdf. Various dimensions, but all made the same way. Before Mojave, When I placed a newly made pdf into iBooks, I could double click the pdf in iBooks and the pdf would always open in my pdf editor (As I had assigned all pdf's).

    – Here comes Mojave –

    If I make a pdf the same way as before Mojave and leave the pdf on my desktop, double clicking opens in my pdf editor, always.

    –HOWEVER– If I move the newly made pdf into Mojave Books, double click the pdf in Books, the pdf always opens in PREVIEW. Even if the default app to open it is my editor.

    What does this sound like to anyone? Does Mojave Books break the default settings?
     
  19. blackxacto thread starter macrumors 6502a

    blackxacto

    Joined:
    Jun 15, 2009
    Location:
    Middle TN
    #19
    I have used terminal commands to clear the Mojave LaunchServices, I have wiped the hard drive and migrated back my data twice in the past four days. Called Apple Support and no one of them have an answer. Yes, I did the Apple+I to assign to all pdf's my editing app PDF Expert. All pdf's even in Books show a default to open in PDF Expert. But if I open a pdf stored in Mojave Books, and made after Mojave upgrade, it opens in PREVIEW. What the hell is happening in the app Mojave Books, to block the assigned app opening?

    I'm going to start another thread w a different title, maybe I catch someone who hasn't seen this.
     

Share This Page

18 October 4, 2018