Wireshark-bugs: [Wireshark-bugs] [Bug 5501] command line options don't work in OSX
Date: Wed, 22 Dec 2010 20:50:21 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5501

--- Comment #2 from Chris Welsh <rednectar.chris@xxxxxxxxx> 2010-12-22 20:50:19 PST ---
(In reply to comment #1)
> OS X GUI applications don't take that sort of command-line option.
> 
> In addition, as Wireshark is, even on OS X, an X11-based app, the OS X binary
> distribution wraps it in a wrapper program that's an OS X GUI app binary. 
> /Applications/Wireshark.app/Contents/MacOS/Wireshark is that binary; it is
> *not* the Wireshark binary itself.
> 
> The Wireshark binary is in
> /Applications/Wireshark.app/Contents/Resources/bin/wireshark-bin, but it's not
> runnable from there.  To be able to run Wireshark from the command line, you
> need to install the wrapper scripts in, for example, /usr/local/bin - when the
> dmg is opened, it has the "Wireshark" item to drag to /Applications (a symbolic
> link for which is also in the top-level directory of the dmg), and it also has
> a "Read me first" file and a "Utilities" folder.  Open the "Utilities" folder,
> and it has a "Command Line" folder.  Open the "Command Line" folder and drag
> everything in it to /usr/local/bin (or copy them from the command line if you
> want).  With that done, /usr/local/bin/wireshark is the script to run Wireshark
> from the command line:
> 
>     /usr/local/bin/wireshark -r /Sources/Captures/GNS3/SW1_to_SW2.cap
> 
> (or, if /usr/local/bin is in your path, just
> 
>     wireshark -r /Sources/Captures/GNS3/SW1_to_SW2.cap
> 
> and you can also leave the "-r" out.
> 
> Alternatively, for files with extensions for which an application has been
> registered, the "open" command can be used to open the file from the command
> line.  Once you've installed Wireshark from the dmg, you could, for example, do
> 
>     open /Sources/Captures/GNS3/SW1_to_SW2.cap

(In reply to comment #1)
Guy - thanks so much.  I've posted a link to this reply on GNS3.net so others
can read it - to think that in the end all I had to do to get Wireshark
launched with the required file opened was simply "open <filename>".  Too easy.
Be assured I really appreciate the time you took to answer this, and I've
learned a few other morsels about OSX into the bargain.  Thanks again.
CW

> OS X GUI applications don't take that sort of command-line option.
> 
> In addition, as Wireshark is, even on OS X, an X11-based app, the OS X binary
> distribution wraps it in a wrapper program that's an OS X GUI app binary. 
> /Applications/Wireshark.app/Contents/MacOS/Wireshark is that binary; it is
> *not* the Wireshark binary itself.
> 
> The Wireshark binary is in
> /Applications/Wireshark.app/Contents/Resources/bin/wireshark-bin, but it's not
> runnable from there.  To be able to run Wireshark from the command line, you
> need to install the wrapper scripts in, for example, /usr/local/bin - when the
> dmg is opened, it has the "Wireshark" item to drag to /Applications (a symbolic
> link for which is also in the top-level directory of the dmg), and it also has
> a "Read me first" file and a "Utilities" folder.  Open the "Utilities" folder,
> and it has a "Command Line" folder.  Open the "Command Line" folder and drag
> everything in it to /usr/local/bin (or copy them from the command line if you
> want).  With that done, /usr/local/bin/wireshark is the script to run Wireshark
> from the command line:
> 
>     /usr/local/bin/wireshark -r /Sources/Captures/GNS3/SW1_to_SW2.cap
> 
> (or, if /usr/local/bin is in your path, just
> 
>     wireshark -r /Sources/Captures/GNS3/SW1_to_SW2.cap
> 
> and you can also leave the "-r" out.
> 
> Alternatively, for files with extensions for which an application has been
> registered, the "open" command can be used to open the file from the command
> line.  Once you've installed Wireshark from the dmg, you could, for example, do
> 
>     open /Sources/Captures/GNS3/SW1_to_SW2.cap

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.