Desktop issue with startx not working


What is the problem?

I've installed octoprint and everything works fine in the terminal however I want to use the desktop view occasionally as well but not permanently so I installed the desktop using the built in sudo /home/pi/scripts/install-desktop and set it to no for auto boot into desktop however when I run startx in the terminal the command isn't found and I can't boot into the desktop any help would be appreciated!

Start desktop from the command line

I noticed this myself recently. I have a Raspberry Pi that was installed with the OctoPi image, ran the script you mentioned and like you, said "no" to the autoboot. There's no startx script in the path.

What I would do in a case like this would be to "go to school" on the raspi-config script itself. If you did select boot -> autoboot to Desktop as pi from that menu then it would do something behind-the-scenes to change something. I would first do a which raspi-config to find out where it lives, then a nano somepath/raspi-config using the information that I'd just found.

I would then review the contents of that rather large script and find out what happens when I might select that option from the menu. It will likely put something in one of the configuration files that kickoff during bootup. I may do this later but I've just shutdown my Raspi so I'll let you do a little detective work first.

Update: It may be necessary to run sudo apt-get -y install xinit