Datasheet
Boot to X Windows on PiTFT
To enable booting straight to X windows on the PiTFT follow the steps below. First make sure a display configuration
which would conflict is not present by executing in a terminal on the Pi:
Don't worry if the command fails with an error that the file doesn't exist. This failure is normal and should happen on a
good PiTFT install. You can ignore it and move on.
Next run the command below to open the nano text editor as root and create the file /usr/share/X11/xorg.conf.d/99-
pitft.conf:
When the editor loads to a blank file, copy in the text below:
Then save the file by pressing Ctrl-O and then enter, and finally exit by pressing Ctrl-X.
The step above will create a configuration file which tells X windows that it should use the PiTFT framebuffer (located
at /dev/fb1) by default when it runs.
At this point you can use the raspi-config tool to enable booting to desktop just like normal on the Pi. Run the
following command:
Then pick the Enable Boot to Desktop/Scratch option and choose if you want to boot to the console, desktop, or
scratch environment. After exiting the tool and rebooting you should see the Pi load X windows on the PiTFT after (be
patient it can take around 30 seconds to load).
sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
Section "Device"
Identifier "Adafruit PiTFT"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection
sudo raspi-config
© Adafruit Industries
https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-
pi
Page 62 of 70










