ssh -x
как обычно. Но на этот раз я вхожу в систему, заметьте xhost: unable to open display ""
. И когда я выполняю virt-manager
, он показывает так: Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(virt-manager:16045): Gtk-WARNING **: cannot open display:
/etc/ssh/ssh_config
и убедился, что у него есть сконфигурированный как показано ниже: ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
А затем проверьте /etc/ssh/ssh_config
удаленного хоста и убедитесь, что он сконфигурирован, как показано ниже:
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
И затем я выполню virt-manager
, он по-прежнему выглядит следующим образом:
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(virt-manager:16045): Gtk-WARNING **: cannot open display:
Затем я попробовал несколько команд, как показано ниже, это кажется бесполезным.
$ sudo vncserver
New 'My_Local_Host:15 (root)' desktop at :15 on machine My_Local_Host
Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/My_Local_Host:15.log
Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :15 to connect to the VNC server.
$ export DISPLAY=localhost:15
$ xhost +
xhost: unable to open display "localhost:15"
Наконец, я установил gksu
и попытался открыть virt-manager
им, но он все еще бесполезен:
gksu virt-manager
(gksu:17242): Gtk-WARNING **: cannot open display: localhost:15
Можете ли вы дать мне какой-нибудь совет? Спасибо!