First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

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

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
(wireshark:5032): Gtk-WARNING **: 10:34:42.462: cannot open display:
Av's avatar
1
Av
asked 2019-08-23 11:18:58 +0000
Guy Harris's avatar
19.9k
Guy Harris
updated 2019-08-23 18:39:19 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

SYN-bit's avatar
18.5k
SYN-bit
answered 2019-08-23 11:47:56 +0000
edit flag offensive 0 remove flag delete link

Comments

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's avatar JeffMorriss (2019-08-23 14:23:39 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer