Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconsider default installation path #2534

Closed
tapeinosyne opened this issue Jan 21, 2014 · 36 comments
Closed

Reconsider default installation path #2534

tapeinosyne opened this issue Jan 21, 2014 · 36 comments

Comments

@tapeinosyne
Copy link
Contributor

I would like to propose /Applications as the default installation path, changing from the current ~/Applications. For past opinions surrounding this issue, see #30.

To better direct the discussion, note that I am not arguing that installing to /Applications is strictly better practice than installing to ~/Applications. My suggestion is that symlinking apps to /Applications would be a better default, as it is where most users expect to find their apps based on common practice. Consider the following:

  • As of 10.7, OSX does not create ~/Applications. A user application folder is supported, but optional. On 10.6, the user application folder was created empty. See thread on Apple Support.
  • The Mac App Store installs to /Applications. I would expect most Cask users to have at least one MAS-only application they like or need (cue harrowing screams of those who like to automate provisioning of their machines), which is problematic for those who favor ~/Applications as some of their software will be relegated to the global folder.
  • Homebrew changed the default --linkapps path to /Applications about five months ago with Change brew linkapps to use the global /Applications folder legacy-homebrew#22378. (--linkapps symlinks certain programs, e.g. Emacs, to a folder, similarly to Cask.) Given that Cask is implemented as an external brew command, it should be desirable to mantain consistent behavior for shared functionality.
  • Other applications seemingly expect the absence of a user application folder. E.g. Alfred, a very popular tool, does not include ~/Applications in its search scope.

I find these to be increasingly good reasons to adapt our current default path; the trend appears rather clear. Of course, Cask would remain configurable, and those who prefer to keep Cask application separate will be able to change their installation folder with export HOMEBREW_CASK_OPTS. However, most users (particularly new ones) would be better served by the more common /Applications as default.

@adamv
Copy link

adamv commented Jan 21, 2014

I was -1 on the Homebrew change here, and prefer ~/Applications, but didn't fight it. FWIW.

@muescha
Copy link
Contributor

muescha commented Jan 22, 2014

+1 for change, because if the parent take this change, then the users expect the same change also here.

@vitorgalvao
Copy link
Member

Alfred, a very popular tool, does not include ~/Applications in its search scope.

It also does not follow the created links, so even if apps were symlinked to /Applications, it would make no difference to it.

That said, I agree the default should be /Applications, it’s way more intuitive.

@tapeinosyne
Copy link
Contributor Author

@vitorgalvao Perhaps I was unclear: my meaning was that Alfred also considers the ~/Applications folder passé, unrelatedly to Cask.

@goxberry
Copy link
Contributor

I'm -0.1 on this change. I think /Applications is much more intuitive, and certain casks containing packages (here, I'm thinking specifically of MacTeX; there could be others) install to /Applications already.

At the same time, I like having cask-installed apps in a separate location. It also makes having multiple copies of apps intuitive. For instance, my employer manages some software in /Applications, and they can be stubborn about versioning and patching, so it is helpful in that situation to install my preferred versions in a separate location.

@rolandwalker
Copy link
Contributor

  • I personally use homebrew-cask to install to /Applications, but am fine with the default
  • Alternate usecases could be better accommodated by adding a prefs file caskrc (instead of, or in addition to, environment variables, which are a bit fragile). I would advocate for, and assist with, such a patch.
  • This particular question is not just an either/or switch, right? Every author writing backend code did so under the assumption that it normally did not run under sudo. Someone would have to do the work of auditing the code and submit patches for best practices when running as a privileged user.

@majjoha
Copy link

majjoha commented Jan 27, 2014

I am definitely +1 on changing the default folder to /Applications as well. It was where I expected my applications to be placed, and I'd assume that most people would look for them in that folder too.

@StevenClontz
Copy link

Homebrew changed the default --linkapps path to /Applications about five months ago with Homebrew/legacy-homebrew#22378. (--linkapps symlinks certain programs, e.g. Emacs, to a folder, similarly to Cask.) Given that Cask is implemented as an external brew command, it should be desirable to mantain consistent behavior for shared functionality.

This is the big issue for me. In addition, certain casks which rely on installers are installed to /Applications anyway (see: Vagrant and Virtualbox).

@lgarron
Copy link
Contributor

lgarron commented Feb 4, 2014

This is the big issue for me. In addition, certain casks which rely on installers are installed to /Applications anyway (see: Vagrant and Virtualbox).

The same applies to me. I don't really care if my applications are in /Applications or ~/Applications, but I believe I've observed the following:

  • Things breaking because certain applications are expected to be in /Applications.
  • Applications breaking because they are symlinked instead of hard-linked/copied.

For this reason, I always install to /Applications and replace the symlink with a copy (the last step is manual). I don't know if this is necessary, but I had enough initial issues with brew cask installations that I prefer this hassle to unexpected breakage later on.

@keith
Copy link
Contributor

keith commented Apr 2, 2014

As the creator of that original PR mentioned I definitely still +1 this.

@hanxue
Copy link
Contributor

hanxue commented Apr 19, 2014

