1

I was having an issue with Spotlight and an Apple support person had me "upgrade" to Mojave and now I'm pissed off. None of my Automator services work in my Fluid Apps anymore! I have about a half-dozen Fluid apps so I can either assign them to all desktops (and not affect other browser windows) or so I can have multiple sessions with some websites that only support 1 browser window open to their site (e.g. the galaxy web app). I have over a dozen automator services that are extremely useful. Most accept selected text "from any application" and do various things with that text (e.g. report stats on selected nucleotides).

Now, when I try to run a service on selected text in a Fluid-created app, I get an error that states 'The action “Run AppleScript” encountered an error: “Not authorized to send Apple events to System Events.”'. If these services were apps, I could easily add them in system preferences to Security & Privacy -> Privacy -> Accessibility, but they are workflows installed as services (located in ~/Library/Services/) and thus cannot be added. I have added the Fluid-created apps, but that doesn't stop the error either.

I spoke with Apple Support and they indicated that the Fluid-created app won't work with services because of code-signing. The app has to be from an apple-recognized developer in order to be allowed access!

I fully understand the security concern, but this is very frustrating. Does anyone know how to allow services to work in Fluid-created apps?

enter image description here

UPDATE: I have tried adding the app (e.g. "Galaxy1.app") to both the Accessibility and Full Disk Access sections of the security and privacy system preference page and I still get the error:

enter image description here enter image description here

2 Answers 2

1

I figured out a work-around for part of my problem. I'm not going to select this (my own) answer because it doesn't solve the entire problem. The main reason I use Fluid to wrap galaxy in an "app" is because you can only have 1 galaxy browser window open. If I have 2 open, changes made in 1 window affect the other, so when I'm working on 2 different projects concurrently, I was using separate Fluid apps to keep the projects from stepping on one another's toes. I knew that private browser windows could also accomplish this, but I liked the convenience of a dock icon.

So I just worked out an Applescript, saved as an app, that opens a new private Safari window to galaxy.princeton.edu. I then added that app to Security & Privacy -> Privacy -> Accessibility. This script is slightly simplified from what I actually used:

tell application "Safari" to activate

tell application "System Events"
    keystroke "n" using {shift down, command down}
    delay 0.5
    keystroke "http://galaxy"
    key code 47
    keystroke "princeton"
    key code 47
    keystroke "edu/"
    keystroke return
end tell

Note, depending on your accessibility preferences, Applescript will not type numbers, dots, or a few other characters, thus the key code 47 for the dots.

Now, whenever I run this "app" (which I gave the galaxy icon), it will open a new Safari browser window to galaxy.

This allows me to run my automator services on DNA strings in galaxy because Safari can be given permission to send apple events to System Events.app, whereas Fluid apps can't (I believe because they're not code signed).

7
  • Assuming Safari is already open, the following two AppleScript commands replace the code you've shown, although you may need/want to add a delay command between them. This first one doesn't require Safari to have focus tell application "System Events" to perform action "AXPress" of menu item "New Private Window" of menu "File" of menu bar item "File" of menu bar 1 of application process "Safari" This one does away with all the rest of the key code/keystroke commands: tell application "Safari" to set URL of current tab of front window to "http://galaxy.princeton.edu" Commented Jan 30, 2019 at 3:03
  • Updated the code. You may have suggestions for the case where safari isn't already running too...?
    – hepcat72
    Commented Jan 30, 2019 at 15:45
  • Worth a note: if you change the code of the script/app, you have to remove the app from accessibility and re-add it. Then you'll be prompted again to allow it to submit events to SystemEvents.app when you run it.
    – hepcat72
    Commented Jan 30, 2019 at 15:50
  • Re: your comment, "Updated the code. You may have suggestions for the case where safari isn't already running too...?"... Have a look at: This is probably how I'd write the code. Commented Jan 30, 2019 at 16:43
  • OMG, when I use the above code, command-f doesn't work. I can't search the page and the content at the top is covered up by the nav bar. I hadn't noticed it when I first tried. The content slides down a bit when I type command-f and back up when I type command-shift-f, but I cannot enter a search term nor use command-g if I search in another app first. I think I'm going to have to revert the code in my answer unless you have a suggestion that doesn't have this side-effect.
    – hepcat72
    Commented Jan 30, 2019 at 16:54
0

You need to allow for Automator and any Fluid created apps in both the Accessibility and Full Disk Access menus of System Preferences/ Security & Privacy/ Privacy tabs. You may also need to add System Events.app to allow access also. Then you should be good to go

enter image description here

enter image description here

10
  • I've already added one of the apps to both places and quit and restarted the app, but I still get the error.
    – hepcat72
    Commented Jan 29, 2019 at 21:46
  • You mean, add the System Events app to both this places?
    – hepcat72
    Commented Jan 29, 2019 at 21:54
  • Well I tried that... same error.
    – hepcat72
    Commented Jan 29, 2019 at 21:56
  • Automator app is already there, as is the Finder and a number of other apps in which I've used the service already. It's only Fluid-created apps in which the services don't work. I'm accessing services via a right-click on selected text in the Fluid-created app.
    – hepcat72
    Commented Jan 29, 2019 at 22:00
  • I can’t supply the text if I run it from Automator. I could try to run it, as I did when I was testing it during development, but it doesn’t do anything without the text. I have over a dozen workflows and they all perform tasks on DNA strings (or equations, but mostly DNA strings). The one I’m trying to use now reports statistics on nucleotide content.
    – hepcat72
    Commented Jan 29, 2019 at 22:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .