Ask Your Question

Why am I getting "cannot open display" when running Wireshark on my CentOS VM?

asked 2019-08-23 11:18:58 +0000

Av gravatar image

updated 2019-08-23 18:39:19 +0000

Guy Harris gravatar image

I used the following commands to install the tool:

$ yum install gcc gcc-c++ bison flex libpcap-devel qt-devel gtk3-devel rpm-build libtool c-ares-devel qt5-qtbase-devel qt5-qtmultimedia-devel qt5-linguist desktop-file-utils

$ sudo yum install wireshark wireshark-qt

Getting following error:

(wireshark:5032): Gtk-WARNING **: 10:34:42.462: cannot open display:
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-23 11:47:56 +0000

SYN-bit gravatar image

What does echo $DISPLAY say? If it is not set, Wireshark doesn't know where to send the graphical output. This is usually a problem by logging in from one shell to another. An other problem could be that the DISPLAY variable is set, but you are not running an X-server on the machine where DISPLAY points to.

edit flag offensive delete link more


Note that to install Wireshark you only need the 2nd command (yum install wireshark [...]). The first command is installing tools you'd need to compile/build Wireshark from the source.

JeffMorriss gravatar imageJeffMorriss ( 2019-08-23 14:23:39 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-08-23 11:18:58 +0000

Seen: 2,565 times

Last updated: Aug 23 '19