7

I am trying to start the desktop with Raspbian Stretch, but I'm not able to run startx.

I install: RASPBIAN STRETCH WITH DESKTOP from https://www.raspberrypi.org/downloads/raspbian/

and then:

sudo raspi-config

I2C: enable, SSH: enable

localisation: prague

hostname: opensprinkler

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install git // github
sudo apt-get install mc // midnight commander
sudo apt-get install i2c-tools // for support I2C
sudo apt-get install python-smbus // for smbus support 

(I followed the instructons from here)

When I type startx, I get back:

bash-: startx command not found

Please do you have any suggestions?

(I want to continue with OpenSprinkler)

Aurora0001
  • 6,357
  • 3
  • 25
  • 39
palo
  • 71
  • 1
  • 1
  • 2

2 Answers2

4

The fact that dpkg -l | grep raspberrypi-ui-mods doesn't output anything indicates that you probably do not have the desktop version installed. You certainly don't have the default Raspbian PIXEL packages on your system.

Since you have no GUI, you don't have startx either. The GUI starts automatically on the full version of Stretch with Desktop, so it is another suspicious sign that no GUI starts on your installation.

You can either:

Fabs
  • 83
  • 2
  • 9
Aurora0001
  • 6,357
  • 3
  • 25
  • 39
1

I've run into this problem not because I wanted startx, but because startlxde caused cannot open DISPLAY error.

To solve that, just install the package that contains startx with the command:

 apt-get install xinit

and then use startx instead of startlxde.

You might need to configure your ~/.xinitrc.

DrBeco
  • 251
  • 3
  • 4