Nightly Version 25.07.70 SUMMARY When I use okular to open a PDF from finder, okular pops up but does not open the PDF EXPECTED RESULT Okular opens the PDF so that I can use it as default PDF application - if that is fixed it will really be a handy tool to reduce bloat from proprietary PDF applications on mac devices Seems related to https://bugs.kde.org/show_bug.cgi?id=456058
Also running in to this bug, and an update to the latest version does not fix it either. Following the thread on the previously linked post, someone has figured out the code to pass to get files opening correctly: > /Applications/okular.app/Contents/MacOS/okular PATH_TO_FILE I've tried this with a local pdf file and it works. Is it possible for the devs to change the opening code to run this instead?
Adding this as a workflow quick action in Automator seems to work for opening a pdf from the right-click menu: >on run {input, parameters} > set filePath to POSIX path of (item 1 of input) > set okularCommand to "/Applications/okular.app/Contents/MacOS/okular " & quoted form of filePath > do shell script okularCommand > return input >end run
Hi - merging with the report you mentioned to help keep investigation and status updates coordinated, as they appear to be the same issue. Thanks! *** This bug has been marked as a duplicate of bug 456058 ***
Saving the following in AppleScript as an app will allow you to set the default pdf application to this new app as a workaround. So that means that we can now open files in a more native way without the right-click menu. >on open droppedFiles > repeat with f in droppedFiles > set filePath to POSIX path of f > do shell script "/Applications/okular.app/Contents/MacOS/okular " & quoted form of filePath & " >/dev/null 2>&1 &" > end repeat >end open
(In reply to jmot205 from comment #4) > Saving the following in AppleScript as an app will allow you to set the > default pdf application to this new app as a workaround. So that means that > we can now open files in a more native way without the right-click menu. > > >on open droppedFiles > > repeat with f in droppedFiles > > set filePath to POSIX path of f > > do shell script "/Applications/okular.app/Contents/MacOS/okular " & quoted form of filePath & " >/dev/null 2>&1 &" > > end repeat > >end open Thanks, I have followed this instruction and I am able to open a PDF using the newly created AppleScript app (which opens Okular). But I am unable to change the default app for opening PDFs to this AppleScript app. The following error message is produced: You can’t change the item “xxx.pdf” to always open in the selected application. The item is either locked or damaged, or in a folder you don’t have permission to modify (error code 13). After having read some forums, it seemed the location of the AppleScript app could be the culprit (saved by default in iCloud folder). I then copied the app to my regular Applications folder, deleted the original, tried again and I still get the aforementioned error message.
(In reply to Andreas Joss from comment #5) > (In reply to jmot205 from comment #4) > > Saving the following in AppleScript as an app will allow you to set the > > default pdf application to this new app as a workaround. So that means that > > we can now open files in a more native way without the right-click menu. > > > > >on open droppedFiles > > > repeat with f in droppedFiles > > > set filePath to POSIX path of f > > > do shell script "/Applications/okular.app/Contents/MacOS/okular " & quoted form of filePath & " >/dev/null 2>&1 &" > > > end repeat > > >end open > > Thanks, I have followed this instruction and I am able to open a PDF using > the newly created AppleScript app (which opens Okular). But I am unable to > change the default app for opening PDFs to this AppleScript app. The > following error message is produced: > > You can’t change the item “xxx.pdf” to always open in the selected > application. > The item is either locked or damaged, or in a folder you don’t have > permission to modify (error code 13). > > After having read some forums, it seemed the location of the AppleScript app > could be the culprit (saved by default in iCloud folder). I then copied the > app to my regular Applications folder, deleted the original, tried again and > I still get the aforementioned error message. That's weird; I don't think I did any further steps on my end. My .app is saved into the /Applications folder as well. FWIW I set it as default via right-click > Get Info > Open with > select .app > Change All (as opposed to the right-click > open with ... method)
Ahh (In reply to jmot205 from comment #6) > (In reply to Andreas Joss from comment #5) > > (In reply to jmot205 from comment #4) > > > Saving the following in AppleScript as an app will allow you to set the > > > default pdf application to this new app as a workaround. So that means that > > > we can now open files in a more native way without the right-click menu. > > > > > > >on open droppedFiles > > > > repeat with f in droppedFiles > > > > set filePath to POSIX path of f > > > > do shell script "/Applications/okular.app/Contents/MacOS/okular " & quoted form of filePath & " >/dev/null 2>&1 &" > > > > end repeat > > > >end open > > > > Thanks, I have followed this instruction and I am able to open a PDF using > > the newly created AppleScript app (which opens Okular). But I am unable to > > change the default app for opening PDFs to this AppleScript app. The > > following error message is produced: > > > > You can’t change the item “xxx.pdf” to always open in the selected > > application. > > The item is either locked or damaged, or in a folder you don’t have > > permission to modify (error code 13). > > > > After having read some forums, it seemed the location of the AppleScript app > > could be the culprit (saved by default in iCloud folder). I then copied the > > app to my regular Applications folder, deleted the original, tried again and > > I still get the aforementioned error message. > > That's weird; I don't think I did any further steps on my end. My .app is > saved into the /Applications folder as well. FWIW I set it as default via > right-click > Get Info > Open with > select .app > Change All > (as opposed to the right-click > open with ... method) Ah fantastic that worked, many thanks. I previously used the right-click > open with method, which did not work. Just glad your method works.