Skip to content

Instantly share code, notes, and snippets.

@cevheroglu
Created October 28, 2022 20:12
Show Gist options
  • Save cevheroglu/04567c64c3524a638d99eb38e4636282 to your computer and use it in GitHub Desktop.
Save cevheroglu/04567c64c3524a638d99eb38e4636282 to your computer and use it in GitHub Desktop.

Commads I used to install VNC on MBP12


install tigerVNC
$ sudo apt install tigervnc-standalone-server


first time running the vnc server. It will ask you to create passwords
$ vncserver


now turn off the service to configure
$ vncserver -kill :1


create the xstartup file and manage the permissions
$ touch ~/.vnc/xstartup && chmod +x ~/.vnc/xstartup


add the below script to the xstartup file
$ vim ~/.vnc/xstartup

        #!/bin/sh
        #Start up the standard system desktop
        unset SESSION_MANAGER
        unset DBUS_SESSION_BUS_ADDRESS
        /usr/bin/startlxqd
        [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
        [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
        x-window-manager &

see open ports to make sure vnc has a listening port on 5901
$ ss -tulp4


run the vncserver app again
$ vncserver -geometry 1920x1080 -localhost no :1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment