VNC xstartup for Ubuntu Desktop (Gnome)
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/sh | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
vncconfig -iconic & | |
export DESKTOP_SESSION=/usr/share/xsessions/ubuntu.desktop | |
export XDG_CURRENT_DESKTOP=ubuntu:GNOME | |
export GNOME_SHELL_SESSION_MODE=ubuntu | |
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop | |
dbus-launch --exit-with-session /usr/bin/gnome-session --systemd --session=ubuntu |
I had to comment out the --systemd
flag for Ubuntu 18.04, but otherwise it works beautifully. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much!