TouchUI & UCTRONICS 3.5 Inch HDMI TFT LCD Display with Touch Screen

What is the problem?
installed UCTRONICS 3.5 Inch HDMI TFT LCD Display with Touch Screen

touchscreen not working

What did you already try to solve it?
Fresh install following this guide https://docs.google.com/document/d/1PL6eCQK3QvIghZJ2oj-tdGO8CEi36dLJmz3rFpA8XUU/edit

also following https://github.com/BillyBlaze/OctoPrint-TouchUI/wiki/X:-Setup:-Boot-to-Browser-(OctoPi-or-Jessie-Light)

I get to sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
and I get sed: can't read /etc/X11/Xwrapper.config: No such file or directory

stock Ender 5 Pro 1.1.6.3,
Raspberry Pi 4 Model B Rev 1.1,
OctoPrint 1.3.12,
OctoPi 0.17.0,
OctoPrint-TouchUI 0.3.11

I suppose you could have searched the Internet like I just did to find this.

First off I don't know Linux and don't know what to search for when I don't know the problem!! I have spent hours researching and looking for solutions. This wasn't my first stop.

That solution is 2 years old and the links are dead. Still doesn't explain how to fix it.

The only reply by heavy_crown indicates that the file isn't always there and you can feel free to create it yourself. Yes, there's a (dead) link to something that's no longer pertinent. At this point, we might note that Raspbian is basically Debian (as a flavor of Linux) and that link referenced a different flavor called ArchLinux. If you're chasing code on the Internet, it's best to watch out for gotchas like this.

So here you are, following a tutorial or two. You have difficulties with that (noting that you might consider opening an issue on BillyBlaze's repository to give him the head's up about his instructions).

For what it's worth, that /etc/X11/Xwrapper.config file might be created after you boot once into the Desktop (assuming that you install an HDMI display, mouse and keyboard locally on that Pi). And then—assuming that the file is created after one bootup—that sed command then should work as you might expect it to.

In the case where you're trying to create it yourself, it's best to look at that sed command and try to see what it's trying to accomplish. If I search for sed -i 's/ I see that this is a search-and-replace activity. So it's not going to find anything in a blank file you create; you'd need to create it with some content...

Searching for debian /etc/X11/Xwrapper.config and a little light reading gives me this issue with some example content for the file. The first post there is what you'd be after.

Interpreting that sed command from before, the first part is what it would look for and the second part is what it would replace that with. We note that since you're interested in "anybody" as the argument, it would be then unnecessary to run the sed command, having created the file from the example in the issue post.

So now, how do you create the file in Linux (Debian/Raspbian)?

sudo touch /etc/X11/Xwrapper.config
sudo nano /etc/X11/Xwrapper.config

You're then in an editor. Copy/paste from the example then Ctl-o as in "oscar", then Ctl-x to exit the editor.

I was able to create the file earlier with sudo nano and saving a blank file.

Then I ran from https://community.octoprint.org/t/updating-from-1-3-10-to-1-3-11-through-web-interface-broke-octoprint/9526

sudo service octoprint stop
source ~/oprint/bin/activate
pip install --force-reinstall https://get.octoprint.org/latest
octoprint serve --safe

The file now says

allowed_users = rootonly|console|anybody

The touchscreen is responding now but not calibrated.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=9&cad=rja&uact=8&ved=2ahUKEwjlkqDR36fnAhXKmXIEHXJCBvIQFjAIegQIAhAB&url=https%3A%2F%2Fwww.uctronics.com%2Fdownload%2FAmazon%2FB0106.pdf&usg=AOvVaw0__0RxwQW8RdGBHjHn4sVf

Looks like your configuration file is trashed. Replace the contents with this:

allowed_users = anybody
needs_root_rights = no

Then reboot.

Calibration is something that needs to be performed. There's usually a step in the installation towards the end which covers that. Check your display's README or one of the tutorials you were working through. Or search the Adafruit site's tutorials for TFT calibration.