Jump to content

Symbolic link to App not recognized


thingum

Recommended Posts

Hi all,

 

I've got an issue with symbolic link to app in my ~/Application folder: if an app is aliased, Alfred does not recognize the app and does not suggest it to me.

The ~/Applications folder is in the Alfred prefs and if I copy the app there, it's just fine.. The problem is really related to alias/symlink.

 

Is there something I can to do fix it ?

 

Details: Alfred v 2.0.3 (Moutain Lion)

Edited by thingum
Link to comment
Share on other sites

Yes. This is not a bug, you just haven’t turned the feature on.
 
Go to to PreferencesDefault ResultsAdvanced…. Drag and drop the link to the app on the small window that appears (it should say “com.apple.alias-file”) and press Close. Add ~/Applications to your Search Scope, on that same window, and you’re done.

Edited by Vítor
Link to comment
Share on other sites

Hi all,

 

I've got an issue with symbolic link to app in my ~/Application folder: if an app is aliased, Alfred does not recognize the app and does not suggest it to me.

The ~/Applications folder is in the Alfred prefs and if I copy the app there, it's just fine.. The problem is really related to alias/symlink.

 

Is there something I can to do fix it ?

 

Details: Alfred v 2.0.3 (Moutain Lion)

 

While Vitor's solution can work in some cases, the more reliable way is to add the path of the apps you want to include into the Search Scope box in the Default Results preferences. :)

Link to comment
Share on other sites

While Vitor's solution can work in some cases, the more reliable way is to add the path of the apps you want to include into the Search Scope box in the Default Results preferences. :)

I thought about that, but the question is very specific to links, not apps. Since ~/Applications is mentioned, it seems like the poster may have different apps at different locations (maybe by using different package managers that install to different places, like homebrew and homebrew-cask), that all link to that same directory. In this case, my solution will be less work overall, as you only need to perform it once, while adding the path of the apps may or may not take multiple edits, everytime you add/remove one of the locations. I’d argue, then, that in this specific case the solution would work in more cases and with less work, by taking into account the specificity of the question.

 

Details to the “why”, however, could of course be useful, as there may even be alternative solutions. Homebrew-cask, for example, includes a “brew cask alfred” command that programatically changes Alfred’s scope to include the app directory.

Edited by Vítor
Link to comment
Share on other sites

Yes. This is not a bug, you just haven’t turned the feature on.

 

Go to to PreferencesDefault ResultsAdvanced…. Drag and drop the link to the app on the small window that appears (it should say “com.apple.alias-file”) and press Close. Add ~/Applications to your Search Scope, on that same window, and you’re done.

 

When I follow these instructions, I get a type of "public.symlink" with a description of "symbolic link" and Alfred still doesn't find it in the search.

 

The alternative of adding the path to every app seems overly tedious, especially since many of those paths are versioned and will change with updates (e.g. /usr/local/Cellar/macvim/7.3-66/MacVim.app).

 

Any chance of just getting Alfred to natively support links?

 

Alfred 2.0.3

OSX 10.8.3

Link to comment
Share on other sites

You don’t add every directory by hand, you pick the common parent directory and add that one.

 

Seeing as you’re clearly a homebrew user, the question is “do you need this to work for some other reason, or are you only concerned with homebrew apps?”. If the latter, I’d suggest a look at homebrew-cask (linked on my previous post). It works in conjunction with homebrew, and is more geared towards this type of actions (as I’ve mentioned, there’s even a command concerned with helping Alfred find the apps).

Edited by Vítor
Link to comment
Share on other sites

I guess I could add the Cellar folder, assuming Alfred only picks up the apps.

 

At this point, I only need it to find homebrew apps, so I'll take a look at homebrew-cask.

 

In the end, I'd still prefer that Alfred natively handle the links.

 

Thanks!

Link to comment
Share on other sites

  • 5 months later...

Still not clear on the guidance here regarded installed apps via brew cask. Cask installs it's apps in a directory deep the file system, then symlinks them.

 

The directory the apps install to is something like: /opt/homebrew-cask/Caskroom/X/X/

The symlink is placed in ~/Applications by default. Adding /opt/homebrew-cask/Caskroom/X/X/ to the Search Scope works, but I am not sure that is ideal.

 

Adding ~/Applications to the search scope of Alfred does not work (no apps in that directory are shown while searching for them in Alfred)

Dragging and dropping a symlink to the advanced dialog ("user defined file types") does not produce the result I am looking for either.

 

I'm okay with how it works now, but not sure if it's ideal, if anyone has any other suggestions, please chime in.

Edited by cborgia
Link to comment
Share on other sites

I'm okay with how it works now, but not sure if it's ideal, if anyone has any other suggestions, please chime in.

Homebrew-cask’s Caskroom directory contains only what comes with the app when it is downloaded, so adding its directory will do no harm.

Edited by Vítor
Link to comment
Share on other sites

  • 9 years later...

This is issue is actually still occurring for me. I have an app '/opt/homebrew/Cellar/emacs-plus@28/28.2/Emacs.app' which Alfred can't find when I do the search for 'Emacs'. It should find it though as the Search Scope box in the Default Results preferences has the path '/opt/homebrew/Cellar' by default.

Link to comment
Share on other sites

Alfred uses Spotlight’s indexing and Spotlight does not index that folder. If you get it indexed you may see the apps but you probably don’t want to because stuff like Qt and Python which are installed as part of other packages dump quite a few apps which can pollute results.

Link to comment
Share on other sites

2 minutes ago, vitor said:

Alfred uses Spotlight’s indexing and Spotlight does not index that folder. If you get it indexed you may see the apps but you probably don’t want to because stuff like Qt and Python which are installed as part of other packages dump quite a few apps which can pollute results.

Got you. Regardless I just tried the workflow you mentioned and even though the aliased Emacs.app is created in /Applications, double-clicking it doesn't open it, neither does right-click, then selecting open.

Edited by adonis
Link to comment
Share on other sites

Just now, vitor said:

If you do a Get Info is the Original pointing to the correct path?

It is yes. Not sure what it was but even doing open directly on the path to Emacs.app didn't want to work. I killed some open instances and now seems to be working. Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...