Desktop environment script activation

If I followed these instructions ( Stop OSMC starting automatically on boot and run from command line - #36 by sam_nazarko ), would it be possible to create a script linked to an item on the kodi home page that stopped mediacenter, logged in as OSMC - osmc, and than ran startx?

If so, what would the commands (and script) look like?

You would need to install a desktop and the X server first

S

I knew this, I just wanted to know if it was possible, as I am terrible at remembering codes and don’t want to go to the command line every time! :wink: