Running Under Linux » History » Revision 25
Revision 24 (Dan Smith, 01/14/2023 04:24 PM) → Revision 25/26 (Tony Fuller, 08/09/2023 03:01 PM)
# Running CHIRP-legacy Under Linux
### <big>**NOTE**: These instructions are for python2-based CHIRP-legacy. You almost certainly want to see [[ChirpOnLinux]] instead.</big>
{{>toc}}
CHIRP's preferred platform is Linux. By far the best way to get CHIRP running is to use one of the binary package repositories provided and maintained by volunteers. If you are running an obscure or old distribution, you may need to install it manually from the source tarball.
## Installing the flatpak
You will need flatpak package support from your distribution. Check https://www.flatpak.org/setup/ for distribution specific instructions.
CHIRP will not automatically update when installed using this method. When you are ready to update CHIRP, you should download a new flatpak and run the `flatpak install` command again.
```
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
Next download the latest flatpak bundle from https://trac.chirp.danplanet.com/chirp_daily/LATEST/
It will probably be saved in your Downloads directory
```
cd ~/Downloads
sudo flatpak install chirp-daily-*.flatpak
```
You may need to log in and log out to see CHIRP in your distribution's applications menu.
If you can't wait to start CHIRP run
```
flatpak run com.danplanet.chirp
```
## Installing the snap
You will need snap package support for your distribution. Check https://snapcraft.io/chirp-snap for distribution specific instructions.
Snaps automatically update when the device is connected to the internet. This is the biggest advantage over the flatpak.
```
sudo snap install chirp-snap --edge
sudo snap connect chirp-snap:raw-usb
```
If you do not see CHIRP under your distribution's applications menu then you can manually create using
```
ln -s /var/lib/snapd/desktop/applications/chirp-snap_chirp-snap.desktop ~/.local/share/applications
```
## Ubuntu package via PPA (20.04 and earlier)
This is super quick and easy if you're running a reasonably new version of Ubuntu. Simply run the following in a terminal:
```
sudo apt-add-repository ppa:dansmith/chirp-snapshots
sudo add-apt-repository ppa:nrbrtx/python2-stuff # Older installations of Ubuntu do not need this (20.04 and earlier)
sudo apt-get update
sudo apt-get install chirp-daily python-future
```
Look for CHIRP under your distribution's applications menu.
## Manual installation from source
If you are here, you are probably running an old or obscure distribution, or you want to run from source for some other reason (such as testing a daily build). Before you start, make sure that the required python modules are installed on your system. Some suggestions on how to do this are:
* Ubuntu/Debian: `apt-get install python-gtk python-serial python-libxml2 python-future`
* Fedora/RedHat: `yum install pyserial pygtk2 libxml2-python python2-futures`
Next, grab the source tarball from the [[Download]] page and save it somewhere like your home directory and then unpack it:
```
tar xzf chirp-0.1.12.tar.gz
cd chirp-0.1.12
```
From here, the easiest thing is to just launch CHIRP directly without installing it onto your system. Don't worry, this works just fine and CHIRP will be fully functional. Simply run the following:
```
./chirpw
```
Once you've tested that it runs on your system, you may want to install it permanently. To do this, run the setup routine by doing:
```
sudo python setup.py install
```
When finished, you should be able to run "chirpw" from anywhere on your system, and (with luck) you'll also have an item in your distribution's applications menu.
## serial port permissions
Note that you may need to adjust permissions on the /dev/tty(something) device, or add your users who want to use CHIRP to the "dialout" group in order to let non-privileged users access the serial device.
This issue is often indicated by an "access denied" error when accessing serial port.
On most Linux distros this is accomplished with:
```
sudo addgroup "$USERNAME" dialout
```
For other distributions, such as Manjaro, you may need to add your user to the `uucp` group.
You will then need to log out and back in for it to take effect.