PiDisplay is a system tray utility built for Raspberry Pi for switching between HDMI and UCTRONICS 3.5" LCD displays. The default method involves running bash scripts in the terminal, so PiDisplay simplifies this process by putting simple options in a dropdown menu from the system tray.
This app is build specifically for this UCTRONICS screen
The script was initially develope directly on the Pi with UC Davis's c-STEMBian installed. c-STEMBian is a curated OS built on Raspbian with a wide selection of c-STEM packages.
Open up the terminal and copy and paste this command:
wget -nd -P ~/PiDisplay https://raw.githubusercontent.com/bearcanrun/pi-display/master/install && sudo chmod +x ~/PiDisplay/install && cd ~/PiDisplay && sudo ./install
Note: In Raspbian's terminal, you have to use paste from menu Edit > Paste or right click and then choose "paste."
PiDisplay is set to automatically load when the Pi reboots.
If you quite PiDisplay and wish to restart it without rebooting, open up the terminal and run:
sudo systemctl start PiDisplay
Open up the terminal and run:
sudo /home/pi/PiDisplay/uninstallPiDisplay.sh
Tracking down dependencies for the various Python environments can be challenging.
git clone https://github.com/bearcanrun/pi-display.git
cd pi-display
Install dependencies as follows: Upgrade to latest PIP:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
Install GTK3+ and AppIndicator
sudo apt-get install python3-gi python-appindicator
pip install gobject PyGObject notify2
- Icons located in
/usr/share/icons/
Install dependencies as follows: Upgrade to latest PIP:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
Install GTK3+ and AppIndicator
brew install gtk+3 pygobject3
pip3 install notify2
Note tha pyinstaller only creates binaries for the specific architecture running it. So to create a Raspbian binary, it must be done on the Raspberry Pi.
Install pyinstaller and upx
pip3 install --user pyinstaller
sudo apt-get install upx-ucl
Build
python3.5 -m PyInstaller ./python/pi-display/PiDisplay.py --onefile --upx-dir /usr/bin
Creat Source Dist:
python3 setup.py sdist
To build run:
python3 setup.py sdist --formats=gztar
If you haven't already, register an account on PiPy
For uploading dist bundle, install twine (secure replacement for setup.py upload
):
pip install --user --upgrade twine
Test package upload:
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Upload dist:
python3 -m twine upload dist/*
The development of this utility was inspired by the Calistoga STEM Camp Summer 2019.