Last active
February 14, 2022 08:34
-
-
Save raultm/5410c49622123f563fee1913600672b7 to your computer and use it in GitHub Desktop.
Instalación de x11vnc y creación/arranque de servicio en systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Instalación de paquete x11vnc | |
apt-get install x11vnc -y | |
# Creación de archivo de configuración de servicio para systemd | |
echo "# Description: Custom Service Unit file | |
# File: /etc/systemd/system/x11vnc.service | |
[Unit] | |
Description="x11vnc" | |
Requires=display-manager.service | |
After=display-manager.service | |
[Service] | |
ExecStart=/usr/bin/x11vnc -loop -nopw -xkb -repeat -noxrecord -noxfixes -noxdamage -forever -rfbport 5900 -display :0 -auth guess -allow XXX.XXX.XXX.XXX,YYY.YYY.YYY.YYY | |
ExecStop=/usr/bin/killall x11vnc | |
Restart=on-failure | |
RestartSec=2 | |
[Install] | |
WantedBy=multi-user.target" > /etc/systemd/system/x11vnc.service | |
# Habilitamos el servicio y lo arrancamos | |
systemctl enable x11vnc | |
systemctl daemon-reload | |
systemctl start x11vnc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment