Hints for the touchscreen setup

In this post I went over the basic steps for getting the touchscreen running. Here are some additional hints and tips for getting the touch screen running.

  1. There is a display_rotate option documented for use in config.txt. That didn’t work for me. Only adding the rotate= option worked. The values for rotate= are 0, 90, 180 and 270.
  2. In the console mode, if the default font is too large, you can select the smaller font by adding a fbcon=font:VGA8x8 at the end of the cmdline.txt file
  3. . You will need to reboot after making the change.

  4. I found it was easiest to setup the system using SSH. That required a few options to get Xwindows to start from a SSH terminal vs. the LCD console.
    • You will need sudo apt-get install xserver-xorg-legacy to get the config file that allows starting Xwindows from the SSH terminal.
    • Change /etc/X11/Xwrapper.config to allowed_users=anybody. This allows SSH users to start Xwindows.
  5. Start Xwindows from the SSH terminal with the startx& command. Stop X with the pkill x command.
  6. If you want to run a Xwindows program from the SSH terminal, you need to tell it which display to use. Put the string DISPLAY=:0.0 before the command. For example “DISPLAY=:0.0 xinput set-prop ...
  7. The xinput set-prop matrix command is additive. If you run it twice in the same X session, it will not do what you expect. If you need to run it a second time you will need to stop X and start again.
  8. During testing I setup the xscreensaver. Install with sudo apt-get install xscreensaver xscreensaver-data-extra. The screen is too small to configure xscreensaver using the tiny screen. But, you can edit the .xscreensaver file in your home directory. You can see my files below. I removed all the screensavers that don’t look good on the tiny, slowly updating screen.

My .xscreensaver file is here.