vncserver :1 -auth /home/lmf/.Xauthority -geometry 1280x720 -depth 24 -rfbwait 30000 -rfbauth /home/lmf/.vnc/passwd -rfbport 5901 -pn -SecurityTypes VncAuth -localhost no
kali linux 上tightvncserver 安装包版本有问题, 会导致连接失败. 而且 tightvncserver 是 使用虚拟窗口. 安装使用x11vnc
1. sudo apt-get install -y x11vnc
2. sudo mkdir /etc/x11vnc
3. sudo touch /etc/x11vnc/vncpasswd
4. sudo chmod -r 755 /etc/x11vnc
5. sudo x11vnc -storepasswd /etc/x11vnc/vncpasswd
6. sudo vim /lib/systemd/system/x11vnc.service
sudo vim /etc/systemd/system/vncserver@.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=linuxize
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -geometry 1440x900 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
7. sudo systemctl daemon-reload
8. sudo service lightdm restart
9. sudo systemctl start x11vnc.service
10. sudo systemctl enable x11vnc.service
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg-video-dummy
sudo nano /etc/X11/xorg.conf.d/xorg.conf
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x720"
EndSubSection
EndSection
sudo vim /etc/X11/Xwrapper.config
allowed_users = anybody
kali linux树莓派配置的各种坑① 有线配置+串口控制台
kali2020 vnc安装_kali配置x11vnc
x11vnc is displaying a black (blank) screen, even though the computer is working fine (through SSH)
Add Fake Display when No Monitor is Plugged In