Planet KDE logo

Welcome to Planet KDE

This is a feed aggregator that collects what the contributors to the KDE community are writing on their respective blogs
To have your blog added to this aggregator, please read the instructions

With Wake-on-LAN (WoL) it can be slightly easier to manage machines in-house. You can fire up the workstation and start the day’s compile jobs (to catch up with overnight work by the KDE community, say) while drinking an espresso downstairs and doomscrolling.

Wake-on-LAN relies on three things:

  • When a workstation is off, it is “off” in name only. Many machines still draw 5W or more power when “off”, which is enough to drive an entire Pine64 board. That power allows, among other things, the network chip to monitor the LAN.
  • The LAN can carry specially-crafted “wake” frames, which fit in the Ethernet protocol.
  • The network chip and workstation BIOS cooperate to react to those special frames.

The Wikipedia article on WoL is extensive. From a practical in-house perspective, FreeBSD gives you the tools to use WoL if you have a FreeBSD machine next to (or built-in to) the espresso machine. My notes here assume a simple one-network in-home LAN.

Wake up, little server

If all the administrative bits are in place, then the simple way to wake up a machine is wake <hostname>. This requires root, since it sends specially-crafted (broadcast) Ethernet packets, which isn’t something that regular users can do.

If only some of the administrative bits are in place, then wake <mac-address> will do the trick.

The administrative bits

To wake up a machine, you need to know the MAC-address (of a network chip in that machine, that supports WoL).

  • If the machine is on, and you can login on it: ifconfig will tell you. Look for the ether line in the output, like this one, and also the WOL_MAGIC option:
    re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
          options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
          ether 22:ff:55:66:00:cc
    

    Linuxes which don’t ship ifconfig can use ip link list in the same way.

  • If the machine is on and on the network, arp -a elsewhere in the network will tell you what is on the network and what MAC-addresses there are. Hopefully you can pick the right machine out of that.
    wakeme.example.com (10.0.1.67) at 22:ff:55:66:00:cc on re0 expires in 72 seconds [ethernet]
    
  • If the machine is on, or has been on, and does DHCP, the /var/db/dhcpd.leases file on the DHCP server contains entries for the DHCP leases, and you can look for the MAC-address and identifying host information there (some lines stripped out in the middle here).
    lease 10.0.1.67 {
          hardware ethernet 22:ff:55:66:00:cc;
          client-hostname "wakeme";
    }
    

Armed with the knowledge of the MAC-address of the machine to wake up, wake can do its thing, but if you are not into remembering MAC-addresses, then the file /etc/ethers provides a persistent database of MAC-to-hostname mappings; adding a line in that file puts all the administrative bits in place:

22:ff:55:66:00:cc wakeme

Fancy

The end-game is, clearly, to have Mycroft running on something near the espresso machine, so you can shout “hey, Mycroft, wake the workstation” and we can wake up in parallel.

Pages from the manual: wake ethers(5)

Monday

23 November, 2020

The third and last minor release of the 20.08 series is out with the usual round of fixes and improvements. Focus is now set on finishing the same track transitions and the subtitler features for the next major release due in December. Please help test the Beta release and report any issues.

 

  • Fix on monitor displayed fps with high fps values. Commit.
  • Ensure timeline ruler is correctly updated on profile switch. Commit.
  • When switching project profile and there is only 1 clip in timeline, update the timeline clip duration accordingly to profile change. Commit.
  • When switching project profile and there is only 1 clip in timeline, update the timeline clip duration accordingly to profile change. Commit.
  • Project archiving: check after each file if archiving works, add option to use zip instead of tar.gz. Commit. See bug #421565
  • Fix opening project files with missing version number. Commit. See bug #420494
  • Fix duplicated audio from previous commit. Commit.
  • Fix playlist clips have no audio regression. Commit.
  • Fix keyframeable effect params left enabled when selecting a clip, leading to possible crash. Commit.
  • Don’t allow removing the only keyframe in an effect (was possible from the on monitor toolbar and crashing). Commit.
  • Fix crash inserting zone over grouped clips in same track. Commit.
  • Fix previous commit. Commit.
  • Check ffmpeg setting points to a file, not just isn’t empty. Commit.
  • Qtcrop effect: make radius animated. Commit.
  • Render widget: avoid misuse of parallel processing. Commit.
  • Fix resizing clip loses focus if mouse cursor did not get outside of clip boundaries. Commit.
  • Fix rounding error sometimes hiding last keyframe in effectstack. Commit.

Sunday

22 November, 2020

Human perception has never ceased to amaze me, and in the context of this article, it is the perception of value, and the value of contribution that I want us to think about.

Photo by Andrea Piacquadio from Pexels

It is yours in title, deed and asset

A common miss perception with Open Source software is the notion of free. Many people associate free in its simplest form, that of no monetary cost, and unfortunately this ultimately leads to the second conclusion of ‘cheap’ and low quality. Proprietary commercial vendors, and their corporate marketing departments know this and use that knowledge to focus their audience on ‘perceived value’. In some ways free of cost in the open source software world is a significant disadvantage, because it means there are no funds available to pay for a marketing machine to generate ‘perceived value’.

Think, for a moment, how much of a disadvantage that is when trying to develop a customer/user base.

Kubuntu is completely and whole contributon driven. It is forged from passion and enthusiasm, built with joy and above all love. Throughout our community; users use it because they love it, supporters help users, and each other, maintainers fix issues and package improvements, developers extend functionality and add features, bloggers write articles and documentation, youtubers make videos and tutorials. All these people do this because they love what they’re doing and it brings them joy doing it.

Photo by Tima Miroshnichenko from Pexels

Today Linux is cloud native, ubiquitous and dominates wholesale in the internet space, it is both general purpose, and highly specialised, robust and extensive, yet focused and detailed.

Kubuntu is a general purpose operating system designed and developed by our community to be practical and intuitive to a wide audience. It is simple and non-intrusive to install, everyday it continues to grow a larger user base of people who download it, install it and for some, love it! Further more, some of those users will find their way into our community, they will see the contributions given so freely by others and be inspired to contribute themselves.

Image from Wikipedia

Anyone who has installed Windows 10 recently, will atest to the extent of personal information that Microsoft asks users of its operating system to ‘contribute’. This enables the Microsoft marketing teams to further refine their messaging to resonate with your personal ‘perceived value‘ and indeed to enable that across the Microsoft portfolio of ‘partners‘!
The story is identical with Apple, the recently announced Silicon M1 seeks, not only to lock Apple users into the Apple software ecosystem and their ‘partners‘ but also to lock down and isolate the software to the hardware.

With this background understanding, we are able to return full circle to the subject of this article ‘Kubuntu is not Free, it is Free‘ and further more Kubuntu users are free.
Free from intrusion, profiling, targeting, and marketing; Kubuntu user are free to share, modify and improve their beloved software however they choose.

Photo by RF._.studio from Pexels


Let us revisit that last sentence and add some clarity. Kubuntu users are free to share and improve ‘their’ beloved software however they choose.
The critical word here is ‘their’, and that is because Kubuntu is YOUR software, not Microsoft, Apple, and not even Canonical or Ubuntu’s. It is yours in title, deed and asset and that is the value that the
GNU GPL license bequithes to you.

This ownership also empowers you, and indeed puts you as an individual in a greater place of power than the marketeers from Microsoft or Apple. You can share, distribute, promote, highlight or low-light, Kubuntu wherever, and whenever you like. Blog about it, make YouTube videos about it, share it, change it, give it away and even sell it.

How about the for perceived value ?

About the Author:

Rick Timmis is a Kubuntu Councillor, and advocate. Rick has been a user and open contributor to Kubuntu for over 10 years, and a KDE user and contributor for 20

Glad to announce the release of KStars v3.5.0 for Windows, MacOS, and Linux. This release marks a significant milestone for KStars with the integration of StellarSolver, the Cross Platform Sextractor and Astrometry.net-Based Internal Astrometric Solver.

Check out the Change log for more details.

StellarSolver

Robert Lancaster spent a significant portion of 2020 developing and refining this amazing library. Here is an excerpt from StellarSolver Github on the motivations behnd its development:

Astrometry.net is a fantastic astrometric plate solver, but it is command line only and has many dependencies such as python, netpbm, libjpeg, cfitsio, and many other things. It is fairly easy to install on Linux and works incredibly well in that environment. With the correct recipes in homebrew, craft, macports, or other package managers, it can be installed and run from the command line on Mac OS X as well. On Windows, however, it must be run within a compatibility layer such as Microsoft Subsystem for Linux, Cygwin, or Ansvr. None of these things will stop the program from running, but it does make it more difficult to set up and use and all of the files and dependencies and configuration files must be setup properly in order to get it to work.


StellarSolver major features:
  • An Astrometric Plate Solver for Mac, Linux, and Windows, built on Astrometry.net and SEP (sextractor)
  • Meant to be an internal library for use in a program like KStars for internal plate solving on all supported operating systems
  • Python is not required for the library.
  • Netpbm is not required for the library.
  • Internal Library, so calls to external programs are not required.
  • No Astrometry.cfg file is needed, the settings are internal to the program
  • Directly loads the image data into SEP and then takes the generated xy-list internally from Sextractor into astrometry.net, so there is no need to save any files.
  • No temporary files need to be created for solving and no WCS file needs to be created to read the solved information. Although astrometry.net does monitor for the creation of 2 files indicating that a field is solved or a cancel was made, so these are created for now.
  • The Index Files are still required for solving images, but the program or the user can specify the folder locations rather than putting them in the config file.

It took significant re-tooling inside KStars to integrate StellarSolver, but right now we are confident in the benefits in will bring to all our users. For the first time since Ekos was developed back in 2012, KStars does not require any external applications to perform any of its astrophotography related tasks. The solver is completely built-in and supported on all platforms equally. Windows users would be glad to learn they do not have to download and install extra programs to get the astrometry functionality to work.


But StellarSolver is not only limited to astrometry, its major function in Ekos is actually for star detection. Therefore, it is now used in Capture, Guide, and Focus modules as well. Future versions should pave the way to perform photometric calculations right within FITS Viewer.

FITS Viewer

While the name remains as FITS viewer, we also added support to load JPG/PNG and RAW files from DSLR cameras. Granted, not all the features of a FITS file is going to be available, but this feature has long been requested by users and now we finally have it baked in!


Analyze Module

Hy Murveit introduced a new Ekos module to help analyze the imaging session in details. It records and displays what happened in an imaging session. That is, it does not control any if your imaging, but rather reviews what occurred.


Sessions are stored in an analyze folder, a sister folder to the main logging folder. The .analyze files written there can be loaded into the Analyze tab to be viewed. Analyze also can display data from the current imaging session.The Analyze Module records and displays what happened in an imaging session. That is, it does not control any if your imaging, but rather reviews what occurred. Sessions are stored in an analyze folder, a sister folder to the main logging folder. The .analyze files written there can be loaded into the Analyze tab to be viewed. Analyze also can display data from the current imaging session.

Testing Framework

This release culminates 3 months of continued incremental improvements to KStars testing framework spearheaded by Eric Dejouhanet. These tests cover both Unitary tests and User Interface tests. While we are still far away from covering sufficient tests for all KStars uses, it paves the way to Test Driver development approach in which tests are created to illustrate the issue and then fixes.

MR #114 by Wolfgang Reissenberger perfectly highlights Test Driven development and we hope to follow this model in upcoming releases.

Saturday

21 November, 2020

Calindori 1.3, the calendar application for mobile and convergent desktop, is now available. In this release, user interface refinements, fixes and under-the-hood changes can be found.

New features and improvements

First, Calindori now makes use of the Solid wake-up features, when running on Plasma 5.20 or later. In specific, since version 5.20, Plasma has been offering a way that enables applications to inform Power Devil to wake them up at a time specified in the future. When this feature is used, applications facilitate the system to save power, by letting the system to be kept in deep sleep.

Calindori on Desktop Calindori on desktop

In addition, in Calindori 1.3, several rough edges have been smoothed out as well as user interface features have been added. For example, in “All Tasks”, you can opt to display or hide the completed tasks, while on desktop, when a high resolution monitor is available, the month page is properly scaled. Moreover, when executing the application on a wide screen, the size of the global drawer has been reduced. This way we let the user focus on the main (calendar) page, without being distracted by the size of the side panel. Furthermore, the positioning of the confirmation dialog prompted when users try to delete an incidence has been fixed. Repeating and multi-day events are now properly displayed in the day and week views.

All tasks All tasks on mobile

Finally, support for external calendars has been added. In specific, external calendar files can be “attached” to Calindori and, whenever a file is modified by an external app, that change is shown in Calindori. So, users can now use a calendar that has been created by a different application. For example, if you have set-up calendar file synchronization with vdirsyncer, navigate to Calendar Management > External and add a calendar that’s also used by other devices.

Installation

Calindori is available on KDE Neon for Plasma Mobile, Manjaro and postmartketOS. You can also test the latest build of Calindori by using the flaptpak nightlies kdeapps repository for ARM and x84_64. Users can also build it from source on any Linux distribution. The source code and signatures can be downloaded from download.kde.org.

Feedback

Feel free to provide your feedback and follow the discussion about its development on the matrix channel of Plasma Mobile. Bugs can be reported in the bug tracker of KDE while design and development feedback can be added to gitlab issues.

Or: how what was supposed to be just a simple string parsing task escalated into computing planetary movements.

Opening Hours

While working on the train station maps for KDE Itinerary I came across OSM’s opening_hours tags on restaurants/shops/amenities/etc. Those contain a description for which time intervals a given thing is available/open, in a machine-readable format. Being able to evaluate this would be nice, as KDE Itinerary knows the time you are going to be at a train station, so we can make the map more useful by focusing on elements that are actually available while you are there.

OSM’s format is extensively documented, and also used by other systems that we use already (such as OpenTripPlanner) or that might become relevant for us in the future (such as ParkAPI). Another place where we encounter a similar (but simpler) format is schema.org annotations in websites that Plasma Browser Integration evaluates.

So, obviously we need this in a library we can use in all those cases.

Details

Let’s look at a few examples of what OSM’s opening hours expressions can do, starting with the simple (and by far most common) case:

Mo-Fr 10:00-18:00; Sa 12:00-16:00

Localization aside this is still largely human-readable, and easy to evaluate with a bit of string parsing and QDateTime math.

Another common case is this slight variation:

Mo-Fr 09:00-15:00; PH off

PH stands for public holiday. That might look like a minor addition, but it moves from a bit of off-the-shelf date/time math to knowing the public holidays at the location this expression applies to. Luckily there’s a framework for that already, KF5::Holidays. We now however also have to track additional context information for the expression, as they evaluate differently in different places.

Looking at the more rarely used features, there’s means to select the n-th weekday in a month for example (Nov Tue[-1] - last Tuesday in November), or periodicity on weeks (week1-53/2 - any odd week), and many more such cases to express complex conditions. If this reminds of the recurrence handling in iCal/KF5::CalendarCore, it is very much like this.

