I personally VNC into my Black Pearl Conky—themed local Desktop; that's the screenshot that I provided on a different thread. It was of course necessary to run that install-desktop
script. I initially did all the work on a local monitor connected to the Pi and then got things so that I could remote in.
I remember fussing with the X configuration. I'm reviewing my setup notes for that and this one seems interesting:
[x] You have run sudo raspi-config
and have setup the boot option so that it successfully logs in automatically into the graphical desktop each boot, as well as setting the maximum resolution that the LCD can handle...
And here is my README.md notes from the section where I'm setting it up, noting that the orientation on the TFT still isn't happy and I spend a fair amount of time trying to get the calibration working. The original routine for calibrating TFTs broke in Stretch, for what it's worth. Note that I edit the config.txt several times. I usually document like this so that I can have reproducible results at a later time.
Take this with a grain of salt. This represents about 4 hours' worth of research for all the hiccups involved.
- sudo scripts/install-desktop
- sudo nano /boot/config.txt
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=ads7846,penirq=25,speed=10000,penirq_pull=2,xohms=150
- sudo mkdir /etc/X11/xorg.conf.d/99_calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3853 170 288 3796"
Option "SwapAxes" "1"
EndSection
- sudo apt-get update
- sudo apt-get install -y libts-bin evtest xinput python-dev python-pip
- sudo pip install evdev
- sudo apt-get install -y xinput-calibrator
- sudo apt-get install -y xvkbd
- sudo nano /boot/cmdline.txt
fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
- sudo nano /boot/config.txt
dtparam=audio=on
dtparam=spi=on
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
- sudo nano /etc/modules
spi-bcm2835
snd-bcm2835
i2c-bcm2708
i2c-dev
ads7846
flexfb
fbtft_device
- sudo nano /etc/modprobe.d/lcd.conf
options flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
options fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
options ads7846_device model=7846 cs=1 gpio_pendown=17 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
- sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
EndSection
- sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
EndSection
- Physically add a USB-based keyboard to get past the login prompt
- Login after reboot
- DISPLAY=:0 xinput_calibrator
Calibrating standard Xorg driver "ADS7846 Touchscreen"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535
If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "21458"
Option "MaxX" "21822"
Option "MinY" "42359"
Option "MaxY" "44270"
Option "SwapXY" "1" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
- sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
- sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
- sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_test
- sudo apt-get install libxaw7-dev libxxf86vm-dev libxaw7-dev libxft-dev
- cd ~ && git clone https://github.com/KurtJacobson/xtcal && cd xtcal && make
- sudo nano /etc/udev/rules.d/95-stmpe.rules
SUBSYSTEM=="input", ATTRS{name}=="stmpe-ts", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen"
- sudo rmmod stmpe_ts; sudo modprobe stmpe_ts
- DISPLAY=:0.0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1
# Noting here that the touchscreen still isn't behaving yet.
- sudo raspi-config
Set to auto-login for desktop in Boot options
- sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
- sudo raspi-config
Turn on VNC under interfacing options
- sudo nano /root/.vnc/config.d/vncserver-x11
Authentication=VncAuth
EnableAnalytics=0
Encryption=AlwaysOff
- sudo vncpasswd -service
- Finder -> Cmd-K -> vnc://pi@charming-pascal.local