Last active
March 5, 2019 16:53
-
-
Save jasonadsit/3a836c60f010bf655f82a99064341993 to your computer and use it in GitHub Desktop.
Enable VNC Server on Kali Remotely
This file contains hidden or 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/sh | |
| systemctl disable xrdp.service | |
| mkdir /root/.config/autostart | |
| touch /root/.config/autostart/vino-server.desktop | |
| echo "[Desktop Entry]" >> /root/.config/autostart/vino-server.desktop | |
| echo "Type=Application" >> /root/.config/autostart/vino-server.desktop | |
| echo "Name=Vino VNC server" >> /root/.config/autostart/vino-server.desktop | |
| echo "Exec=/usr/lib/vino/vino-server" >> /root/.config/autostart/vino-server.desktop | |
| echo "NoDisplay=true" >> /root/.config/autostart/vino-server.desktop | |
| dbus-launch gsettings set org.gnome.Vino require-encryption false | |
| dbus-launch gsettings set org.gnome.Vino prompt-enabled false | |
| dbus-launch gsettings set org.gnome.Vino notify-on-connect false | |
| dbus-launch gsettings set org.gnome.Vino authentication-methods "['vnc']" | |
| dbus-launch gsettings set org.gnome.Vino vnc-password $(echo -n "password"|base64) | |
| dbus-launch gsettings set org.gnome.desktop.lockdown disable-user-switching true | |
| dbus-launch gsettings set org.gnome.desktop.lockdown disable-lock-screen true | |
| dbus-launch gsettings set org.gnome.desktop.lockdown disable-log-out true | |
| dbus-launch gsettings set org.gnome.desktop.interface enable-animations false | |
| dbus-launch gsettings set org.gnome.desktop.session session-name gnome | |
| sed -i 's/# AutomaticLoginEnable = true/ AutomaticLoginEnable = true/g' /etc/gdm3/daemon.conf | |
| sed -i 's/# AutomaticLogin = root/ AutomaticLogin = root/g' /etc/gdm3/daemon.conf | |
| reboot | |
| exit 0 |
Hi , when i try to run this i got the following
root@errants:~# ./fix-kali-vnc.sh
Failed to disable unit: Unit file xrdp.service does not exist.
mkdir: cannot create directory ‘/root/.config/autostart’: File exists
No such schema “org.gnome.Vino”
No such schema “org.gnome.Vino”
No such schema “org.gnome.Vino”
No such schema “org.gnome.Vino”
No such schema “org.gnome.Vino”
Any ideas?
Thanks in advance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
finding this saved me a ton of time. Thanks for sharing