4

I am not able to run the command $ sudo ~/mininet/examples/miniedit.py or $ sudo python ~/mininet/examples/miniedit.py in mininet.When I type that command to use miniedit the output comes as"_tkinter.TclError:no display name and no $DISPLAY environment variable" .

Kindly suggest what is the problem with the command or if I need to install some packages.

chaya
  • 41
  • 1
  • 4
  • It is a bit tricky to know has you are just posting "This does not work". What is your setup? What is the output of those commands? Please read the guide on how to ask questions here: http://stackoverflow.com/help/how-to-ask – gfelisberto May 16 '16 at 09:54
  • Did you run from ssh? You should use -X param to pass the X11 display in the shh session... – SotirisTsartsaris May 20 '16 at 11:59

2 Answers2

2

I hope I'm not too late and I don't know how you're using your mininet, but one good tip is running a GUI in the VM console window (if that's what you're using).

As this font suggests, try:

sudo apt-get update && sudo apt-get install xinit lxde virtualbox-guest-dkms

And then:

startx

This should open a GUI for you, so you can easily open the miniedit inside it!

Kate Leal
  • 21
  • 3
1

The reason you are getting the error is that the X11 display server is not installed on your host from which you are initiating the ssh putty session from.

Step 1: Download and install X11 display server on your host. My recommendation is "xming" --> https://sourceforge.net/projects/xming/

Step 2: Start x11 display server [xming]

Step 3: Enable x11 forwarding before starting the putty/ssh session enabling x11 forwarding

Step 4: run command sudo ~/mininet/examples/miniedit.py

GokusSG
  • 9
  • 2