我正在使用Window7的TightVNC查看器来连接Ubuntu机器。我收到错误“tightVNC查看器中的错误,无法建立连接,因为目标计算机主动拒绝它。
我没有任何防火墙设置。
当我跑步时,ps -ef | grep vnc ::我得到
root 5265 4521 0 15:57 pts/1 00:00:00 sudo x11vnc -safer -localhost -nopw -accept popup:0 -once -viewonly -display :0
root 5266 5265 0 15:57 pts/1 00:00:00 x11vnc -safer -localhost -nopw -accept popup:0 -once -viewonly -display :0
mmm 5890 5269 0 16:06 pts/2 00:00:00 grep --color=auto vnc
开,x11vnc -forever -usepw -httpdir / usr / share / vnc-java / -httpport 5800
23/05/2014 16:16:12 * XOpenDisplay失败(:0)
* x11vnc无法打开X DISPLAY:“:0”,无法继续。 * 上面可能存在“Xlib:”错误消息,其中包含有关失败的详细信息。
我不确定问题出在哪里。
我尝试连接,如171.69.35.33 171.69.35.33:5900 171.69.35.33::5901
f4rom tightvnc viewer。
ps aux | grep vnc 117 6125 2.1 8.3 4832760 679396? Sl 16:14 1:13 / usr / bin / kvm -S -M pc-1.0 -enable-kvm -m 4096 -smp 4,sockets = 4,cores = 1,threads = 1 -name talon -uuid 33c53705-1847 -e2a4-897d-436c39337179 -nodefconfig -nodefaults -chardev socket,id = charmonitor,path = / var / lib / libvirt / qemu / talon.monitor,server,nowait -mon chardev = charmonitor,id = monitor,mode = control - rtc base = utc -no-shutdown -drive file = / home / nso / build23-patch / talon-amd64-0.0.0.23_output / talon-amd64-0.0.0.23.qcow2,if = none,id = drive-ide0- 0-0,格式= qcow2 -device ide-drive,bus = ide.0,unit = 0,drive = drive-ide0-0-0,id = ide0-0-0,bootindex = 1 -drive file = / home /nso/build23-patch/talon-amd64-0.0.0.23_output/talon.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive ,bus = ide.1,unit = 0,drive = drive-ide0-1-0,id = ide0-1-0 -netdev tap,fd = 18,id = hostnet0,vhost = on,vhostfd = 19 -device virtio -net-pci,netdev = hostnet0,id = net0,mac = 00:16:3e:36:ce:ec,bus = pci.0,addr = 0x3,bootindex = 2 -chardev socket,id = charserial0,host = 127.0.0.1,port = 2225,telnet,server,nowait -device isa-serial, chardev = charserial0,id = serial0 -usb -vnc 127.0.0.1:1 -vga cirrus -device intel-hda,id = sound0,bus = pci.0,addr = 0x5 -device hda-duplex,id = sound0-codec0, bus = sound0.0,cad = 0 -device virtio-balloon-pci,id = balloon0,bus = pci.0,addr = 0x7 mandnaya 6756 0.0 0.0 8112 896 pts / 2 R + 17:10 0:00 grep --color = auto vnc
答案 0 :(得分:13)
sudo apt-get install x11vnc
x11vnc -storepasswd
x11vnc -usepw
sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw
这解决了我的问题。