Add systemd service file for auto starting GUI, Update Readme (WIP)

This commit is contained in:
jonny 2025-01-30 17:16:34 +01:00
parent 7d83e354fa
commit a96344f6b9
2 changed files with 60 additions and 0 deletions

View File

@ -166,6 +166,52 @@ Small PCBs with LEDs, resistors, and mounting holes for housing indicators.
# Software/Firmware # Software/Firmware
Python code for operating the extension PCBs (e.g., GPIO pins, shift registers, ADC, and bus communication). This section is a work in progress (WIP), and example scripts will be added as development continues. Python code for operating the extension PCBs (e.g., GPIO pins, shift registers, ADC, and bus communication). This section is a work in progress (WIP), and example scripts will be added as development continues.
# ======== WIP ========
# Python scripting
The pin assignment to the actual terminals are defined / mapped in
`rpi-scripts\interface_board_pins.py` so it should be included in any custom script created to easily reference the terminal numbers printed onto the project housing in the code. See examples in `rpi-scripts\examples`
TODO: make those files link to file but with text still the file path
# Usage Raspberry-PI
## Connectivity
### Establish LAN Connection (ethernet)
configure in command.txt in boot partition?
### Establish WIFI Connection
```bash
s nmcli device wifi connect <SSID> password <password>
# replace <SSID> and <password> with actual wifi
```
### Connect via ssh
```powershell
ssh pi@192.168.1.100
```
### Connect via rdp
Open mstsc from windows start menu, and enter ip, user root and password.
Or use powershell:
```powershell
mstsc /v:192.168.1.100:3389
```
Note: currently only user `root` works (using user pi results in blackscreen)
### Mount filesystem in windows
You can mount /home/pi folder in windows natively using samba
Run in powershell to mount it as network device X (replace ip with the current ip of rpi)
Find out ip with running `ip a` on the raspberry
```powershell
net use X: \\192.168.1.100\pi /user:pi
```
## Scripts
### Autostart GUI
```bash
git/rpi-interface-board/rpi-scripts/gui% s cp gui-start.service /etc/systemd/system/
```
# ======== END WIP ========
--- ---

View File

@ -0,0 +1,14 @@
[Unit]
Description=Start Python GUI on boot
After=graphical.target
[Service]
Environment=DISPLAY=:0
ExecStart=/bin/python ./main.py
WorkingDirectory=/home/pi/git/rpi-interface-board/rpi-scripts/gui
User=pi
Group=pi
Restart=always
[Install]
WantedBy=graphical.target