我无法在mininet中运行命令$ sudo ~/mininet/examples/miniedit.py
或$ sudo python ~/mininet/examples/miniedit.py
。当我输入该命令以使用miniedit时,输出为“_tkinter.TclError:没有显示名称且没有$ DISPLAY环境变量“。
请告知该命令有什么问题,或者我是否需要安装一些软件包。
答案 0 :(得分:2)
我希望我不会太迟,而且我不知道你是如何使用你的mininet的,但是一个好的提示是在VM控制台窗口中运行GUI(如果那样的话)。你正在使用的是什么。
正如font所示,请尝试:
[kivy]
keyboard_repeat_delay = 300
keyboard_repeat_rate = 30
log_dir = logs
log_enable = 1
log_level = info
log_name = kivy_%y-%m-%d_%_.txt
window_icon =
keyboard_mode =
keyboard_layout = qwerty
desktop = 1
exit_on_escape = 1
pause_on_minimize = 0
kivy_clock = default
default_font = ['Roboto', 'data/fonts/Roboto-Regular.ttf',
'data/fonts/Roboto-Italic.ttf', 'data/fonts/Roboto-Bold.ttf',
'data/fonts/Roboto-BoldItalic.ttf']
log_maxfiles = 100
window_shape = data/images/defaultshape.png
config_version = 20
[graphics]
display = 0
fullscreen = 0
height = 500
left = 0
maxfps = 60
multisamples = 2
position = custom
rotation = 0
show_cursor = 1
top = 50
width = 1000
resizable = 0
borderless = 0
window_state = visible
minimum_width = 0
minimum_height = 0
min_state_time = .035
allow_screensaver = 1
shaped = 0
[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
[postproc]
double_tap_distance = 20
double_tap_time = 250
ignore = []
jitter_distance = 0
jitter_ignore_devices = mouse,mactouch,
retain_distance = 50
retain_time = 0
triple_tap_distance = 20
triple_tap_time = 375
[widgets]
scroll_timeout = 250
scroll_distance = 20
scroll_friction = 1.
scroll_stoptime = 300
scroll_moves = 5
[modules]
然后:
sudo apt-get update && sudo apt-get install xinit lxde virtualbox-guest-dkms
这应该为你打开一个GUI,这样你就可以轻松打开里面的miniedit了!
答案 1 :(得分:1)
出现此错误的原因是您要从其启动ssh腻子会话的主机上未安装X11显示服务器。
步骤1:在主机上下载并安装X11显示服务器。 我的建议是“ xming”-> https://sourceforge.net/projects/xming/
第2步:启动x11显示服务器[xming]
步骤3:在启动腻子/ ssh会话之前启用x11转发 enabling x11 forwarding
第4步:运行命令sudo〜/ mininet / examples / miniedit.py