whomwah / qlstephen

A QuickLook plugin that lets you view plain text files without a file extension
https://github.com/whomwah/qlstephen
MIT License
2.74k stars 161 forks source link

NO longer working with OS ventura #136

Open Bradleeey opened 1 year ago

Bradleeey commented 1 year ago

Since the new OS update i cant preview the jsons like i used to.

frankrolf commented 1 year ago

https://github.com/whomwah/qlstephen/issues/23#issuecomment-1322438125

HofiOne commented 1 year ago

if you have no rosetta installed and you are on a silicon apple machine, you have to rebuild it from source, just clone the git dir, make, make install, just like it shown in the readme.md of the project it will build and install a compatible arm64 version

mbenoukaiss commented 1 year ago

if you have no rosetta installed and you are on a silicon apple machine, you have to rebuild it from source, just clone the git dir, make, make install, just like it shown in the readme.md of the project it will build and install a compatible arm64 version

I did that and followed the steps with xattr, the two qlmanage commands and restarting finder and it still doesn't work for me

HofiOne commented 1 year ago

Try to remove the old version first If you used brew

After that try to clean build and install the arm64 version. Running qlmanage -r was enough for me.

It should do the trick.

(please note, I have apple developer ID, so my manually built version is developer signed, that could be a difference, as that way gatekeeper will not block it)

neilyo51 commented 1 year ago

On Intel i5 MacBook Ventura 13.1 (22C65) brew install --cask qlstephen I got the message: ==> Installing Cask qlstephen ==> Moving QuickLook Plugin 'QLStephen.qlgenerator' to '/Users/neil_mb_2022/Library/QuickLook/QLStephen.qlgenerator' 🍺 qlstephen was successfully installed!

Didn't work so I tried

xattr -cr ~/Library/QuickLook/QLStephen.qlgenerator qlmanage -r qlmanage -r cache qlmanage -m and logged out but so far its not working. Can anyone confirm its working on Ventura as of 12/28/2022?

Metal-Snake commented 1 year ago

Can anyone confirm its working on Ventura as of 12/28/2022?

I'm on a MacStudio, using macOS Ventura 13.2 and I got it to work. In the Terminal type

mdls -name kMDItemContentType followed by space and then drag and drop the file you want to preview into the terminal window, press return, now it should say something like kMDItemContentType = "dyn.ah62d4rv4ge8063xt"

Now go to ~/Library/QuickLook/QLStephen.qlgenerator/Contents/ open the Info.plist file and search for the line <string>public.unix-executable</string> (it was line 20 for me) add a new line after that with the content <string>dyn.ah62d4rv4ge8063xt</string> (but use whatever you got from the mdls command above).

Save and close the file, now in Terminal type qlmanage -r now you should be able to preview your file using quicklook.

arobertn commented 1 year ago

Thank you @Diskutant, this worked beautifully. It should be added to the README. (In my case I had, e.g., TextMate and Emacs claiming various extensions, which is good, but prevents them from going to the public.data catch-all.)

seralouk commented 1 year ago

Can anyone confirm its working on Ventura as of 12/28/2022?

I'm on a MacStudio, using macOS Ventura 13.2 and I got it to work. In the Terminal type

mdls -name kMDItemContentType followed by space and then drag and drop the file you want to preview into the terminal window, press return, now it should say something like kMDItemContentType = "dyn.ah62d4rv4ge8063xt"

Now go to ~/Library/QuickLook/QLStephen.qlgenerator/Contents/ open the Info.plist file and search for the line <string>public.unix-executable</string> (it was line 20 for me) add a new line after that with the content <string>dyn.ah62d4rv4ge8063xt</string> (but use whatever you got from the mdls command above).

Save and close the file, now in Terminal type qlmanage -r now you should be able to preview your file using quicklook.

I tried to follow these steps but in the Info.plist there is no <string>public.unix-executable</string> line in my case. I am on a M2 macbook pro with Ventura.

Metal-Snake commented 1 year ago

Then you might have an old version of QLStephen installed. Try to install the latest version.

krasnyt commented 1 year ago

Works on MacOS Ventura 13.2.1 as of 15.3.2023.

seralouk commented 1 year ago

I solved the issue but all the above I mentioned are valid.

I have downloaded the latest version from here.

I have created a folder QuickLook and placed the file in Library/QuickLook/QLStephen.qlgenerator. Next, I right-click and go to "Show Package Contents" I open the Info.plist file (/QLStephen.qlgenerator/Contents/Info.plist) but there is no <string>public.unix-executable</string> line.

To solve this, I added this line manually and the one after running mdls -name kMDItemContentTyp, and now I have:

<array>
    <string>public.data</string>
    <string>public.content</string>
    <string>public.unix-executable</string>
    <string>public.ndjson</string>

After a qlmanage -r, it now works.

brudderman commented 1 year ago

I have downloaded the latest version from here.

I have created a folder QuickLook and placed the file in Library/QuickLook/QLStephen.qlgenerator. Next, I right-click and go to "Show Package Contents" I open the Info.plist file (/QLStephen.qlgenerator/Contents/Info.plist) but there is no public.unix-executable line.

To solve this, I added this line manually and the one after running mdls -name kMDItemContentTyp, and now I have:

public.data public.content public.unix-executable public.ndjson After a qlmanage -r, it now works.

Thanks for the step-by-step detail which even this old non-coder could follow! With it I was able to get qlStephen running again and even working with GPX files, something I have desired for a long time and never knew how to make it happen. And for the record, I'm a Mac mini with M2 Pro and Ventura 13.2.1.

JoshApos commented 1 year ago

@Diskutant Your comment was a great help, thanks! I had the same issue as @seralouk, where the only contents of the <array> preceding line 20 were

<string>public.data</string>
<string>public.content</string>

I added another <string> containing the line I got from running mdls -name kMDItemContentType immediately after those ones above and it worked for me after running qlmanage -r and relaunching Finder.

One additional note for anyone who runs into it: if the OS blocks qlStephen due to the 'unidentified developer' issue, you can grant an exception in System Settings. Immediately after the OS warns you that it has blocked qlStephen from running, navigate to the Privacy & Security section, scroll down to the Security heading and you'll find a note about qlStephen having been blocked next to an 'Open Anyway' button. Click that and the exception will having been granted.

grock304 commented 10 months ago

Can anyone confirm its working on Ventura as of 12/28/2022?

I'm on a MacStudio, using macOS Ventura 13.2 and I got it to work. In the Terminal type

mdls -name kMDItemContentType followed by space and then drag and drop the file you want to preview into the terminal window, press return, now it should say something like kMDItemContentType = "dyn.ah62d4rv4ge8063xt"

Now go to ~/Library/QuickLook/QLStephen.qlgenerator/Contents/ open the Info.plist file and search for the line <string>public.unix-executable</string> (it was line 20 for me) add a new line after that with the content <string>dyn.ah62d4rv4ge8063xt</string> (but use whatever you got from the mdls command above).

Save and close the file, now in Terminal type qlmanage -r now you should be able to preview your file using quicklook.

thanks

LouisCAD commented 8 months ago

This project provides the same feature set, and is compatible with latest macOS versions FYI: https://github.com/sbarex/SourceCodeSyntaxHighlight

neilyo51 commented 8 months ago

This project provides the same feature set, and is compatible with latest macOS versions FYI: https://github.com/sbarex/SourceCodeSyntaxHighlight

Thanks for your contribution. It doesn't support some files I need (would like) but it's still great. 😁

LouisCAD commented 8 months ago

I believe it supports adding custom extensions, can you check?

bohning commented 4 months ago

I solved the issue but all the above I mentioned are valid.

I have downloaded the latest version from here.

I have created a folder QuickLook and placed the file in Library/QuickLook/QLStephen.qlgenerator. Next, I right-click and go to "Show Package Contents" I open the Info.plist file (/QLStephen.qlgenerator/Contents/Info.plist) but there is no <string>public.unix-executable</string> line.

To solve this, I added this line manually and the one after running mdls -name kMDItemContentTyp, and now I have:

<array>
    <string>public.data</string>
    <string>public.content</string>
    <string>public.unix-executable</string>
    <string>public.ndjson</string>

After a qlmanage -r, it now works.

This basically works for me on Intel Mac with Sonoma 14.4.1. I installed qlstephen via brew, then edited ~/Library/Quicklook/QLStephen.qlgenerator/Contents/Info.plist according to your comment. Thanks a ton!

mikedvzo commented 3 weeks ago

This project provides the same feature set, and is compatible with latest macOS versions FYI: https://github.com/sbarex/SourceCodeSyntaxHighlight

Thank you for this! With QLStephen my Quicklook window was coming up blank in macos 14.6. This program is great and so customizable.

dickgroenenberg commented 3 weeks ago

Can you @bohning or anyone else confirm this is working for Sonoma 14.6.1 ?