Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.9k stars 10.7k forks source link

'brew cask install gimp; gimp' does not launch gimp #39925

Closed dankegel closed 6 years ago

dankegel commented 6 years ago

General troubleshooting steps

Description of issue

I expect installing gimp to let me run gimp via the commandline by typing gimp, but instead I have to to type open /Applicatons/GIMP.app, which is a lot more keystrokes. It also took me 20 minutes to figure what wtf was wrong.

Output of your command with --verbose --debug

command not found

Output of brew cask doctor

==> Homebrew-Cask Version
Homebrew-Cask 1.3.6-30-gce0e96c
caskroom/homebrew-cask (git revision 47d63; last commit 2017-10-22)
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask (1 files, 55.9MB)
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3764 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/universal-darwin9.0
==> Environment Variables
LANG="en_US.UTF-8"
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/oblong/g-speak3.28/bin:/opt/oblong/deps-64-11/bin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/bash"
vitorgalvao commented 6 years ago

I expect installing gimp to let me run gimp via the commandline by typing gimp

We don’t make such promises anywhere. Your expectation is misaligned from our goals.

Add this to your shell’s startup files: alias gimp='open /Applicatons/GIMP.app'. Done.

dankegel commented 6 years ago

Hrm. I thought brew was for commandline users coming from e.g. linux, and tried to make them feel at home.

Guess I was wrong.

miccal commented 6 years ago

@dankegel you are thinking of Homebrew; Homebrew Cask is for installing GUI applications.

dankegel commented 6 years ago

Why is there any difference? I often run gui applications from the commandline, and so do many other linux users.

miccal commented 6 years ago

The difference is that Cask just installs Gimp from the .dmg file found on the official Gimp homepage, as if you had downloaded and installed it manually. The official .dmg does not include binaries by default for MacOS:

screen shot 2017-10-23 at 13 52 46

As @vitorgalvao has mentioned, you need to add an alias to launch the Gimp GUI from the command line.

vitorgalvao commented 6 years ago

@dankegel Don’t fixate on Linux. We’re not a package manager for Linux users that use macOS.

We’re a package manager for macOS users, and we act accordingly to macOS conventions and expectations. macOS’ *nix functionality isn’t tackeed on — it’s native. We don’t need to imitate Linux behaviour, we do what makes sense for macOS.

dankegel commented 6 years ago

This bit me again. I already had gimp installed, but expected typing 'gimp' on the commandline to run gimp. It took me several minutes to realize this. The habits of expecting the world to work from the commandline are extremely hard to break.

Would you accept a patch that made this work?

dankegel commented 6 years ago

And I just did it again; even after writing the above, I expected 'gimp foo.png' to open foo.png.

vitorgalvao commented 6 years ago

Would you accept a patch that made this work?

No, and we’ve already explained why.

We’ve also explained how to fix it in your install. We’re not going to change our whole rules for a single user with a single use-case that can be fixed permanently with a small fix on their part.