#!/bin/sh
# TigerVNC session startup: XFCE desktop.
#
# vncserver is started from a login shell. The desktop runs on the system tools and its own
# D-Bus session: a session bus inherited from the starting shell cannot find the XFCE services,
# which leaves a black desktop. Terminals opened on the desktop run ~/.bashrc as usual.
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XDG_SESSION_TYPE=x11
export XDG_CURRENT_DESKTOP=XFCE

export PATH="${HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

[ -r "$HOME/.Xresources" ] && xrdb "$HOME/.Xresources"

exec /usr/bin/dbus-launch --exit-with-session /usr/bin/startxfce4
