First sorry for the english translated via google translator.
I'm in an environment where there are windows domain controllers and ubuntu 22.04 workstations, different users use the same desktops alternately with their credentials.
In this scenario, how would it be possible to enable the native VNC server through a script in the /etc/skel folder so that when the user logs in for the first time on the desktop, the vnc server is configured?
I've already tried installing apps like x11vnc, tightvnc, vnc4server, but I always find it difficult to export these settings to other users. I also tried inserting configuration commands at the end of the .profile file, it didn't work:
gsettings set org.gnome.desktop.remote-desktop.vnc enable true
gsettings set org.gnome.desktop.remote-desktop.vnc auth-method 'password'
gsettings set org.gnome.desktop.remote-desktop.vnc view-only false
echo -n 'senha001' | secret-tool store --label="GNOME Remote Desktop VNC password" "xdg:schema" "org.gnome.RemoteDesktop.VncPassword"
systemctl --user start gnome-remote-desktop.service
loginctl unlock-session $(loginctl --no-legend --value list-sessions | awk '/seat/ { print $1}')
the commands above even allow remote connection, but the screen is cut off in the upper left corner in the size of 800x600, hiding the rest of the original screen, making it impossible to access the dock that is in the bottom position
Printscreem
I hope someone can help me