You can find the documentation for the
update-alternatives online (or use
man update-alternatives in your terminal) which explains what the tool does:
update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system.
It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice for an editor to invoke if the user has not specified a particular preference.
Debian's alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors ed(1) and nvi(1) are both installed on the system, the alternatives system will cause the generic name
/usr/bin/editor to refer to
/usr/bin/nvi by default. The system administrator can override this and cause it to refer to
/usr/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.
Later on it explains about the
--config option you used:
When using the
--config option, update-alternatives will list all of the choices for the link group of which given name is the master alternative name. The current choice is marked with a '*'. You will then be prompted for your choice regarding this link group. Depending on the choice made, the link group might no longer be in auto mode. You will need to use the
--auto option in order to return to the automatic mode (or you can rerun
--config and select the entry marked as automatic).
Hopefully that clarifies it a little bit, but the gist is that you've changed the X session manager to be something else, and that appears to have broken your system horribly. Your goal is to set it back to what it was originally, and hopefully that should restore any problems.
If you are unable to get to a terminal to fix any damage done, you might need to follow the steps listed here to add
init=/bin/bash to the end of your
cmdline.txt. Before doing that though, see if Ctrl+Alt+F2 takes you to a terminal—if so, don't bother with the steps listed there and just run the commands below.
Once you've got a shell running and the file system is writeable, you then need to figure out how to reset what you've changed. This will probably be done by running:
sudo update-alternatives --auto x-session-manager
init=/bin/bash as instructed in the steps linked above and reboot. If that fixes it, great. If not, re-add
init=/bin/bash and try:
sudo update-alternatives --config x-session-manager
then set the option back to the alternative that had been selected before you changed it. Good luck!