xterm not working in mininet

IP_Engr picture IP_Engr · Jun 26, 2016 · Viewed 11.3k times · Source

I'm using mininet version 2.1.0. My setup is such that I've to run the mininet command from a remote machine, e.g.,

ssh -X user@IP python mininet.py

X11 forwarding seems to be fine. X forwarding does not work from the mininet shell only, but it works from the SSH shell.

However, I'm unable to run xterm command on mininet. I'm not getting any output after running the xterm command.

mininet> pingall
*** Ping: testing ping reachability
h1 -> h2 h3
h2 -> h1 h3
h3 -> h1 h2
*** Results: 0% dropped (6/6 received)
mininet> xterm h1
mininet> h1 xterm
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted in
this environment. You may get a more descriptive message by running the 
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s

When I start the mininet from my local machine, xterm works and opens up a new window.

Where should I look for xterm related logs in such case?

I've already spent over a day on this. I also updated mininet version to the latest 2.2.1, but still no success.

Thanks in advance!

Answer

user1930043 picture user1930043 · Jul 22, 2018

when I moved to Ubuntu 18.04, Mininet xterm stopped working. all I did was to install xterm "sudo apt install xterm" in Ubuntu. after that I started mininet (sudo mn) and called mininet>xterm h1. the xterm window popped up as usual. hope this will help.