6

I am trying to run wireshark on mininet using a ssh session but it does not work I have this error :

  error: XDG_RUNTIME_DIR not set in the environment.

and also this error :

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

I will appreciate your help thanks !!

hayfa
  • 89
  • 1
  • 1
  • 4

4 Answers4

2

1) Make sure the ssh connection is started with -X or -Y option. Example: ssh -X usernme@ipaddress

2) Restart the ssh connection, that is just exit and log in again!

shr
  • 51
  • 3
1

For each host you want to observe (lets say h1): On mininet: xterm h1 On xterm of h1 try: wireshark-gtk instead of wireshark

0

Make sure you've added an host-only network adapter and connected it to the VM.

In order to so this on Virtual Box:

  1. Open the VirtualBox preferences menu by clicking on File → Preferences

  2. Click on Network

  3. Click on the tab Host-only Network

  4. Click on Add (the small green “plus” icon on the right side of the window)

An adapter called vboxnet0 will be created. The default settings should be acceptable

Then, from the VM settings assign the adapter to the Macine:

  1. Click on the VM

  2. Click on Settings

  3. Click on Network

  4. Change Network Adapter to be attached to "Host-only Adapter"

    • You can also use Adapter 2 and leave Adapter 1 connected by NAT to the Internet
  5. Make sure the adapter you've just added is selected

Only then, you'll be able to connect to the VM with ssh -X usernme@ipaddress as @shr wrote.

If you ran info more issues, please read the setup notes

jfhfhf839
  • 1,629
  • 1
  • 12
  • 13
0

I got the same error like the ones mentioned in the question.

In my fix(after you ssh -X usernme@ipaddress), I changed to directory mininet/util and ran the shell script install.sh. So basically

  1. cd mininet/util.
  2. sh install.sh.
  3. "sudo wireshark &". to start wireshark and you will get warning, just hit Ok
sach
  • 1