+1 for homebrew cask to symlink to /Applications

@AlJohri
Copy link
Contributor

AlJohri commented Apr 19, 2014

+1 for homebrew cask to symlink to /Applications

Also +1 to

+1 for change, because if the parent take this change, then the users expect the same change also here.

For now, I have to do this on every computer I use homebrew cask with:

export HOMEBREW_CASK_OPTS="--appdir=/Applications"

@alebcay
Copy link
Member

alebcay commented Apr 19, 2014

On the other hand, if we did implement such a change, we'll receive the following complaint:

For now, I have to do this on every computer I use homebrew cask with:

export HOMEBREW_CASK_OPTS="--appdir=~/Applications"

@dmyers
Copy link

dmyers commented Apr 21, 2014

👍 ➡️ /Applications

@leoj3n
Copy link
Contributor

leoj3n commented Apr 21, 2014

Overlooked obvious solution: Link apps into both ~/Applications and /Applications ♻️ 😂

As for me, I prefer ~/Applications

@gossi
Copy link

gossi commented Oct 7, 2014

Although I'm very happy with /Applications being the default installation folder, people have different personal preferences and in order to please them, here is my idea to solve the installation path issue:

  1. Make /Applications the default 😃
  2. Add a config option for applications being symlinked to another directoy, sth like: brew cask config set application.dir ~/Applications. People installing cask through their dotfiles will love this, set their config once and are happy ever after 😉
  3. React to parameters. Depending on your config you can always use parameters to overwrite your preference. Providing --system and --local for this sounds good, so people with either preference can overwrite theirs for individual packages.

@wamatt
Copy link
Contributor

wamatt commented Oct 19, 2014

+1 on /Applications being the default install folder.

@petrosp
Copy link

petrosp commented Dec 3, 2014

+1 on @gossi 's proposal!

@vitorgalvao
Copy link
Member

Those options have existed for a long time, and are well documented. They’re even discussed in this very issue. Add export HOMEBREW_CASK_OPTS="--appdir=/Applications" (or whatever you want it to be) to your shell’s startup file. If you run man brew-cask, you’ll find an explanation near the end, under ENVIRONMENT. For changing the directory at runtime, simply give the --appdir option when installing a cask.

@wamatt
Copy link
Contributor

wamatt commented Dec 3, 2014

@vitorgalvao that's for making symlinks. This discussion is about installing to /Applications w/o links.

@tapeinosyne
Copy link
Contributor Author

@wamatt, there is a misunderstanding: this issue is merely concerned with the default symlinking location. Our discussion for installation by copy can be found in #3888.

@wamatt
Copy link
Contributor

wamatt commented Dec 3, 2014

oh right, my bad @ndr-qef. Thanks for the correction 👍

@vitorgalvao
Copy link
Member

Here’s the “score” so far.

/Applications:
@ndr-qef
@vitorgalvao
@rolandwalker (fine with the default, but uses this one)
@muescha
@majjoha
@Keithbsmiley
@hanxue
@AlJohri
@dmyers
@gossi
@Amorymeltzer
@wamatt
@lgarron (copies things in part because the default install location breaks some apps)
@StevenClontz (removed from the vote)

~/Applications:
@adamv
@leoj3n
@goxberry (slightly)

If anyone changed their opinion or I misunderstood it, please tell me so I can update the list. The results, however, are pretty telling. I’m willing to bet most user that know about export HOMEBREW_CASK_OPTS="--appdir=/Applications" have it set up that way.

Making this change isn’t a big deal, as it’s easy to change it back. However, defaults do matter and it seems we have the wrong one. Either way, we should make a decision and close this.

@Amorymeltzer
Copy link
Contributor

I didn't chime in above (I'm with the majority) but just as further indication outside of here, a search for "HOMEBREW_CASK_OPTS appdir" yields ~1000 code results; a quick scan of the first 20 pages indicates around 95+% use /Applications.

@StevenClontz
Copy link

FWIW ~/Applications has grown on me in the past year per @goxberry's reasoning, but with the ability to customize I'm okay with either direction. So you could just remove me from the vote tally if it makes a difference.

@wamatt
Copy link
Contributor

wamatt commented Jan 23, 2015

thanks @vitorgalvao. so it's /Applications for me, in case it wasn't clear :)

a quick scan of the first 20 pages indicates around 95+% use /Applications. - @Amorymeltzer

quite useful and compelling. ty!

@nylen
Copy link
Contributor

nylen commented Mar 10, 2015

Another 👍 for /Applications as default. It looks like Apple is trying to phase out support for ~/Applications, and cask should follow Apple's lead.

I just want all of my installed applications to show up in the Applications stack in the dock. I don't care about the rest. For now, I'm accomplishing that using the line in .bashrc mentioned above:

export HOMEBREW_CASK_OPTS="--appdir=/Applications"

I shouldn't have to worry about things like that, it should just work ;)

@phinze
Copy link
Contributor

phinze commented Mar 10, 2015

Thanks for all the contributions here, folks!

I think the overall opinion has fallen pretty squarely on a move to /Applications for the default, so I"ll close this discussion thread and we can track the actual change over at #9178. 👍

