ChirpOnLinux » History » Version 23
Jeffrey Vian, 03/23/2023 07:23 AM
1 | 1 | Dan Smith | # Running CHIRP on Linux |
---|---|---|---|
2 | 18 | Dan Smith | {{>toc}} |
3 | 1 | Dan Smith | |
4 | This page describes how to get the newer python3-based CHIRP-next running on Linux. |
||
5 | |||
6 | 18 | Dan Smith | ## 1. Install distro packages |
7 | 1 | Dan Smith | |
8 | 18 | Dan Smith | ### Debian, Ubuntu, Mint, Raspbian, etc |
9 | 1 | Dan Smith | |
10 | ``` |
||
11 | 22 | Dan Smith | sudo apt install git python3-wxgtk4.0 python3-serial python3-six python3-future python3-requests python3-pip |
12 | 1 | Dan Smith | ``` |
13 | 16 | Jeffrey Vian | |
14 | 18 | Dan Smith | ### **Fedora and compatible** |
15 | 1 | Dan Smith | |
16 | 18 | Dan Smith | This was tested on Fedora 37 with python 3.11. The same procedure should work on all current versions of fedora running python3. |
17 | 16 | Jeffrey Vian | |
18 | 1 | Dan Smith | ``` |
19 | 21 | Jeffrey Vian | sudo dnf install python3-pip python3-wxpython4 python3-pyserial python3-yattag python3-future python3-wheel |
20 | 1 | Dan Smith | ``` |
21 | 16 | Jeffrey Vian | |
22 | 19 | Dan Smith | ## 2. Install CHIRP (and Python dependencies) |
23 | 1 | Dan Smith | |
24 | 18 | Dan Smith | The next steps should work for all versions of Linux using pip, assuming you have the base dependencies from the distro installed above. |
25 | 16 | Jeffrey Vian | |
26 | 21 | Jeffrey Vian | Use `pip` to install chirp as your regular user. |
27 | 18 | Dan Smith | Download the latest `.tar.gz` file then install it with `pip`. For example: |
28 | 1 | Dan Smith | |
29 | 16 | Jeffrey Vian | ``` |
30 | 1 | Dan Smith | pip install chirp-20230322.tar.gz |
31 | 4 | Masen Furer | ``` |
32 | |||
33 | 18 | Dan Smith | Now you can run chirp once from the command line with: |
34 | 16 | Jeffrey Vian | |
35 | ``` |
||
36 | 18 | Dan Smith | python3 -mchirp.wxui |
37 | 16 | Jeffrey Vian | ``` |
38 | 7 | Dan Smith | |
39 | 18 | Dan Smith | The first time chirp is launched it should pop up a prompt to add a `.desktop` file for the current user. Select **yes** if you want to have the icon installed into the application menu (the *activities* menu in gnome) to launch chirp. |
40 | 16 | Jeffrey Vian | |
41 | 18 | Dan Smith | If you want to run chirp from the command line and simply using `chirp` does not work please check your `PATH` to verify it is complete. The command `echo $PATH` should show the `bin` directory where `chirp` is installed. 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. Common locations would be `~/.local/bin` and `/usr/local/bin`. |
42 | 1 | Dan Smith | |
43 | 18 | Dan Smith | Following the steps above (without `sudo`) installs the app as a user level app and it will only be accessible to that user. Using `sudo` for a system-wide installation is deprecated and not recommended on modern distros. |
44 | 10 | Jeffrey Vian | |
45 | Once chirp is properly installed, upgrades to newer versions are done with two simple steps: |
||
46 | |||
47 | 18 | Dan Smith | 1. Download the newer `.tar.gz file`. |
48 | 2. Run `pip install --upgrade chirp-<version>.tar.gz` |
||
49 | 9 | Jeffrey Vian | |
50 | 10 | Jeffrey Vian | |
51 | 18 | Dan Smith | ## 3. Serial port permissions |
52 | 10 | Jeffrey Vian | |
53 | 18 | 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. First determine the USB port of your device, and then the following command should add your user to the proper group: |
54 | 23 | Jeffrey Vian | Note that "ttyUSB0" should be replaced with the actual device that identifies your connection to the radio and that "$USER" is a system variable that identifies the username of the individual running the command. |
55 | 15 | Jeffrey Vian | |
56 | 10 | Jeffrey Vian | ``` |
57 | 18 | Dan Smith | sudo usermod -a -G $(stat -c %G /dev/ttyUSB0) $USER |
58 | 9 | Jeffrey Vian | ``` |
59 | |||
60 | 18 | Dan Smith | If that made a change, you will then need to log out and back in (or maybe even reboot) for it to take effect. |
61 | 11 | Dan Smith | |
62 | 16 | Jeffrey Vian | ### (Optional) Newer `wxPython` |
63 | 9 | Jeffrey Vian | |
64 | 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: |
65 | 1 | Dan Smith | ``` |
66 | 16 | Jeffrey Vian | pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython |
67 | 1 | Dan Smith | ``` |
68 | 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. |