15
March
2024
Installing Internet radio "Shortwave" from Flatpak
17:11

Installing Internet radio "Shortwave" from Flatpak

15 March 2024 17:11

Shortwave can be installed to listen to Internet radio stations from the Flatpak app store.

The advantage of Flatpak over Snap is that in some shells it is built-in or easily added to the application menu (KDE Discover). Also, in Ubuntu, it is enough to install the 784 kB gnome-software-plugin-flatpak package, and then Flatpak will appear in the standard gnome-software “Application Center”. In total, flatpak can be installed on 36 distributions, according to https://flatpak.org/setup/. The disadvantage of Flatpak over Snap is that it does not always add icons to the Start menu.

1. Installing the Shortwave program from Flatpak (graphical method)

1.1 Installing the Gnome app store on an Ubuntu Linux-based OS

sudo apt install software-center#no in Ubuntu >= 18.04

sudo apt install gnome-software gnome-software-plugin-flatpak

1.2 Installing Flatpak in the OS

For new OS 20.04 and higher:

sudo apt install flatpak

For older Linux OS - add PPA repository

sudo add-apt-repository ppa:flatpak/stable
sudo apt update
sudo apt install flatpak

1.3 Installing the Flatpak plugin for the app store

sudo apt install gnome-software-plugin-flatpak

1.4 Installing the program using the Application Center

gnome-software

Using the "Shortwave" application as an example:

1.4.1 Search for applications
flatpak1

1.4.2 Entering a package name
flatpak2

1.4.2 Installation
flatpak3
Please pay attention to the "Source" - "Flatpak".

If you get the error message "Can't create temporary directory", you need to run with Administrator rights:

sudo gnome-software

flatpak4

Now the application installs without problems:
flatpak5

The program appears in the Start menu.

2. Install using the command line

2.1 Installing Flatpak

sudo apt install flatpak

2.2 Searching for a program in Flatpak

flatpak search shortwave

Outputs

Имя Описание ID Приложения Версия Ветка Удаленные репозитории
Shortwave Слушайте интернет-радио de.haeckerfelix.Shortwave 3.2.0 stable flathub

2.3 Installing a Flathub repository

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

2.4 Installing the program

flatpak install de.haeckerfelix.Shortwave

2.5 Launching the program

Team:

/usr/bin/flatpak run de.haeckerfelix.Shortwave

If the program does not start, run export before this:

export DISPLAY=:0.0

And add the line to ~/.xinitrc export DISPLAY=:0.0

nano .xinitrc

#!/bin/sh
pulseaudio &
setxkbmap -layout 'us,ru' -option 'grp:alt_shift_toggle,grp_led:scroll' &
export DISPLAY=:0.0
exec startlxqt

Because it often says export DISPLAY=localhost:0.0- wrong.

2.6 Registering a shortcut to launch from the Start menu

Launch shortcuts are located in the /usr/share/applications folder

Create in a folder /usr/share/applications файл: de.haeckerfelix.Shortwave.desktop,
with content:

[Desktop Entry]
Name=Shortwave
Icon=de.haeckerfelix.Shortwave
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=shortwave de.haeckerfelix.Shortwave
Terminal=false
Type=Application
StartupNotify=true
Keywords[ru]=Gradio;Radio;Broadcast;Wave;
Keywords=Gradio;Radio;Stream;Wave;
DBusActivatable=true
X-Purism-FormFactor=Workstation;Mobile;
X-Flatpak=de.haeckerfelix.Shortwave


Related publications