This is our old Q&A Site. Please post any new questions and answers at

I am running Red Hat Enterprise Linux Server release 5.6 (x86_64), and I installed Wireshark 1.0.15.

I installed Wireshark by:

yum install wireshark

Now when I try running following command line:

wireshark -c 100 -k -Q -w –

I receive:

(wireshark:25796): Gtk-WARNING **: cannot open display:

Any ideas why it won't run from the command line? Do you need the GUI for Wireshark to work from the command line?

asked 11 Mar '13, 12:18

lakeland's gravatar image

accept rate: 0%

Do you even have a $DISPLAY defined? Or do you intend to run it from a workstation? If you do you should make sure that the user running Wireshark (don't go with root here) has access right to the display server. Or allow the access at the workstation with xhost.

permanent link

answered 11 Mar '13, 15:40

Jaap's gravatar image

Jaap ♦
accept rate: 14%

and on a sidenote: yes, you do need the GUI to run Wireshark, no matter if by icon click, file association or command line. If you want a command line tool, run tshark instead.

(11 Mar '13, 15:55) Jasper ♦♦

yum install wireshark

As far as I know, the GUI version package is called wireshark-gnome on RHEL 5.6, whereas the package wireshark contains only the CLI tools (tshark, dumpcap, etc.). So, please run this command

yum install wireshark-gnome

Then you should be able to start wireshark from the CLI.


permanent link

answered 11 Mar '13, 23:41

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

edited 11 Mar '13, 23:42

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Mar '13, 12:18

question was seen: 37,808 times

last updated: 11 Mar '13, 23:42

p​o​w​e​r​e​d by O​S​Q​A