Skip to content

Commit f1bf4dd

Browse files
committed
update linux installation scripts
1 parent 3bcd3c7 commit f1bf4dd

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

INSTALLATION.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Note that on MacOS, serial ports may appear as `/dev/tty*` *or* `/dev/cu*`. To u
9696

9797
### Linux (including Raspberry Pi OS)
9898

99-
Some Linux distributions may not include the necessary pip, venv, tkinter, Pillow or spatialite libraries by default. They may need to be installed separately, e.g. for Debian-based distibutions, a combination of some or all of the following:
99+
Some older Linux distributions may not include all the necessary pip, venv, tkinter, Pillow or spatialite libraries by default e.g. for Debian-based distibutions, a combination of some or all of the following:
100100

101101
```shell
102102
sudo apt install python3-pip python3-tk python3-pil python3-venv python3-pil.imagetk libjpeg-dev zlib1g-dev tk-dev libspatialite
@@ -224,17 +224,25 @@ pipx will typically create a virtual environment in the user's home folder e.g.
224224
The following scripts require sudo/admin privileges and will prompt for the sudo password.
225225
226226
### Debian Linux
227-
An example [installation shell script](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/pygpsclient_debian_install.sh) is available for use on most vanilla 64-bit Debian-based environments with Python>=3.10, including Raspberry Pi and Ubuntu. To run this installation script, download it to your Raspberry Pi or other Debian-based workstation and - from the download folder - type:
227+
An example [installation shell script](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/pygpsclient_debian_install.sh) is available for use on most vanilla 64-bit Debian-based desktop environments (e.g. Wayland) with Python>=3.10, including Raspberry Pi OS Trixie and Ubuntu LTS. The script...
228+
- Installs all necessary Python system libraries.
229+
- Installs PyGPSClient into a virtual environment in the user's home directory and adds this environment to the user's PATH.
230+
- Adds user to the relevant /dev/tty* group.
231+
- Creates a desktop application launcher which can be accessed from the Applications..Other menu.
228232
229233
```shell
234+
wget https://raw.githubusercontent.com/semuconsulting/PyGPSClient/refs/heads/master/examples/pygpsclient_debian_install.sh
235+
# or use curl -O ... if you prefer
230236
chmod +x pygpsclient_debian_install.sh
231237
./pygpsclient_debian_install.sh
232238
```
233239
234240
### Arch Linux
235-
An example [installation shell script](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/pygpsclient_arch_install.sh) is available for use on most vanilla 64-bit Arch-based environments with Python>=3.10. To run this installation script, download it to your Arch-based workstation and - from the download folder - type:
241+
An similar example [installation shell script](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/pygpsclient_arch_install.sh) is available for use on most vanilla 64-bit Arch-based desktop environments (e.g. xfce) with Python>=3.10:
236242
237243
```shell
244+
wget https://raw.githubusercontent.com/semuconsulting/PyGPSClient/refs/heads/master/examples/pygpsclient_arch_install.sh
245+
# or use curl -O ... if you prefer
238246
chmod +x pygpsclient_arch_install.sh
239247
./pygpsclient_arch_install.sh
240248
```

examples/pygpsclient_debian_install.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/bash
22

3-
# Bash shell script to install PyGPSClient on 64-bit Debian-based
4-
# Linux environments, including Raspberry Pi and Ubuntu.
3+
# Bash shell script to install PyGPSClient on Raspberry Pi OS (Trixie) or any other
4+
# up-to-date 64-bit Debian-based Linux desktop environment.
55
#
66
# Change shebang /bin/bash to /bin/zsh if running from zsh shell.
7-
# NB: NOT for use on Windows or MacOS!
87
#
98
# Remember to run chmod +x pygpsclient_debian_install.sh to make this script executable.
109
#
@@ -22,24 +21,26 @@ echo "Installed Python version is $PYVER"
2221

2322
echo "PyGPSClient will be installed at $HOME/pygpsclient/bin"
2423

25-
echo "Installing dependencies..."
26-
sudo apt install python3-pip python3-tk python3-pil python3-pil.imagetk \
27-
libjpeg-dev zlib1g-dev tk-dev python3-rasterio
24+
echo "Installing dependencies..."\
25+
# uncomment any missing dependencies - not normally necessary with RPi OS Trixie
26+
# sudo apt install python3-pip python3-tk python3-pil python3-pil.imagetk \
27+
# libjpeg-dev zlib1g-dev tk-dev python3-rasterio
2828

2929
echo "Setting user permissions..."
30-
sudo usermod -a -G tty $USER
30+
sudo usermod -a -G dialout $USER
3131

3232
echo "Creating virtual environment..."
3333
cd $HOME
3434
python3 -m venv pygpsclient
3535
source pygpsclient/bin/activate
36-
python3 -m pip install --upgrade pip pygpsclient
36+
python3 -m pip install --upgrade pip pygpsclient rasterio
3737
deactivate
3838

3939
echo "Adding desktop launch icon..."
4040
# the LD_LIBRARY_PATH env setting allows PyGPSClient to find the
4141
# mod_spatialite.so module, which is typically installed in this location
4242
# you can set other env variables in a similar fashion if required
43+
mkdir -p $HOME/.local/share/applications
4344
cat > $HOME/.local/share/applications/pygpsclient.desktop <<EOF
4445
[Desktop Entry]
4546
Type=Application

0 commit comments

Comments
 (0)