@phinze phinze closed this as completed Mar 10, 2015
@dwlf
Copy link
Contributor

dwlf commented Apr 4, 2015

Thanks @phinze and all for this discussion and moving forward with implementing the change to /Applications folder. I think this change will really assist non-power users like myself, who spent a good 45 first trying to understand why my casks were not in Finder. It's a hard thing to search for as ~/Applications don't seem in use outside of the homebrew world.

@tjnycum
Copy link
Contributor

tjnycum commented Aug 13, 2015

@Amorymeltzer:

a search for "HOMEBREW_CASK_OPTS appdir" yields ~1000 code results; a quick scan of the first 20 pages indicates around 95+% use /Applications.

Unless you excluded the instances in which --appdir was the only option being specified, that's neither surprising nor significant. Most people don't go to the trouble of learning about and setting an environment variable just to reinforce the default behavior.

@nylen:

It looks like Apple is trying to phase out support for ~/Applications, and cask should follow Apple's lead.

I'm not sure how you got that conclusion from the linked discussion. Some of the comments—see those by Alex Zavatone—if correct, strongly suggest otherwise.

@vitorgalvao
Copy link
Member

@tjnycum There’s also the very small sample size in this issue, and most importantly this was already decided on and was going to be implemented anyway.

Most people don't go to the trouble of learning about and setting an environment variable just to reinforce the default behavior.

Yes, but you know what many of them did before there were that many blog posts talking about homebrew-cask? They opened issues and talked to us asking about how to do it. Just because most people don’t do it, doesn’t mean they don’t want to. The amount of people I’ve encountered here that is afraid to even try a small cask fix because they’re afraid they’ll break something is surprising. Defaults matter.

I understand you might be disappointed by the new changes, and you seem overly worried about that, but please don’t turn this into a vendetta. I’d really hate to waste my time getting notifications of you commenting on old decided-on posts and having to explain reasonings again and again.

We’re not making changes to annoy you, but because we think they’re the best for the project and the community. We’ve been doing this for a few years now (that doesn’t mean we have all the answers), we were (and are) always open to hear new ideas, and we’re willing to change how things work (case in point), but we’ve seen a lot of casks and ways of handling them, and I personally do so daily and have done it since I first became a maintainer, in homebrew-cask’s infancy.

We know a thing or two about what works and doesn’t, and that gives us a lot of context about what the steps to take should be. We always take the community into account, yes, and this last change is no exception, but if you’re going to argue, please start with searching and reading old issues to try and get context beforehand. It’s the second time today I have to answer you at length with things that are explained in the post itself, and that’s really not how I intend to spend my day.

@alexchandel
Copy link
Contributor

alexchandel commented May 16, 2016

Can this happen already? It's been punted to #13201 and locked for months, and yet there's no way to change the default installation root to / instead of ~, not even a good workaround until #13201 is implemented. Having to specify --appdir=/Applications --prefpanedir=/Library/PreferencePanes --qlplugindir=/Library/QuickLook --fontdir=/Library/Fonts --input_methoddir="/Library/Input Methods" --screen_saverdir="/Library/Screen Savers" is absolutely absurd. Why isn't there a --rootdir=/ option?

Edit: of course even that doesn't work, because cask doesn't know how to sudo to make symlinks. Unbelievable. #21238

@vitorgalvao
Copy link
Member

vitorgalvao commented May 16, 2016

Can this happen already?
(…)
Unbelievable.

Good news! This can happen today, and all you have to do is submit the fix yourself! No good? Well, then please do tell how much you’re contributing monetarily for a kind soul that will do it. Make it good, though, no sense is wasting people’s time with low proposals.

We do not work for you. You’re getting this software for free and without guarantees. Either help or go away. We know this is slow in happening, and that is because we’re very low in core developers. Your complaining is contributing nothing.

Look for HOMEBREW_CASK_OPTS in the documentation. You do not need to specify that long command every time.

@alexchandel
Copy link
Contributor

@vitorgalvao I'm happy to do either. 2 questions: where do I locally edit homebrew-cask source (i.e. where's the git repo—it's not /usr/local I take it)? And where's the best place in the source to declare such a global directory root?

Alternatively, how much to donate to fix it this week?

@vitorgalvao
Copy link
Member

vitorgalvao commented May 16, 2016

@alexchandel Thank you! With that, we can work.

To take a stab at it, look into hacking.md first, as it describes how to setup yourself to contribute to the core.

After that, look at #13966 that has a bunch of work already done, but some standing issues. Like I said, a big part of the issue is our lack of core developers. That even makes it hard to do reviews. If you take that issue and review it/fix the latest problems, either alone or with @mwean, we can proceed.

After that, if you’d still rather donate to have the work done, please let me know, and I’ll put out a warning on #13201 and contact the rest of @caskroom/maintainers to see what we can arrange.

@mwean
Copy link
Contributor

mwean commented May 16, 2016

@alexchandel FWIW I'll try to take a look at my branch tonight.

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

Successfully merging a pull request may close this issue.