#####在命令行中运行wireshark报错: Qt: XKEYBOARD extension not present on the X server. Gdk-Message: wireshark: Fatal IO error 2 (No such file or directory) on X server :1.0.
root@kali:~/Hacking/vpnbook# wireshark Qt: XKEYBOARD extension not present on the X server. Gdk-Message: wireshark: Fatal IO error 2 (No such file or directory) on X server :1.0.
#解决方案如下: ##1.安装Dummy Monitor.
sudo apt install xserver-xorg-video-dummy
##2.在 /etc/X11/xorg.conf.d 和 /usr/share/X11/xorg.conf.d目录下创建文件xorg.conf,文件内容如下:
Section "Monitor"
Identifier "Monitor0"
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
# https://arachnoid.com/modelines/
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection
Section "Device"
Identifier "Card0"
Driver "dummy"
VideoRam 256000
EndSection
Section "Screen"
DefaultDepth 24
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection
##3.重启
sudo reboot now
##4.查看Xorg 是否运行正常
ps wwwwaux | grep auth
如果正常运行,会显示以下结果:
root 546 6.4 3.1 614984 122828 ?
Sl 06:14 1:52
/usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
##5.启动x11vnc
x11vnc -storepasswd
##6.然后运行以下命令:
sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw -scale 1920x1080 -forever
##7.使用你的vnc客户端连接到vnc屏幕,端口为5900
vnc://192.168.91.235:5900