This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to change the default capture options for Linux based wireshark GUI

0

I am trying to find a way to set the default capture options. I would like to have my capture by default stop capturing after 5MB. The default is curranly set to 1000KB. Is there a config file or enviroment variable that could be set to change the default capture options? This is for a Linux base box and i'm needing these changes for the GUI.

asked 25 Sep '12, 12:35

Tektron's gravatar image

Tektron
1111
accept rate: 0%


2 Answers:

0

You can use the following, which will launch Wireshark and immediately begin capturing on interface <iface> while automatically stopping after 5MB of data has been captured.

wireshark -i <iface> -k -a filesize:5000

For more information on Wireshark's command-line options, refer to the Wireshark man page or User Guide.

answered 25 Sep '12, 13:38

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

edited 25 Sep '12, 13:39

0

By default the preferences file for your user will be at:

~/.wireshark/preferences

While the system defaults are at:

/usr/share/wireshark/preferences

If you got Wireshark from your dirstobutions repositories (through yum or apt-get or somesuch) then your user preferences may be in root's home (/root/.wireshark/preferences). The global prefs file may also be elsewhere, "$which wireshark" will give you a clue.

The user prefs file will override (completely) the system prefs, same with the colorfilters files.

The wireshark docs have more info on what can be adjusted in the prefs.

answered 25 Sep '12, 17:59

CTNOBLE's gravatar image

CTNOBLE
11236
accept rate: 0%