Visitar URL original
Improve console binary handling on MacOS installs · Issue #3334 · nmap/nmap · GitHub
Skip to content

Improve console binary handling on MacOS installs #3334

Open

Description

@fyodor

When Nmap is installed on Mac using our provided mpkg package, Zenmap, Nmap, Ncat, and Nping all go into the Mac Applications directory. This is perfect for Zenmap, as that is where you would expect it. It has an Nmap icon and you can click to run it. But the nmap, ncat, and nping console apps also end up there. They don't provide an icon and clicking on them does nothing (because they are console apps). So users may install Nmap, click on "nmap", and feel everything is broken. On the bright side, putting these console apps there seems to include them in the default paths so that they can run from a normal terminal window with no extra configuration.

Still, when I search for "nmap" in finder, the first result is the console app from the Applications directory and of course clicking on it does nothing. Users need to know to click Zenmap instead, which is the second option, at least for me.

I'm not sure of the best solution, but this does seem likely to confuse users. We should probably find a way to either give these an icon and make them do something useful when you click on them (open a terminal window? open Zenmap?), or hide them somehow from the GUI (so Zenmap is all people see or at least the most prominent) while still allowing them to work fine from terminal with default setup/path. We should probably look more into what other console apps do about this.

Activity

  1. dmarakom6 commented on Jul 25, 2026

    @dmarakom6

    The fix is to change macosx/Makefile:58 from a single PKGBUILD with --install-location /Applications to two variants: one with --install-location /usr/local for CLI tools (nmap, ncat, nping) and one with --install-location /Applications for Zenmap only. Then update macosx/make-app.sh to create a flat bin/ + lib/{tool}/ layout instead of .app bundles, with rpath @executable_path/../lib/$package so libraries resolve under /usr/local/lib/{tool}/. Finally, update macosx/Scripts/postinstall to only write /etc/paths.d/ for Zenmap — CLI tools in /usr/local/bin/ are already in PATH. Keep in mind you need a Mac to build and install the DMG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NmapmacOS/OS XIssues affecting Apple macOS and OS X

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions