I have a problem in mininet, I want to start Wireshark but it displays this message:
Error: XDG_RUNTIME_DIR not set in the environment.
Gtk-WARNING**: cannot open display
Exit 1 sudo wireshark
Can anyone help me?
I have a problem in mininet, I want to start Wireshark but it displays this message:
Error: XDG_RUNTIME_DIR not set in the environment.
Gtk-WARNING**: cannot open display
Exit 1 sudo wireshark
Can anyone help me?
From your host linux you can:
$ ssh mininet@mininet_ip -X
and then you can run wireshark on your host machine.
OR
$ startx # on mininet
Seemingly you started Wireshark with sudo wireshark
. A detailed answer to similar problem is here. In short you should execute:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR wireshark
Because typing it each time might be cumbersome, you should consider adding a shell alias to your environment. For bash add this to .bashrc
:
alias ws='pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR wireshark'
and run ws
for Wireshark.
http://www2.0zz0.com/2016/03/21/01/646882356.png – Kati Dev Mar 20 '16 at 22:14