【发布时间】:2018-03-20 20:14:29
【问题描述】:
我刚刚在笔记本电脑上安装了来自 Packages (sudo apt-get install mininet) 的 Ubuntu 17.10 和 Mininet 2.2.2。本机,即真实机器上的真实操作系统,没有任何类型的虚拟机。笔记本电脑是 2017 款 MacBook Pro 13",不带触摸栏 (MacBookPro14,1),Ubuntu 在快速 USB 密钥上运行;只是为了完整性而写,我认为这无关紧要。
我需要 CLI 访问我要创建的每个 Mininet 主机,以便运行自定义测试并观察每个节点中通过的流量。
在我以前的笔记本电脑上,我有类似的设置,但使用的是旧版本的 Ubuntu,可能还有 Mininet,我设法能够从我想要的每个 Mininet 主机生成xterms。问题是,我根本不记得我是怎么做到的 =)。
echo $DISPLAY 返回:0,无论我是在普通shell 还是Mininet 主机中运行它,但在普通shell 中xterm 会打开一个xterm 窗口。假设h1 是我的 Mininet 主机。我用sudo mn 启动Mininet,我得到:
-
h1 echo $DISPLAY-->:0 -
xterm h1--> 什么都没有,什么也没有发生 -
h1 xterm &--> 什么都没有,什么也没有发生 -
h1 xterm-->No protocol specified. 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
我能找到的所有信息都与使用 ssh 进行 X11 转发有关,而我尝试的一切都失败了。
有什么想法吗?
【问题讨论】: