Project

General

Profile

ChirpOnLinux » History » Version 11

Dan Smith, 03/20/2023 04:04 PM

1 1 Dan Smith
# Running CHIRP on Linux
2
3
This page describes how to get the newer python3-based CHIRP-next running on Linux.
4
5
## Debian, Ubuntu, Mint, Raspbian, etc
6
7
Install prerequisite packages:
8
9
```
10
$ sudo apt install git python3-wxgtk4.0 python3-serial python3-six python3-future python3-requests python3-pip
11
```
12
13
You should be able to install either the wheel or the tarball using `pip`:
14
15
```
16
$ pip3 install chirp-next-20230114.tar.gz
17
```
18
> **_NOTE:_**  Your system may install `pip` as `pip3` like above, or just `pip`
19
20
If you run the above command as a regular user, the `chirp` executable will be installed into `~/.local/bin/chirp`. If you run it as root, then it will be in `/usr/local/bin/chirp` as you might normally expect.
21 2 Dan Smith
22 4 Masen Furer
### Create a desktop (menu) entry
23
24 6 Masen Furer
A desktop entry can be placed in `/usr/share/applications/chirp.desktop` to have a menu entry added. Or it can be placed on the desktop itself to add an icon.
25 4 Masen Furer
26 6 Masen Furer
See the template desktop entry distributed with chirp: https://github.com/kk7ds/chirp/blob/master/chirp/share/chirp.desktop
27 4 Masen Furer
28 6 Masen Furer
If you have installed chirp for your user only, then update the paths for your home directory: `~/.local/share/applications/chirp.desktop`
29 4 Masen Furer
30
```
31
[Desktop Entry]
32
Name=CHiRP-next (user install)
33
Comment=Program radios using CHiRP
34
Keywords=ham radio
35
Exec=.local/bin/chirp
36
Icon=.local/lib/python3.9/site-packages/chirp/share/chirp.ico
37
Terminal=false
38
StartupNotify=true
39
Type=Application
40
Categories=HamRadio
41
```
42
43
### (Optional) Newer `wxPython`
44
45
You may want to install a newer wxPython, depending on what your distro ships. For Debian-derived distros (including Ubuntu and Mint) you can do that with a command like:
46 2 Dan Smith
```
47
pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
48
```
49 3 Dan Smith
Check the [directory listing](https://extras.wxpython.org/wxPython4/extras/linux/gtk3/) for other distro versions and use the closest match to what you're on. **NOTE** that this will not work for non-x86_64 machines (like the Raspberry Pi) as there are no binary builds for those platforms.
50 5 Masen Furer
51 7 Dan Smith
## Python 3.11 issues
52
53
Right now (as of 9-March-2023), testing and released builds are based on <=3.10. If you want to run chirp on a distro with 3.11 you'll likely have to do some work on your own.
54
55
For issues with `attrdict` see [this github issue](https://github.com/wxWidgets/Phoenix/issues/2296).
56
57 5 Masen Furer
## Serial port permissions
58
59 8 Dan Smith
Note that you may need to add your users who want to use CHIRP to the group that owns the serial ports. This issue is often indicated by an "access denied" error when accessing serial port. Determine the group ownership of your serial port like this (assuming `ttyUSB0`):
60 1 Dan Smith
61 8 Dan Smith
```
62
$ stat -c %G /dev/ttyUSB0
63
dialout
64
```
65 1 Dan Smith
66 8 Dan Smith
Now you need to add your user to that group. On most Linux distros this is accomplished with:
67 1 Dan Smith
68 5 Masen Furer
```
69 8 Dan Smith
sudo usermod -a -G dialout $USER
70 5 Masen Furer
```
71
72 8 Dan Smith
Be sure to use whatever group the above `stat` command reported.
73 5 Masen Furer
74
You will then need to log out and back in for it to take effect.
75 9 Jeffrey Vian
76 10 Jeffrey Vian
## **Installation on Fedora 37 running Python 3.11**
77 11 Dan Smith
This was performed and tested on a clean installation of Fedora 37 that was fully updated before installing chirp.
78 9 Jeffrey Vian
79 1 Dan Smith
First install certain system level packages
80
81 10 Jeffrey Vian
```
82
sudo dnf install python3-pip python3-devel gtk3-devel
83
```
84 1 Dan Smith
85
Now use pip to install the following packages as your regular user.
86 9 Jeffrey Vian
87 10 Jeffrey Vian
```
88
pip install wheel attrdict3
89
pip install wxpython
90
```
91 9 Jeffrey Vian
92 11 Dan Smith
The installation of wxpython may take some time to complete so be patient while it is running. Once the steps above have completed download and use pip to install the packages from the download site.
93 1 Dan Smith
94 11 Dan Smith
Download the .tar.gz file then install it with `pip`. For example:
95 10 Jeffrey Vian
96
```
97
pip install chirp-20230219.tar.gz
98
```
99
100 1 Dan Smith
When this is complete you can test the operation.
101 9 Jeffrey Vian
102 1 Dan Smith
First make certain that your user is a member of the dialout group with the command `groups`.
103 10 Jeffrey Vian
If necessary add your user to the dialout group with 
104
105
```
106
sudo usermod -aG dialout $USER
107
``` 
108
as noted above.  To have that take effect you must log out then back in.
109 1 Dan Smith
Again verify with the `groups` command.
110
111 10 Jeffrey Vian
Now you can test it from the command line with 
112
```
113
chirp
114
```
115
The executable is installed in ~/.local/bin
116
117 1 Dan Smith
when this works you can add the desktop file with 
118 10 Jeffrey Vian
```
119
$ cp .local/lib/python3.11/site-packages/chirp/share/chirp.desktop .local/share/applications/
120
```
121
which gives you the icon on the activities menu to launch chirp.
122 9 Jeffrey Vian
You might choose to edit the desktop file in .local/share/applications and change the path to the icon to read 
123
124 10 Jeffrey Vian
```
125
/home/<username>/.local/lib/python3.11/site-packages/chirp/share/chirp.ico
126
```
127
so it properly shows the chirp icon image.
128 1 Dan Smith
129
If the command `chirp` does not work please check your path to verify it is complete as mine is. The command `echo $PATH` should show `/home/<username>/.local/bin:` at the beginning.  If not that can be fixed by editing the ~/.bashrc or ~/.bash_profile to add that to the existing $PATH.  If the path is configured properly then the desktop file should be able to launch chirp for your user.
130 10 Jeffrey Vian
131 1 Dan Smith
Note that the device used as the comm port may be either /dev/ttyUSB0 or /dev/ttyACM0 so the user might need to verify which port is available.  Chirp does not seem to automatically detect the /dev/ttyACM0 device so the user may need to use the 'custom' device and enter it manually.
132 9 Jeffrey Vian
133
Following the steps above installs the app as a user level app and it will only be accessible to that user.
134
135 11 Dan Smith
Once installed upgrades to newer versions are done simply:
136
137 9 Jeffrey Vian
1. download the newer .tar.gz file.
138 11 Dan Smith
1. `pip install --upgrade chirp-<version>.tar.gz`