I have Ubuntu 20.04 on the my AWS instance and I have installed xubuntu-desktop
and xrdp
. After putting exec startxfce4
into my user's ~/.xsession
I can launch default XFCE4 session when I connecect from my Windows via Remote Desktop and choose "Xorg" option on the login screen. But that's just default XFCE4, and I'd like to start Xubuntu session, with all its customizations to look and feel. Please advise how to achieve that.
1 Answer
The reason is because several environment variables are not set and passed to startxfce4. Create a /usr/local/bin/start-xubuntu file and put "start-xubuntu" in ~/.xsessions:
#!/bin/bash
export XDG_DATA_DIRS="/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share"
export XDG_CONFIG_DIRS="/etc/xdg/xdg-xubuntu:/etc/xdg"
export LANG=en_US.UTF-8
export GDM_LANG=en_US.UTF-8
export DESKTOP_SESSION=xubuntu
export GDMSESSION=xubuntu
export XDG_SESSION_DESKTOP=xubuntu
# propagate to X sessions. It is important when user first
# login, they decide on the initial xfce/xubuntu template settings.
dbus-update-activation-environment --verbose XDG_DATA_DIRS XDG_CONFIG_DIRS DESKTOP_SESSION GDMSESSION XDG_SESSION_DESKTOP
exec startxfce4
Kudos goes to Netspectrum Ubuntu AMI on AWS, which gives you a ready-to-go xubuntu desktop via VNC, RDP or browser in a few seconds.
-
A correction to the answer by @user4572254: put
start-xubuntu
in~/.xsession
(not~/.xsessions
.)– MostafaAug 19, 2021 at 23:51 -
To reconnect correctly i made sure
/etc/xrdp/startwm.sh
hadtest -x /tmp/.X11-unix/X10 || exec /bin/sh /etc/X11/Xsession
instead -- wherein X10 is the default xrdp display from theX11DisplayOffset
from/etc/xrdp/sesman.ini
-- probably could do this better though– VetsinJul 12, 2023 at 19:51
/usr/share/xsessions
? I'd assume it should work the same way asxfce4session
mentioned above.xubuntu.desktop
. Also, do us all a favor, and don't post outputs as comments.