Score:2

VNC Config Window only when autostarting VNCServer Ubuntu 20.04 LTS

bb flag

enter image description hereI have Ubuntu 20.04 LTS installed with TigerVNC and I use the following settings in my ~/.vnc/xstartup file:

#!/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

For autostarting the VNC server, I use crontab -e and start it like that: @reboot /usr/bin/vncserver :2.

The problem is that I only get a black screen with the VNC config window, but if I enter the same command manually it works without any issues and I get my gnome desktop as directly on the machine.

petep avatar
in flag
Comment out the lines in xstartup that start with '[' char. And make sure to have vncserver.users file in /etc/tigervnc/ dir.
Mario2407 avatar
bb flag
I commented the '[' lines. I do not have the users file. Should I just create it? What would be the content?
petep avatar
in flag
username:2 . Your username then display number you use for vnc
Mario2407 avatar
bb flag
Unfortunately that did not change anything either
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.