Artificial intelligent assistant

How to start mutter as a xsession? I am making a Desktop Environment (DE) in which I will be using the mutter Window Manager (WM) as the default WM. I am new to DE's and WM's. So how do I start it in a script and pack it in the `xsessions` directory so that mutter only starts up in my custom DE? My actual target is to create a minimal DE for my custom Linux OS in which I want the power behind gnome to run behind my custom DE but without the gnome-shell. I will be using plank dock and other stuff to make it more usable.

The command to start it up is mutter --replace

The command is to be saved in a .sh file and later a .desktop file is to be added to the xsessions directory.
I found this tutorial where it is clearly stated but using compiz though..

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c75c38fb5eb9b157e30cca3c7d1402bb