To top it off, and to get to astronomical body movements, there’s also selectors for sunrise or twilight events. Those are computed based on the angular sun position at a given geographic coordinate at which the opening hours expression is evaluated. KF5::Holidays fortunately had most of this already, the missing bits have been added as part of this work.

So overall another nice reminder of what we all know to be the answer to “How hard can it be?” ;-)

Limits

Most of the above is implemented, some of the more rare details are still missing but at least can be added when needed. There’s more however, namely the SH (school holiday) selector. We currently have no comprehensive and world-wide collection of school holiday data to implement this. Therefore expression containing this feature will raise an error.

Show me the code!

The code consists of a C++ library, QML bindings and a small QML demo application and can be found here.

Screenshot of the KOpeningHours demo application showing parsing and evaluation of an OSM opening hours expression visualized in an interval table.
KOpeningHours demo application showing parsing and evaluation of an OSM opening hours expression.

To build and use this you also needs the very latest KF5::Holidays, all necessary extensions and improvements of that should be part of the upcoming KF 5.77 release though.

First of all, those of you who were upset by the change to move Dolphin’s Breadcrumbs bar/URL navigator into the toolbar should be happy to hear that we’ve made it optional–you can remove it from the toolbar and it will return to its former location. Furthermore, the change will only take effect for new installs and user accounts, not for existing users who have already customized Dolphin. Hopefully this should resolve all the complaints people had with it! 🙂 This change was made by Felix Ernst and will be included in Dolphin 20.12.

Aaaaand there’s plenty more too, including some juicy Wayland fixes:

New Features

When Ctrl+clicking on a file in Konsole to open that file in an external app, Konsole now supports file paths with line numbers at the end; this means that, for example, you can Ctrl-click on the text thumbnailitem.cpp:44 to open that file in your text editor right at line 44! This requires that your text editor supports this of course, but Kate does. 🙂 (Ahmad Samir, Konsole 21.04)

The Plasma Media Controller applet now features shuffle and loop controls (Mikel Johnson, Plasma 5.21)

Bugfixes & Performance Improvements

In the Plasma Wayland session, Spectacle’s Rectangular Region mode now works, and screenshots taken on high DPI systems are now taken at the full correct resolution! (Méven Car, Spectacle 20.12)

Okular no longer sometimes crashes when opening a document while using certain screen arrangements and Qt 5.13 or earlier (David Hurka, Okular 20.12)

After starting Elisa, the first song you start playing no longer starts playing in the middle if a different song was in the middle of playback the last time Elisa was quit (Matthieu Gallien, Elisa 20.12)

Fixed a case where Elisa could crash during playback (Matthieu Gallien, Elisa 20.12)

Elisa’s album view no longer has gaps around the edges that allow the parent view to show through (me: Nate Graham, Elisa 20.12)

Dolphin once again displays custom icons which are not from the current icon theme (Méven Car, Dolphin 20.12)

When using the old Synaptics touchpad drivers with inertia activated, Scrolling in Konsole and then holding the Ctrl key while the inertial scrolling is still decelerating no longer causes the view to get resized (Carlos Alves and René J.V. Bertin, Konsole 21.04)

Various apps in the Plasma Wayland Session no longer crash when you try to view font-related things (Andrey Butirsky, Plasma 5.20.4)

Double-clicking on a user in the new System Settings Users page, or clicking on one user after another, no longer causes the view to stack up with multiple user pages (Carson Black, Plasma 5.20.4)

System Settings’ Touchpad page no longer has a broken layout for the right-click/middle-click options some of the time when you open it (David Edmundson, Plasma 5.20.4)

Discover no longer has a stuck process secretly running in the background after you quit it, removing one of the sources of slow shutdowns/logouts (Aleix Pol Gonzalez in Plasma 5.21 or Richard Hughes in the next version of the fwupd library, whichever comes first)

Switching to Picture of the Day on the System Settings’ Screen Locking appearance page now always works (David Redondo, Plasma 5.20.4)

The visual representation of window borders in the System Settings Window Decorations page is now always accurate (Ismael Asensio, Plasma 5.20.4)

Dragging in the spinbox used to determine panel height now always resizes the panel in the direction of the drag even if the panel is on a top or right screen edge (me: Nate Graham, Plasma 5.20.4)

The Magic Lamp minimize effect now works properly when minimizing a window into a task manager located on a Panel or Latte Dock that is offset from the screen edge by a few pixels (Xinbo Wang, Plasma 5.20.4)

Opening a System Settings page from Kickoff or KRunner now shows the category sidebar if needed when using Icon View (David Redondo, Plasma 5.20.4)

After applying a Global Theme, the currently-used widget style is once again visually selected in System Settings’ Application Style page (David Redondo, Plasma 5.20.4)

Full-screen windows on multi-monitor setups are now restored to the correct monitor when one of them is unplugged/turned off and then plugged back in again/turned back on (Chaojiang Luo, Plasma 5.21)

In the System Settings Window Decorations page, labels no longer sometimes overlap with buttons in the section where you can choose your own arrangement for titlebar buttons (me: Nate Graham, Plasma 5.21)

