The menu bar is only missing in the tightvnc client display :1 whereas it is present in the session connected to a hdmi monitor. On the hdmi monitor session I can open an lxterminal (about says 0.3.2) from the menu bar (LXDE). Whereas right clicking on a folder and "Open in Terminal" gives me an Xfce terminal (about says

In raspi-config the default display resolution was not changed. The black border around the screen on the hdmi monitor was removed. (I have the same settings on an rp3b+ with an older install and have no problems with the menu bar, also using tightvnc).

I was not able getting the menu to show up.

The fresh install was done with "Raspberry Pi Imager" and chosen "Raspberry Pi OS (32 bit) published 2021-03-04". (I tried it twice with the same result).

Operating System: Raspbian GNU/Linux 10 (buster) Kernel: Linux 5.10.17-v7l+

Changing the geometry (resolution) of the vncserver process doesn't help.


I would start by running ps axf while the system runs with HDMI screen attached, and compare the ouput to whatever you get when running the VNC. Either lxpanel is not started in the second case, or it is started with a different command line, and you need to figure out where the differences start to decide which config files to check first.

For reference, this is the process tree I have on Pi OS with a local session:

  531 ?        Ssl    0:00 /usr/sbin/lightdm
  603 tty7     Ssl+ 575:20  \_ /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
 1123 ?        Sl     0:00  \_ lightdm --session-child 14 17
 1146 ?        Ssl    0:29      \_ /usr/bin/lxsession -s LXDE-pi -e LXDE
 1205 ?        Ss     0:04          \_ /usr/bin/ssh-agent x-session-manager
 1251 ?        S      0:22          \_ openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
 1253 ?        Sl     0:00          \_ lxpolkit
 1256 ?        Sl    22:56          \_ lxpanel --profile LXDE-pi

The whole lxsession tree is started by running x-session-manager command. If your VNC server runs lxsession directly, it could be that your environment is not set correctly: check if you have $XDG_DATA_DIRS, $XDG_CONFIG_HOME and similar variables set inside a VNC session. If not, you may want to edit ~/.vnc/xstartup to set those variables or use the x-session-manager command.


As it turns out, pulseaudio was causing this error. I looked at /home/pi/.cache/lxsession/LXDE-pi/run.log and compared it to the same log on my other raspberry 3b+ that doesn't have the problem. The following lines stood out:

** (lxpanel:1262): WARNING **: 10:29:58.402: init context: err:6 Connection refused

Assertion 'pthread_mutex_lock(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:90, 
function pa_mutex_lock(). Aborting.
** Message: 10:29:58.411: app.vala:130: lxpanel exit with this type of exit: 6
** Message: 10:29:58.411: app.vala:148: Exit not normal, try to reload

I found a solution here https://retropie.org.uk/forum/topic/28910/making-sound-back-after-december-update-broke-pixel-desktop/3

sudo apt remove lxplug-volumepulse

It worked better than the following solution: https://unix.stackexchange.com/questions/445386/pulseaudio-server-connection-failure-connection-refused-debian-stretch using this answer:

# clean and reinstall pulseaudio
sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio
sudo apt-get -f install && sudo apt-get -y autoremove && sudo apt-get autoclean && sudo apt-get clean && sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
# fixes user folder permissions
sudo chown -R $USER:$USER $HOME/
# then reboot
sudo reboot 

Found this from someone with the same problem.

Might be outdated, but eventually it helps.

I saved a copy of my ~/.vnc/xstartup

apt-get install xorg lxde-core tightvncserver

Started VNC to create config file (xstartup) tightvncserver :1

Then stopped VNC tightvncserver -kill :1

Edited config file to start session with LXDE:

nano ~/.vnc/xstartup

and added this at the bottom of the file: `lxterminal & /usr/bin/lxsession -s LXDE &

start VNC `tightvncserver :1

and this worked... I now have a menu bar!

the complete ~/.vnc/xstartup as follows: `#!/bin/sh

xrdb $HOME/.Xresources xsetroot -solid grey -cursor_name left_ptr #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession lxterminal & /usr/bin/lxsession -s LXDE &

Link to the source:


  • Unfortunately, with this there are no terninal, bluetooth and wlan items on the panel. The correct configuration I get with /usr/bin/lxsession -s LXDE-pi -e LXDE&, but I don't get the panel in vnc. – monok Mar 30 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.