I use UBuntu 16.04.1 LTS. I have also installed Xfce4 so in Lightdm login screen I can choose Unity or Xfce. I assume that when Lightdm runs Xfce4 desktop environment it uses /usr/bin/startxfce4 Then Xfce runs a dedicated window manager Xfwm4. A configuration file is stored here:/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xmlXfce can be used with other window manager, here is a configuration option from that file:<property name=Client0_Command type=array>    <value type=string value=xfwm4/></property>I wonder how Lightdm starts Unity/Compiz ? Unity is a Compiz plugin and can't be used with other window manager, right ? So how exactly Lightdm runs Compiz ? Compiz can be run with parameters, for example:compiz --replace ccp (a configuration plugin which can load other plugins) orcompiz --replace composite opengl etc. (a plugin list is defined explicitly)UpdateLightdm refers to /usr/share/xsessions , xfce.desktop contains:Exec=startxfce4and ubuntu.desktop:Exec=gnome-session --session=ubuntuTryExec=unityThen lightdm-session runs gnome-session --session=ubuntu, gnome-session refers to /usr/share/gnome-session/sessions/ubuntu.session. Here is my ubuntu.session content:[GNOME Session]Name=UbuntuRequiredComponents=unity-settings-daemon;DesktopName=UnityThere is nothing about Compiz. So probably /usr/bin/unity is run and it load some other config ?
UBuntu 16.04 - how Lightdm starts Unity
x11;xfce;lightdm;unity;compiz