KWin no longer sets a left touch screen edge by default, which means there is no longer a 1-pixel dead zone on the left edge that eats mouse clicks and scroll events (me: Nate Graham, Plasma 5.21)

Fixed a case where renaming and then immediately deleting a file could cause it to persist in the Baloo file indexer’s index (Stefan Brüns, Frameworks 5.77)

Text in various layouts through System Settings, Discover, and other apps is once again aligned correctly to the nearby controls (Carl Schwan, Frameworks 5.77)

“Often Used”/”Recently Used” views in various places in Plasma (e.g. Kickoff’s tabs by the same names) now display the correct sets of files (Ivan Čukić, Frameworks 5.77)

In the Plasma Wayland session, some scrollviews in Plasma and QML-based software like System Settings no longer scroll in the wrong direction (David Edmundson, Qt 5.15.2)

User Interface Improvements

Improved flick-based touch scrolling behavior in Okular (David Hurka, Okular 20.12)

Dolphin’s currently somewhat overwhelming context menu no longer shows the paste action when right-clicking on a file; only when right-clicking on a folder or the view background (Méven Car, Dolphin 20.12)

Dolphin’s “Create New Folder” action now uses the standard systemwide shortcut (F10) so if you change the shortcut systemwide, Dolphin respects that (Domenico Panella, Dolphin 21.04

System Settings’ Activities and Automount pages now support the “Highlight changed settings” feature (Cyril Rossi, Plasma 5.21)

The blur feature used throughout Plasma and various KDE apps (optionally) is now blurrier by default (Niccolò Venerandi, Plasma 5.21):

Text fields in KDE apps now have the same thick focus ring used for Plasma text fields (Carson Black, Plasma 5.21):

The Audio settings accessible from the System Tray applet no longer has two vertical scrollbars when the content doesn’t entirely fit (David Redondo, Plasma 5.21)

Times throughout KDE use more relative times (e.g. “15 minutes ago”) instead of the raw times (Méven Car, Frameworks 5.77)

The Kup backup system’s System Tray icon is now monochrome, like others (me: Nate Graham, Frameworks 5.77):

How You Can Help

Have a look at https://community.kde.org/Get_Involved to discover ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Finally, consider making a tax-deductible donation to the KDE e.V. foundation.

We are happy to announce the release of Qt Creator 4.14 Beta2 !

Friday

20 November, 2020

We are happy to announce the release of Qt Creator 4.13.3 !

Introduction

AppImages are the focus of our Linux distribution. We already include several AppImage-related tools that improve their user experience in our distribution, from desktop integration to sandboxing and management. Also, we include one conversely important AppImage by default, Wine (see Using Wine in Nitrux).

In today’s tutorial, we will make an AppImage file using a tool called appimage-builder. appimage-builder makes it very easy to create AppImages of your favorite applications. appimage-builder works by using files called recipes; these are simple text files in the YML format that contain the information from which appimage-builder will make our AppImage.

One of the main features of appimage-builder is building an AppImage from existing, pre-compiled traditional packages like Debian packages, RPM packages, etc. Currently, only Debian packages are supported; however, more package managers will be supported in the future, such as Pacman.

appimage-builder is developed by Alexis Lopez Zubieta, a former Nitrux developer and an AppImage collaborator.


Getting started

To make our AppImage for this tutorial, we will only need Docker. We won’t be compiling anything at all (of course, if you want to compile the program instead, you can go ahead and do that. I’d still recommend that you use a container, though). We will be using Docker to keep our root filesystem free of build and package dependencies (libraries, development libraries, headers, and what not). This will ensure that our builds can be reproducible every time (see Continous Integration) without braking or bloating our installation.

Since Docker is already installed in Nitrux, there’s no need to use the package manager. Please note that the Docker daemon is not started by default, but it’s pretty easy to start it, open Station, and run the following commands.

sudo cgroupfs-mount
sudo dockerd &

For this tutorial, we will make an AppImage of mpv the default multimedia player in Nitrux; for reference, mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.

Now that the daemon is started, we will be using the Docker container provided by the appimage-builder documentation. To create the container, run the following commands.

sudo docker pull appimagecrafters/appimage-builder:latest
sudo docker run --name appimage -it appimagecrafters/appimage-builder /bin/bash

Now that we’re in the container (which uses Ubuntu 18.04.5), we will create our working directory to put the recipe and the contents of the AppDir. For the sake of simplicity, I will create my structure as /builder/mpv/.

mkdir -p /builder/mpv/
cd /builder/mpv/
  • Please note that my directory structure is not mandatory; you can use your own conventions.

And we also need a text editor to use in the container; I will use nano.

Making a recipe

For appimage-builder to create our AppImage, we will need to provide a recipe. Using your de facto text editor, we can use one of the documentation examples as a template; here’s my version.

  • Although the recipe is self-explanatory, please refer to the appimage-builder documentation to know more about what each section does.
version: 1

script: []

AppDir:
  path: ./AppDir

  app_info:
    id: mpv
    name: mpv
    icon: mpv
    version: 0.32.0-1ubuntu1
    exec: usr/bin/mpv

  apt:
    arch: amd64
    sources:
      - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse'
      - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse'
      - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse'
        key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
    
    include:
      - mpv
      - libdc1394-22
      - libwbclient0

    exclude:
      - adwaita-icon-theme
      - appmenu-gtk-module-common
      - appmenu-gtk2-module
      - appmenu-gtk3-module
      - baloo-kf5
      - bolt
      - breeze
      - breeze-cursor-theme
      - breeze-icon-theme
      - bubblewrap
      - cpp
      - cpp-9
      - dconf-cli
      - dconf-gsettings-backend
      - dconf-service
      - dirmngr
      - dmidecode
      - drkonqi
      - e2fsprogs
      - fdisk
      - fuse
      - gamin
      - gcc-10-base
      - gcc-9-base
      - gdb
      - gdisk
      - gir1.2-atk-1.0
      - gir1.2-freedesktop
      - gir1.2-gdkpixbuf-2.0
      - gir1.2-glib-2.0
      - gir1.2-gtk-3.0
      - gir1.2-ibus-1.0
      - gir1.2-pango-1.0
      - glib-networking
      - glib-networking-common
      - glib-networking-services
      - gnupg
      - gnupg-l10n
      - gnupg-utils
      - gpg
      - gpg-agent
      - gpg-wks-client
      - gpg-wks-server
      - gpgconf
      - gpgsm
      - gpgv
      - gsettings-desktop-schemas
      - gtk-update-icon-cache
      - hicolor-icon-theme
      - humanity-icon-theme
      - hwdata
      - ibus
      - ibus-data
      - ibus-table
      - ibus-table-emoji
      - liba52-0.7.4
      - libaa1
      - libacl1
      - libaom0
      - libapparmor1
      - libappmenu-gtk2-parser0
      - libappmenu-gtk3-parser0
      - libappstream4
      - libappstreamqt2
      - libarchive13
      - libaribb24-0
      - libasn1-8-heimdal
      - libasound2
      - libasound2-data
      - libasound2-plugins
      - libass9
      - libassuan0
      - libasyncns0
      - libatasmart4
      - libatk-bridge2.0-0
      - libatk1.0-0
      - libatk1.0-data
      - libatspi2.0-0
      - libaudit-common
      - libaudit1
      - libavahi-client3
      - libavahi-common-data
      - libavahi-common3
      - libavc1394-0
      - libavcodec58
      - libavformat58
      - libavutil56
      - libbabeltrace1
      - libbasicusageenvironment1
      - libblkid1
      - libblockdev-fs2
      - libblockdev-loop2
      - libblockdev-part-err2
      - libblockdev-part2
      - libblockdev-swap2
      - libblockdev-utils2
      - libblockdev2
      - libbluetooth3
      - libbluray2
      - libbrotli1
      - libbsd0
      - libbz2-1.0
      - libcaca0
      - libcairo-gobject2
      - libcairo2
      - libcanberra-pulse
      - libcanberra0
      - libcap-ng0
      - libcap2
      - libcddb2
      - libchromaprint1
      - libcodec2-0.9
      - libcolorcorrect5
      - libcolord2
      - libcom-err2
      - libcrypt1
      - libcups2
      - libcurl3-gnutls
      - libdatrie1
      - libdb5.3
      - libdbus-1-3
      - libdbusmenu-qt5-2
      - libdca0
      - libdconf1
      - libdevmapper1.02.1
      - libdmtx0b
      - libdouble-conversion3
      - libdvbpsi10
      - libdvdnav4
      - libdvdread7
      - libdw1
      - libebml4v5
      - libeditorconfig0
      - libelf1
      - libepoxy0
      - libevdev2
      - libevent-2.1-7
      - libexpat1
      - libext2fs2
      - libfaad2
      - libfdisk1
      - libffi7
      - libflac8
      - libfontenc1
      - libfribidi0
      - libfuse2
      - libgamin0
      - libgcrypt20
      - libgdbm-compat4
      - libgdbm6
      - libgdk-pixbuf2.0-0
      - libgdk-pixbuf2.0-common
      - libgirepository-1.0-1
      - libgit2-28
      - libglib2.0-0
      - libglib2.0-bin
      - libglib2.0-data
      - libgme0
      - libgmp10
      - libgnutls30
      - libgomp1
      - libgpg-error0
      - libgpgme11
      - libgpgmepp6
      - libgpm2
      - libgps26
      - libgraphite2-3
      - libgroupsock8
      - libgsm1
      - libgssapi-krb5-2
      - libgssapi3-heimdal
      - libgstreamer-plugins-base1.0-0
      - libgstreamer1.0-0
      - libgtk-3-0
      - libgtk-3-common
      - libgudev-1.0-0
      - libharfbuzz0b
      - libhcrypto4-heimdal
      - libheimbase1-heimdal
      - libheimntlm0-heimdal
      - libhogweed5
      - libhttp-parser2.9
      - libhunspell-1.7-0
      - libhx509-5-heimdal
      - libibus-1.0-5
      - libice6
      - libicu66
      - libidn11
      - libidn2-0
      - libinput10
      - libisl22
      - libixml10
      - libjack-jackd2-0
      - libjansson4
      - libjbig0
      - libjpeg-turbo8
      - libjpeg8
      - libjs-underscore
      - libjson-glib-1.0-0
      - libjson-glib-1.0-common
      - libk5crypto3
      - libkmod2
      - libkrb5-26-heimdal
      - libkrb5-3
      - libkrb5support0
      - libksba8
      - libkscreenlocker5
      - liblcms2-2
      - libldap-2.4-2
      - libldap-common
      - liblirc-client0
      - liblivemedia77
      - liblmdb0
      - libltdl7
      - liblua5.2-0
      - liblz4-1
      - liblzma5
      - libmad0
      - libmatroska6v5
      - libmbedcrypto3
      - libmbedtls12
      - libmbedx509-0
      - libminizip1
      - libmm-glib0
      - libmount1
      - libmp3lame0
      - libmpc3
      - libmpcdec6
      - libmpdec2
      - libmpeg2-4
      - libmpfr6
      - libmpg123-0
      - libmtdev1
      - libmtp-common
      - libmtp9
      - libmysofa1
      - libncurses6
      - libncursesw6
      - libndp0
      - libnettle7
      - libnewt0.52
      - libnfs13
      - libnghttp2-14
      - libnl-3-200
      - libnl-genl-3-200
      - libnl-route-3-200
      - libnm0
      - libnotificationmanager1
      - libnpth0
      - libnspr4
      - libnss3
      - libnuma1
      - libogg0
      - libopenconnect5
      - libopenjp2-7
      - libopenmpt-modplug1
      - libopenmpt0
      - libopus0
      - liborc-0.4-0
      - libp11-kit0
      - libpackagekitqt5-1
      - libpam-modules
      - libpam-systemd
      - libpam0g
      - libpango-1.0-0
      - libpangocairo-1.0-0
      - libpangoft2-1.0-0
      - libpangoxft-1.0-0
      - libparted-fs-resize0
      - libparted2
      - libpci3
      - libpcre2-16-0
      - libpcre2-8-0
      - libpcre3
      - libpcsclite1
      - libperl5.30
      - libphonon4qt5-4
      - libphonon4qt5-data
      - libpipewire-0.3-0
      - libpipewire-0.3-modules
      - libpixman-1-0
      - libplacebo7
      - libplasma-geolocation-interface5
      - libpng16-16
      - libpopt0
      - libpostproc55
      - libprocesscore9
      - libprocessui9
      - libprotobuf-lite17
      - libproxy1v5
      - libpsl5
      - libraw1394-11
      - libre2-5
      - libreadline8
      - libresid-builder0c2a
      - librest-0.7-0
      - libroken18-heimdal
      - librsvg2-2
      - librsvg2-common
      - librtmp1
      - libsamplerate0
      - libsasl2-2
      - libsasl2-modules-db
      - libscim8v5
      - libsdl-image1.2
      - libsdl1.2debian
      - libsecret-1-0
      - libsecret-common
      - libselinux1
      - libshine3
      - libshout3
      - libsidplay2
      - libslang2
      - libsm6
      - libsmartcols1
      - libsnapd-glib1
      - libsnappy1v5
      - libsndfile1
      - libsndio7.0
      - libsoup-gnome2.4-1
      - libsoup2.4-1
      - libsoxr0
      - libspa-0.2-modules
      - libspatialaudio0
      - libspeex1
      - libspeexdsp1
      - libsqlite3-0
      - libsrt1
      - libss2
      - libssh-4
      - libssh-gcrypt-4
      - libssh2-1
      - libssl1.1
      - libstemmer0d
      - libstoken1
      - libswresample3
      - libswscale5
      - libsystemd0
      - libtag1v5
      - libtag1v5-vanilla
      - libtaskmanager6
      - libtasn1-6
      - libtdb1
      - libteamdctl0
      - libthai-data
      - libthai0
      - libtheora0
      - libtiff5
      - libtinfo6
      - libtomcrypt1
      - libtommath1
      - libtss2-esys0
      - libtwolame0
      - libudev1
      - libudisks2-0
      - libunistring2
      - libupnp13
      - libusageenvironment3
      - libusb-1.0-0
      - libuuid1
      - libva-drm2
      - libva-wayland2
      - libva-x11-2
      - libva2
      - libvdpau1
      - libvlc5
      - libvlccore9
      - libvorbis0a
      - libvorbisenc2
      - libvorbisfile3
      - libvpx6
      - libvulkan1
      - libwacom-common
      - libwacom2
      - libwavpack1
      - libweather-ion7
      - libwebp6
      - libwebpdemux2
      - libwebpmux3
      - libwebrtc-audio-processing1
      - libwind0-heimdal
      - libwrap0
      - libx264-155
      - libx265-179
      - libxau6
      - libxaw7
      - libxdamage1
      - libxext6
      - libxfixes3
      - libxft2
      - libxi6
      - libxinerama1
      - libxkbcommon-x11-0
      - libxkbcommon0
      - libxkbfile1
      - libxml2
      - libxmu6
      - libxmuu1
      - libxpm4
      - libxslt1.1
      - libxss1
      - libxt6
      - libxtst6
      - libxv1
      - libxvidcore4
      - libxxf86dga1
      - libxxf86vm1
      - libyaml-0-2
      - libzstd1
      - libzvbi-common
      - libzvbi0
      - logsave
      - milou
      - mime-support
      - mobile-broadband-provider-info
      - ocl-icd-libopencl1
      - oxygen-sounds
      - parted
      - pci.ids
      - pciutils
      - perl
      - perl-base
      - perl-modules-5.30
      - pinentry-curses
      - pipewire
      - pipewire-bin
      - python3
      - python3-gi
      - python3-ibus-1.0
      - python3-minimal
      - python3.8
      - python3.8-minimal
      - qtchooser
      - qtvirtualkeyboard-plugin
      - readline-common
      - sed
      - sound-theme-freedesktop
      - sudo
      - tpm-udev
      - tzdata
      - ubuntu-mono
      - udev
      - udisks2
      - usb.ids
      - usbutils
      - vlc-data
      - vlc-plugin-base
      - vlc-plugin-video-output
      - wpasupplicant
      - x11-utils
      - x11-xserver-utils
      - xdg-desktop-portal
      - xdg-desktop-portal-kde
      - xkb-data
      - zlib1g

  runtime:
    env:
     PATH: $APPDIR/usr/bin:$PATH
     APPDIR_LIBRARY_PATH: $APPDIR/usr/lib/x86_64-linux-gnu/:$APPDIR/usr/lib/x86_64-linux-gnu/pulseaudio:$APPDIR/usr/lib/x86_64-linux-gnu/samba/

  files:
    exclude:
      - usr/lib/x86_64-linux-gnu/gconv
      - usr/share/man
      - usr/share/doc/*/README.*
      - usr/share/doc/*/changelog.*
      - usr/share/doc/*/NEWS.*
      - usr/share/doc/*/TODO.*

AppImage:
  update-information: None
  sign-key: None
  arch: x86_64

If you notice there’s quite a lot of packages in the exclude section, that’s because I prefer to keep the AppImages that I generate relatively small. While this has the obvious benefit of a smaller file, it also means that the probability that the file works across multiple Linux distributions (from different families) is reduced, a.k.a, the file is less portable. Hence, you have to keep that in mind.

To put it another way, everything you don’t put inside the AppImage is something you’re expecting to find in the target system, and vice-versa, i.e., desktop Linux distributions are likely to include the adwaita-icon-theme package, so that’s something that we can exclude from the final binary.

  • In my recipe, I’m using Ubuntu repositories to tell appimage-builder from where to pull the packages. However, this is not mandatory; you can use any APT/dpkg repository (Debian, Devuan, Ubuntu, Trisquel, etc.), including Launchpad PPAs.

Now that we have a recipe for appimage-builder, we can copy it to the container using Station. Create an empty file in our working directory using your de facto editor (I’m using nano), and copy the recipe and save it.

Generating the AppImage

To generate the AppImage using appimage-builder, all we need to do is run a single command.

appimage-builder --recipe recipe.yml --skip-tests
  • In the command above, my recipe name is recipe.yml; like before, you can name your recipe any way you want, then I tell appimage-builder not to perform the built-in tests as we will be testing the AppImage directly on our installation.

By this point, the AppImage will begin to be generated from the recipe.

  • To verify the AppImage file name, you can use the command ls -l.

Testing the AppImage

To test that the AppImage works, we will need to copy the AppImage file from the container to our host. First, we need to know the container ID of the container that we used. To find the container ID, run the following command.

sudo docker ps

The output of the command will look similar to this.

CONTAINER ID        IMAGE                               COMMAND             CREATED       
57293d54a61a        appimagecrafters/appimage-builder   "/bin/bash"         39 minutes ago

Since now we know our container ID and know our file name and path, we can copy it (to our home directory, for example).

sudo docker cp 57293d54a61a:/builder/mpv/mpv-0.32.0-1ubuntu1-x86_64.AppImage ~/
  • Please note that the file will be copied with root ownership (because while inside the container, you’re root, and we’re using Docker as root); you may want to change that before executing it.

Now we just run the AppImage.

And it works!.

Lastly, if you’d like, you can remove the container. To stop and remove the container, run the following commands.

sudo docker container stop 57293d54a61a
sudo docker container rm 57293d54a61a

Troubleshooting

In any given case that your AppImage doesn’t work, it may be, usually, because of one or two things. Either your AppImage is missing a library, or the AppRun runtime does not find the library path in the AppDir.

  • In the first scenario, you will want to continue fine-tuning your recipe by adding packages to the section include (and removing them from the exclude section if you added them here).
  • In the second scenario, you will want to check to add the library path to the section runtime.

If your recipe failed to generate an AppImage, it might be because of missing GPG keys, connectivity problems with the repositories used, or missing packages, i.e., the package doesn’t exist.


That’s it; this concludes today’s tutorial.

The post Making an AppImage in Nitrux appeared first on Nitrux — #YourNextOS.