Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew linkapps doesn't symlink app to /Applications #8699

Closed
hced opened this issue Nov 21, 2011 · 21 comments
Closed

brew linkapps doesn't symlink app to /Applications #8699

hced opened this issue Nov 21, 2011 · 21 comments

Comments

@hced
Copy link

hced commented Nov 21, 2011

Issuing brew linkapps after brew install macvim simply doesn't work. Despite the output below, MacVim.app doesn't show up in my /Applications folder:

~ $ brew linkapps
Linking /usr/local/Cellar/macvim/7.3-63/MacVim.app

I'm just a regular user, so I can't tell if it was right to post about this issue here, or if it should be directed to the formula author. I know I can manually symlink the app, but this would become quite a chore after a few updates.

I use OS X 10.7.2 on a few days old iMac. System language is Swedish but I guess that shouldn't affect anything.

@adamv
Copy link
Contributor

adamv commented Nov 21, 2011

We link into ~/Applications, off of your home folder, not /Applications.

@hced
Copy link
Author

hced commented Nov 21, 2011

Oh, got ya. Sorry for missing that (maybe this should be prompted when using brew linkapps, just for clarity?).

@hced hced closed this as completed Nov 21, 2011
@pencilcheck
Copy link
Contributor

Yes, the caveats in the formula should need some clarity and correction if they don't intend to do the same thing but presented in such a way that it misleads.

@mxcl
Copy link
Contributor

mxcl commented Mar 7, 2012

brew linkapps should probably output what it creates.

@dysinger
Copy link
Contributor

why do we want to only link an app into ~/Applications when /usr/local is available to all users ? it should link into /Applications IMHO

@adamv
Copy link
Contributor

adamv commented Jul 31, 2012

Linking into /Applications requires sudo.

@mxcl
Copy link
Contributor

mxcl commented Jul 31, 2012

I'm not sure it does.

@zhouyan
Copy link
Contributor

zhouyan commented Aug 1, 2012

I think by default, /Application is of owner root and group admin, with write and read permission to the group. If a user is able to install Homebrew in the first place, he/she shall be of group admin, otherwise he/she would not be able to change the owner of those homebrew directories. For example my Cellar directory is of owner myself, group admin, and only write access of myself. So in other words, I am the only one can use Homebrew without sudo, so it does not make sense to assume I need sudo to link to /Application

@dysinger
Copy link
Contributor

dysinger commented Aug 1, 2012

I just drag and drop apps into my /Applications folder all day long. It does not require sudo.

~ ➤ ls -l / | grep App
drwxrwxr-x+ 72 root admin 2448 Aug 1 02:08 Applications
~ ➤ groups
staff everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer com.apple.sharepoint.group.1 com.apple.access_screensharing
~ ➤

@dysinger
Copy link
Contributor

dysinger commented Aug 1, 2012

~/Applications is a perfectly valid place for apps too. It just basically hides the app from any other users that may borrow my 'puter (wife for example) when they login. I would rather - at least - have the option (hopefully default) of putting it in view of everyone on the computer (just like /usr/local/)

@mxcl
Copy link
Contributor

mxcl commented Aug 1, 2012

Honestly, /Applications would make more sense to me if Homebrew is installed in /usr/local.

@jacknagel
Copy link
Contributor

I don't really have a preference either way, though personally I tend to stick things in /Applications.

I can confirm that e.g. touch /Applications/foo works without elevated privileges on 10.6.

@HelveticaScenario
Copy link

I for one would prefer /Applications to ~/Applications, if only so that my homebrew .apps would show up with my non-homebrew .apps in the "Applications" folder on my dock :P.

@adamv
Copy link
Contributor

adamv commented Sep 15, 2012

I don't linkapps anymore so I no longer care.

@HelveticaScenario
Copy link

I made a copy of brew-linkapps.rb and changed

HOME_APPS = File.expand_path("~/Applications")

to

HOME_APPS = File.expand_path("/Applications")

and ran it.
It did exactly what it was supposed to.

MYSTERY SOLVED

The only problem now is that when bring up the "Applications" folder on my dock, and it brings up the little temporary window, all of the linked apps show up as the blank white piece of paper icon. They work the same though.

@big-samantha
Copy link

Is there a way to link in such a way as to have the link actually be treated as an application? E.g. if I search spotlight, for say, MacVim, it's listed as a "document".

If I'm using Alfred, I have to type "open macvim", to open the alias, unlike "normal" apps that are actually living in my applications folder, where I can just type the name.

@cweagans
Copy link
Contributor

cweagans commented Dec 7, 2012

Why not do something like this?

If user is root (running through sudo), brew linkapps symlinks to /Applications.
If not, then ~/Applications.

Seems simple and makes everyone happy.

@Sharpie
Copy link
Contributor

Sharpie commented Dec 8, 2012

If user is root (running through sudo),

No user in their right mind should ever run brew under sudo as brew is not designed to drop permissions. Which means that any poorly written configure script or Makefile has a blank check to do whatever it pleases with your system.

@scott-vsi
Copy link

Is there any particular reason why linkapps doesn't support an option to only link the specified kegs? Seems like you could tell linkapps to look in HOMEBREW_CELLAR/ for *.app instead of HOMEBREW_CELLAR.subdirs

@anantshri
Copy link

came here while searching why brew is only linking to /Application and a bit of code fiddling made me realize if i want to use ~/Application i have to use

brew linkapps --local

@Atcold
Copy link

Atcold commented Mar 28, 2015

@anantshri, thank you. So many app installed with brew didn't link automatically!

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests