ChirpOnLinux » History » Version 17
Jeffrey Vian, 03/22/2023 12:09 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 | 16 | Jeffrey Vian | ## **Fedora and compatible** |
14 | 1 | Dan Smith | |
15 | 16 | Jeffrey Vian | This was tested on Fedora 37 with python 3.11. |
16 | The same procedure should work on all current versions of fedora running python3. |
||
17 | |||
18 | Install prerequisite packages: |
||
19 | |||
20 | 1 | Dan Smith | ``` |
21 | 16 | Jeffrey Vian | sudo dnf install python3-pip python3-wxpython4 |
22 | 1 | Dan Smith | ``` |
23 | |||
24 | 16 | Jeffrey Vian | ## The next steps should work for all versions of linux using pip. |
25 | 1 | Dan Smith | |
26 | 16 | Jeffrey Vian | Use pip to install the following packages as your regular user. |
27 | 4 | Masen Furer | |
28 | 16 | Jeffrey Vian | ``` |
29 | pip install wheel attrdict3 |
||
30 | ``` |
||
31 | 1 | Dan Smith | |
32 | 16 | Jeffrey Vian | Download the latest .tar.gz file then install it with `pip`. For example: |
33 | 1 | Dan Smith | |
34 | ``` |
||
35 | 16 | Jeffrey Vian | pip install chirp-20230322.tar.gz |
36 | 1 | Dan Smith | ``` |
37 | 4 | Masen Furer | |
38 | 16 | Jeffrey Vian | Now you can test it from the command line with |
39 | 4 | Masen Furer | |
40 | ``` |
||
41 | 16 | Jeffrey Vian | chirp |
42 | 4 | Masen Furer | ``` |
43 | 16 | Jeffrey Vian | If that does not work try |
44 | ``` |
||
45 | ~/.local/bin/chirp |
||
46 | ``` |
||
47 | The executable is installed as ~/.local/bin/chirp (or as /usr/local/bin/chirp if sudo was used to do the install). |
||
48 | 17 | Jeffrey Vian | |
49 | The first time chirp is launched from the command line it should pop up a prompt to add the .desktop file. |
||
50 | 16 | Jeffrey Vian | Select "yes" if you want to have the icon on the activities menu to launch chirp. |
51 | 7 | Dan Smith | |
52 | 16 | Jeffrey Vian | If the command "chirp" does not work please check your path to verify it is complete. The command "echo $PATH" should show "`/home/<username>/.local/bin:`" at the beginning. If not that can be fixed by editing ~/.bashrc or ~/.bash_profile to add that to the existing $PATH. If the path is configured properly then chirp should be able to launch with the "chirp" command. |
53 | 1 | Dan Smith | |
54 | 16 | Jeffrey Vian | 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 port so the user may need to select the 'custom' port and enter it manually. |
55 | 10 | Jeffrey Vian | |
56 | 16 | Jeffrey Vian | Following the steps above (without sudo) installs the app as a user level app and it will only be accessible to that user. |
57 | 1 | Dan Smith | |
58 | 16 | Jeffrey Vian | Once chirp is properly installed, upgrades to newer versions are done with two simple steps: |
59 | |||
60 | 1. download the newer .tar.gz file. |
||
61 | 2. `pip install --upgrade chirp-<version>.tar.gz` |
||
62 | |||
63 | |||
64 | 1 | Dan Smith | ## Serial port permissions |
65 | 10 | Jeffrey Vian | |
66 | 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`): |
||
67 | |||
68 | ``` |
||
69 | 9 | Jeffrey Vian | $ stat -c %G /dev/ttyUSB0 |
70 | 1 | Dan Smith | dialout |
71 | 9 | Jeffrey Vian | ``` |
72 | 10 | Jeffrey Vian | |
73 | Now you need to add your user to that group. On most Linux distros this is accomplished with: |
||
74 | |||
75 | 1 | Dan Smith | ``` |
76 | 15 | Jeffrey Vian | sudo usermod -a -G dialout $USER |
77 | 10 | Jeffrey Vian | ``` |
78 | 15 | Jeffrey Vian | |
79 | 9 | Jeffrey Vian | Be sure to use whatever group the above `stat` command reported. |
80 | |||
81 | 16 | Jeffrey Vian | You will then need to log out and back in (or maybe even reboot) for it to take effect. |
82 | 11 | Dan Smith | |
83 | 16 | Jeffrey Vian | ### (Optional) Newer `wxPython` |
84 | 9 | Jeffrey Vian | |
85 | 16 | Jeffrey Vian | 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: |
86 | 1 | Dan Smith | ``` |
87 | 16 | Jeffrey Vian | pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython |
88 | 1 | Dan Smith | ``` |
89 | 16 | Jeffrey Vian | 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. |