Archives For November 30, 1999

Ubuntu 22.04 finally removed the .deb package for Firefox web browser from it’s repository! Here’s how to install it back.

As you may know, Firefox in Ubuntu repository since 22.04 is a Snap package that runs in sandbox. It’s easy to remove it. But when you try installing the deb package via apt, it just install the Snap version back!!

Like Chromium, the Firefox deb in Ubuntu 22.04 + repository is an empty package that links to the Mozilla’s official Snap.

And, if you want to install the latest Firefox using the classic .deb package format, there are 2 easy ways:

  • Mozilla Team PPA maintained by Ubuntu Team members.
  • Mozilla’s new apt repository maintained by Firefox developer team!

(Optional) Remove the pre-installed Firefox Snap

It’s OK to keep the default Snap package. But it will cause duplicated Firefox icons after installing Firefox in .deb package format.

NOTE: Export bookmarks and backup other important data before removing it!

To remove it, press Ctrl+Alt+T on keyboard to open terminal. Then, run the command:

sudo snap remove firefox

Also, remove the empty Deb package by running command:

sudo apt remove firefox

Option 1: Install Firefox via “Mozilla Team” team PPA

The team described that it has assumed responsibility for Ubuntu’s official Firefox and Thunderbird packages.

And, the Firefox and Firefox ESR package maintainer for “Mozilla Team” team PPA, Rico Tzschichholz, is a well-known Ubuntu user who also maintains the official packages for LibreOffice, Plank dock, and unbound DNS server.

1. Add Mozilla Team PPA

In terminal (Ctrl+Alt+T), run the command below to add the PPA. Type user password (no asterisk feedback) when it asks and hit Enter to continue.

sudo add-apt-repository ppa:mozillateam/ppa

As the PPA description indicates, the PPA was previously created for Firefox ESR and Thunderbird. It now contains the latest Firefox too.

2. Set PPA priority:

The empty Firefox deb in Ubuntu’s official repository has version number 1:1snap1-0ubuntu2. It’s always higher than the PPA package version. Running package updates either via sudo apt upgrade or ‘Software Updater’ will automatically install the official one which redirects to Snap.

To workaround the issue, you have to set a higher PPA priority. To do so, run the command below in terminal (Ctrl+Alt+T):

sudo gedit /etc/apt/preferences.d/mozillateamppa

For Ubuntu 24.04, replace gedit in command with gnome-text-editor, or use nano that works in all the desktop environments.

The command creates and opens empty config file in Gedit text editor. When it opens, add the lines below and save it:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

For nano text editor, press ctrl+s to save file, and ctrl+x to exit.

After saving the file, run sudo apt update command in terminal to apply changes.

sudo apt update

3. Install Firefox via apt

Tip: the commands in this step also installs Firefox for the old Ubuntu 16.04. Though sudo apt update need to be run first.

Finally, run the command below to install the latest Firefox package as deb:

sudo apt install firefox

Here -t 'o=LP-PPA-mozillateam' specifies to install Firefox from that PPA. It’s required until you set higher PPA package priority (see next step).

The -t 'o=LP-PPA-mozillateam' flag is no longer required after setup PPA priority.

For choice, you may install Firefox ESR instead. It’s another official Firefox package that moves slowly and targets for school or enterprise use.

sudo apt install firefox-esr

Option 2: Install Firefox via its official repository

Mozilla’s new apt repository contains 4 versions of Firefox packages: Firefox Stable, Firefox Beta, Firefox Development Edition, and Firefox Nightly. It’s a good choice for Ubuntu & Debian users.

1: Get Repository Key file

To add the new repository, you need to first download & install the key, so your system will trust the packages from it.

First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to make sure ‘/etc/apt/keyrings’ exist for storing the keys.

sudo mkdir -p /etc/apt/keyrings

Then, download & install the key by running the single command below in terminal:

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

After that, you can verify the new key file by listing the content of that directory via command ls /etc/apt/keyrings.

2: Add Mozilla’s apt repository

Also in a terminal window, run the single command below will create a config file and write the source repository.

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null

When done, you may verify by running cat /etc/apt/sources.list.d/mozilla.list to print the source file content.

3. Set apt repository priority:

Also you need to set higher priority for Mozilla’s repository, so Ubuntu will install Firefox from it rather than the snap package.

To do so, run command to create & edit the config file:

sudo gedit /etc/apt/preferences.d/mozilla

Also, replace gedit with gnome-text-editor for Ubuntu 24.04, or use nano command line editor that works in most desktop environments.

When file opens, add following lines and save it (For nano, press ctrl+s to save, and ctrl+x to exit).

Package: firefox*
Pin: origin packages.mozilla.org
Pin-Priority: 1001

4. Install Firefox:

Finally, refresh your system package cache by running command in terminal:

sudo apt update

And, install Firefox from that repository via command:

sudo apt install firefox

You may also use firefox-beta, firefox-devedition, or firefox-nightly in last command to install other versions.

How to Restore Firefox Snap:

To restore the pre-installed Snap package, or uninstall the .deb package, first remove the repositories:

  • To remove the Mozilla Team PPA, launch ‘Software & Updates‘ utility and navigate to Other Software tab, finally remove the corresponding source line.
  • To remove the Mozilla apt repository, simply delete the source file, by running command in terminal:
    sudo rm /etc/apt/sources.list.d/mozilla.list

After that, either launch Software Updater to upgrade Firefox or use apt commands below. Both of which will automatically install back the pre-installed Snap package.

sudo apt update
sudo apt install firefox

That’s all. Enjoy!

Ubuntu 22.04 has a new in-shell screenshot UI for taking screenshots and recording desktop. The old default screenshot app (GNOME Screenshot) is no longer available out-of-the-box.

For those somehow sticking to the old screenshot tool, here’s how to install it back and configure keyboard shortcuts in Ubuntu 22.04.

old default Gnome Screenshot app

Install Gnome Screenshot:

Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below will install the app back from Ubuntu universe repository:

sudo apt install gnome-screenshot

Type user password (no visual feedback) for sudo authentication and hit Enter

Install Gnome Screenshot

After installation, you may search for and open the app from ‘Activities’ overview screen.

Or use the steps below to set up keyboard shortcuts for this tool.

Set shortcut keys for GNOME Screenshot:

By default, you may press Shift+Print to immediately capture the full-screen, and use Alt+Print to capture focused app window. And, Print key is used to bring up the in-shell screenshot UI. For choice, you may replace the shortcuts keys via Gnome Control Center.

1. Firstly, open system settings (aka, gnome-control-center) from system tray menu:

2. When it opens, navigate to ‘Keyboard‘ in the left. Then click ‘View and Customize Shortcuts‘ in bottom right.

3. If you want to re-bind Print, Alt+Print, Shift+Print shortcut keys via other screenshot actions, disable them (press Backspace in set shortcut dialog) in under ‘Screenshots’ shortcuts page.

4. Next, go back ‘Keyboard Shortcuts’ page, scroll down and select “Custom Shortcuts“. Then you may click ‘Add Shortcut’ (or ‘+’ icon) button to add new custom shortcuts.

  • Name: type name of the shortcut as you prefer.
  • Command:

    • gnome-screenshot --window – grab the current active window immediately.
    • gnome-screenshot --area – start area selection.
    • gnome-screenshot – capture the full-screen immediately.
  • Shortcut: click ‘Set Shortcut…’ and press the key combination to bind the keyboard shortcut.

For more command line options of Gnome Screenshot, run man gnome-screenshot in terminal.

That’s all. Enjoy!

Looking for a secure instant messaging app? Speek.Chat is a free open-source messenger based on Tor hidden network services.

No server, no metadata, no ID or phone number! With it, users are only identified via public keys. By sharing the key to others, they can send request to add you into contact list and then start chatting.

All messages and files are end-to-end encrypted and routed via the Tor network. No middleman server that could be compromised, taken down or leak user information. You can chat anonymous without exposing your identity (or IP) to anyone.

Speek.Chat messenger features:

  • Serverless, no metadata, anonymous.
  • Peer to peer encrypted using TLS/SSLv3, routed via Tor network.
  • Nothing is stored. All messages deleted on app close.

Get Speed.Chat

The app is available in Microsoft Store for Windows, and app store for macOS 10.12 or later.

For Linux, it provides the non-install Appimage available to download at the project releases page:

Grab the package from ‘Assets’ section, then right-click on it and go to file ‘Properties’. After adding permission to ‘Allow executing file as program‘, you can right-click and select run to launch the messenger.

If you don’t want to use it anymore, just remove the .appimage package and that’s all.

Ubuntu 22.04 Jammy Jellyfish now is in final beta stage! Here’s how you can upgrade to the new LTS from Ubuntu 20.04!

NOTE: the steps below now will upgrade to Ubuntu 22.04 Beta at the moment. Though, the beta will be upgraded to the final stable release automatically in next month by running regular updates.

What’s New in Ubuntu 22.04:

The new Ubuntu 22.04 LTS features Linux Kernel 5.15 and GNOME 42 desktop. It’s a long term support release with 5 years support. The Final Beta was announced with changes including:

  • Full dark/light mode via appearance settings.
  • 10 accent colors.
  • New screenshot UI (press Print-Screen to start it).
  • Switch Firefox to Mozilla’s Snap package.
  • Defaults to Wayland compare to Ubuntu 20.04.
  • LibreOffice 7.3, Thunderbird 91.
  • Python 3.10, Ruby 3.0, Mesa 22, PulseAudio 16, CUPS 2.4, PostgreSQL 14.2
  • See release note for more.

Preparation:

Before getting started, there are some things need to do first! They are important to prevent upgrade failure.

1.) Backup! Backup! Backup! The upgrade process may fail due to different reasons. So, it’s important to back your data, bookmarks, etc.

2.) Disable third-party PPAs. This can be done by launching ‘Software & Updates’ utility and navigate to ‘Other Software’ tab.

If possible, I’d recommend to purge PPAs which also downgrade these third-party software packages. Especially for ffmpeg, mesa, etc.

Disable or remove 3 party PPAs

3.) Also in ‘Software & Updates’ tool, navigate to ‘Updates’ tab. There choose ‘Notify me of a new Ubuntu version: For long term support versions‘.

4.) Remove proprietary drivers from ‘Additional Drivers’ tab, and use an open-source driver instead. You may skip this step if your PC does not have a dedicated GPU.

5.) Remove other Desktop Environments! If you have other desktops (e.g., KDE, XFCE, Cinnamon), it’s better to remove them, so to speed up the upgrade process.

6.) Disable User Extensions. Disable user installed Gnome Extensions via Gnome Tweaks tool!

Upgrade to Ubuntu 22.04:

NOTE: The upgrade process may fail! If you can’t afford to have a broken system, please do a clean install instead of upgrading it!

1.) Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to install all available system updates:

sudo apt update && sudo apt full-upgrade

install all available system updates

And, restart your computer if you have not run system updates for a long time.

2.) Next, in terminal run the command below to run update manager to check distribution update:

update-manager -d -c

If there are still available updates or removals, click on ‘Install Now’ and re-run the command.

3.) Once you see the prompt for Ubuntu 22.04. Click on “Upgrade” button, and confirm in the next ‘Release Notes’ dialog.

4.) It will pop-up another dialog asks to confirm via ‘Start Upgrade’ button. Once you click on it, the ‘Distribution Upgrade’ wizard will pop-up indicates the upgrading process.

5.) Don’t go far away from your computer!! There will be a few more confirm dialogs, so you have to keep an eye on the screen.

If everything goes well, there will be a dialog asks to “Restart” to complete the upgrade.

Sadly, I went out when it was ‘Getting new packages‘. And the upgrade process failed at blank screen when I was back! So there’s no screenshot for this step.

Troubleshoot:

There may be various reasons that the upgrade failed. Here are the issues in my case.

As mentioned, the upgrade failed in my case and the laptop run into blank screen. And, I did following steps that successfully finish the upgrade.

1.) Force reboot and login. Press Ctrl+Alt+F2 (F3 ~ F6) and type username, then password to log into tty console if GDM (login screen) does not start. Or, select boot “Advanced -> recover mode -> drop root shell prompt” from boot-loader if Ubuntu refused to boot!

2.) Once logged in, try running command to configure unfinished packages:

sudo dpkg --configure -a

3.) And, try to fix broken dependencies via command:

sudo apt -f install

In my case, some third-party packages (e.g., libfilezilla12 from xtradeb PPA, and libreoffice-common from LibreOffice Fresh PPA) break the dependencies! And, the command failed with something look like:

trying to overwrite ‘…’, which is also in package libfilezilla12 0.27.1~extradeb1
Errors were encountered while processing:

E: Sub-process /usr/bin/dpkg returned an error code(1)

To fix the issue, just remove the package via command (replace package name ‘libfilezilla12’ accordingly):

sudo dpkg -P libfilezilla12

Then re-run the sudo apt -f install until it’s done successfully without error!

4.) Install all available system updates via command:

sudo apt full-upgrade

If everything goes well, clean up via command:

sudo apt remove --autoremove

And finally restart computer via reboot command.

5.) Some packages are however missing in my case after restart. They were fixed by manually installing the packages via the commands below.

  • No login screen or non-gnome login screen, run command and then reboot:
    sudo apt install gdm3 && sudo dpkg-reconfigure gdm3
  • Miss pre-installed extensions (left-dock, desktop icons, and appindicator), run command and then log out and back in:
    sudo apt install gnome-shell-extension-ubuntu-dock gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons-ng

Running Ubuntu laptop without power supply? It’s wise to keep an eye on the battery percentage. And, here’s how to make Ubuntu 22.04 display the info in top-right corner just besides the battery icon.

Method 1: Single command toggle display battery percentage

For those OK with Linux commands, just press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below:

gsettings set org.gnome.desktop.interface show-battery-percentage true

You’ll see the change immediately after hitting Enter to run the command.

And, to hide the percentage again, use command:

gsettings reset org.gnome.desktop.interface show-battery-percentage

Method 2: Use Gnome Control Center -> Power settings

In Ubuntu 22.04, the GNOME Tweaks tool no longer provide the option to toggle display battery percentage. Because, GNOME has merged this option into system settings (aka gnome-control-center).

1.) Firstly, open ‘Settings’ either from the dash or top-right system tray menu.

2.) When it opens, navigate to Power panel in the left. And, finally use the on/off switch in bottom right to toggle display battery percentage:

That’s it. Enjoy!

There are quite a few weather apps for Ubuntu Linux. Here’s a new one for GNOME desktop 40+.

Different to other apps, the extension show a little icon in system tray area for current weather condition. By clicking on it will display weather forecast for next days as desktop widget.

Though it only shows the basic icons (e.g., cloudy, clear, rain, or snow.), and allows to control via:

  • single click on indicator icon to display widget.
  • right-click on desktop widget to hide.
  • middle click to refresh.
  • Scroll up/down to increase/decrease days.

As you see in the picture, the icons are somehow too big in my case in Ubuntu 22.04 laptop. And, it so far only supports for getting weather information from OpenWeatherMap.org.

How to Install the weather widget:

NOTE: the extension works on Ubuntu 21.10, Ubuntu 22.04, Fedora 34+, and Arch Linux etc with GNOME 40+.

1.) Ubuntu user needs to first press Ctrl+Alt+T to open terminal, and run command to install the browser agent:

sudo apt install chrome-gnome-shell

2.) Next, click the link below to go to extension page and turn on the slider icon to install it.

NOTE: The pre-installed Firefox in Ubuntu 21.10+ is SNAP that so far does not support this thing! Use another browser or install Firefox as deb.

And, if you don’t see the on/off switch, install browser extension via ‘click here to install browser extension‘ link and refresh the page.

3.) Finally, open “Extensions” app (install via sudo apt install gnome-shell-extension-prefs). And, configure the extension to search and set your location.

As you see, the app also has option to disable or remove the extension as you want.

This simple tutorial shows how to install the latest Oracle Java (JDK 21 or JDK 23) in Ubuntu Linux via the official binary package.

There used to be unofficial Ubuntu PPA to automate the process of installing Java JDK and setup the environment, however, discontinued. So, here’s the tutorial to manually install the Java package and set as default.

Install JDK 21/23 in Ubuntu:

Press Ctrl+Alt+T on keyboard to open a terminal window and follow the steps below one by one.

NOTE: In all commands below, you need to replace jdk-21 with jdk-23 for installing or uninstall Java JDK 23.

1. Download Java package

Firstly, go to oracle website and select download the .deb package for JDK 21 or 22 depends on which version you want to install:

It’s the 64-bit .deb package for modern Intel/AMD PC and laptops, or tarball for ARM cpu architecture type, e.g., Raspberry Pi.

2. Install the .deb package

Once you downloaded the package, open terminal (Ctrl+Alt+T) and run the command below to install the deb package:

sudo apt install ~/Downloads/jdk-21_linux-x64_bin.deb

For choice, you may drag’n’drop the .deb package into terminal, instead of typing ~/Downloads/filename.deb. And, replace number 21 according to which version you downloaded.

For the ARM package (for Raspberry Pi, Apple M1/2, etc), run command to create ‘/usr/lib/jvm’ directory in case it does not exist:

sudo mkdir -p /usr/lib/jvm

Then, extract the tarball to that directory via (For JDK 23, replace the number in command.):

sudo tar -zxf ~/Downloads/jdk-21_linux-aarch64_bin.tar.gz -C /usr/lib/jvm/

3. Set JDK 21/23 as default (for ARM only):

NOTE 1: The .deb package now automatically set Java 21/23 as default! So, you ONLY need to follow the steps below for the ARM package.

NOTE 2: The JDK root folder-name may vary depends on which package you installed. It may be ‘jdk-21’, ‘jdk-21.0.1’, ‘jdk-23’, ‘jdk-23.0.1’, and so forth. Run ls /usr/lib/jvm to tell and replace jdk-21 in commands below accordingly.

a.) Create symbolic links for the executable files:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-21/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-21/bin/javac 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-21/bin/jar 1

Similarly, add links for other executable files (e.g., jarsigner, jlink, javadoc) as you need.

b.) Next, run the commands below one by one, and type number to select Java JDK 21 as default.

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config jar

When done, verify by running command in terminal:

java -version
javac -version

4. Set JAVA_HOME (for ARM only):

As well, you only need to do this for ARM package. If installed the .deb version, just verify JAVA HOME via the bottom command.

Also, replace ‘jdk-21’ below according to ls /usr/lib/jvm command output.

Option 1.) Set JAVA_HOME for current command console, that will work until you close it:

export JAVA_HOME=/usr/lib/jvm/jdk-21
setenv JAVA_HOME=/usr/lib/jvm/jdk-21

Option 2.) To make it permanent, create and edit config file via command:

sudo gedit /etc/profile.d/jdk.sh

Depends on your desktop environment, you may replace gedit with mousepad for XFCE, xed for Linux Mint, pluma for MATE, kate for KDE Plasma, gnome-text-editor for Ubuntu 24.04+.

then add following lines:

export J2SDKDIR=/usr/lib/jvm/jdk-21
export J2REDIR=/usr/lib/jvm/jdk-21
export PATH=$PATH:/usr/lib/jvm/jdk-21/bin:/usr/lib/jvm/jdk-21/db/bin
export JAVA_HOME=/usr/lib/jvm/jdk-21
export DERBY_HOME=/usr/lib/jvm/jdk-21/db


And create anther one for C shell:

sudo gedit /etc/profile.d/jdk.csh

add following lines and save it:

setenv J2SDKDIR /usr/lib/jvm/jdk-21
setenv J2REDIR /usr/lib/jvm/jdk-21
setenv PATH ${PATH}:/usr/lib/jvm/jdk-21/bin:/usr/lib/jvm/jdk-21/db/bin
setenv JAVA_HOME /usr/lib/jvm/jdk-21
setenv DERBY_HOME /usr/lib/jvm/jdk-21/db


Finally, change the permissions via command, and it should take place next time you log in.

sudo chmod +x /etc/profile.d/jdk.csh /etc/profile.d/jdk.sh

To verify JAVA HOME, run the command below in terminal at next login:

java -XshowSettings:properties -version

Uninstall Java JDK 21/23

To uninstall the Java package, open terminal (Ctrl+Alt+T) and run command:

sudo apt remove --autoremove jdk-21 jdk-23

In the commands below, replace jdk-21, with jdk-21.0.5, jdk-23, jdk-23.0.1, etc, depends on which version you installed.

For the ARM version, simply remove all the installed files, by running the commands below one by one:

  • Remove the alternative links:
    sudo update-alternatives --remove java /usr/lib/jvm/jdk-21/bin/java
    sudo update-alternatives --remove javac /usr/lib/jvm/jdk-21/bin/javac
    sudo update-alternatives --remove jar /usr/lib/jvm/jdk-21/bin/jar
  • Remove JDK installation files:
    sudo rm -R /usr/lib/jvm/jdk-21
  • And remove JAVA HOME config files:
    sudo rm /etc/profile.d/jdk.sh
    sudo rm /etc/profile.d/jdk.csh

Stellarium 0.22.0 released! Here’s how to install and keep it up to date in Ubuntu 22.04, Ubuntu 20.04 via PPA.

Stellarium is a free open source planetarium for Linux, Windows, and macOS. It shows a realistic sky in 3D, just like what you see with the naked eye.

While the software package in Ubuntu repository is always old, the latest version so far is Stellarium 0.22.0 that features:

  • AstroCalc: Eclipse Finder
  • AstroCalc: RTS (Rises, Transits, Settings)
  • Switch from Bortle scale to physical brightness values for light pollution.
  • Allow tweaks for the atmosphere brightness/color model and tone mapping
  • Several new calendars in the Calendars plugin
  • Seasonal polar caps on Mars
  • New and improved sky cultures
  • Larger textures allowed in Scenery3D
  • Improved OnlineQueries and Satellites plugin
  • Many fixes in core and plugins.
  • A large number of bug fixes and closed feature requests and enhancements

How to install Stellarium:

The software developer team provides Ubuntu packages via PPA repository. So far, it supports Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.10, and upcoming Ubuntu 22.04.

1. Add the PPA

Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to add the PPA repository:

sudo add-apt-repository ppa:stellarium/stellarium-releases

Type user password (no asterisk feedback) when it asks and hit Enter to continue.

2. Install / Upgrade the Astronomy Software

If you have already installed an old version of the software package, simply launch Software Updater to update the package to the latest:

Or, run the command below in terminal to install (or upgrade) it for the first time:

sudo apt install stellarium

Ubuntu 18.04 needs to refresh cache first via sudo apt update.

Uninstall Stellarium:

To remove the software, run the command below in terminal:

sudo apt remove --autoremove stellarium

And remove the PPA repository either via command:

sudo add-apt-repository --remove ppa:stellarium/stellarium-releases

or by launching Software & Updates and remove source url from ‘Other Software’ tab.

There are quite a few image editing tools for Linux desktop. ‘Drawing’ is the one that promoted itself a Microsoft Paint alternative for Linux.

The app provides basic editing features, including crop, resize, skew and rotate images, apply simple filters, insert or censor text. As well, it supports for drawing with pencil, straight line, curve tool, many shapes, several brushes, with colors and other common used options.

Drawing. Tools with text

The app is targeted for GNOME, but also works on other desktop, e.g, elementaryOS Pantheon. And, it should also be compatible with the Pinephone and Librem 5 smartphones.

Other features of Drawing include:

  • follow system color (light or dark).
  • support PNG, JPEG, and BMP.
  • Copy to clipboard.
  • Keyboard shortcuts.
  • Undo/Redo.
  • Full-screen mode.

Drawing Dark Mode

How to Install Drawing in Ubuntu:

The app is available in Ubuntu repositories but old! For the latest release, user may use either the Flatpak package, or the Ubuntu PPA.

The Ubuntu PPA so far provides the packages for Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.10, and derivatives, e.g., Linux Mint 20.

1. Add the Ubuntu PPA

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to add PPA:

sudo add-apt-repository ppa:cartes/drawing

Type user password (no asterisk) feedback when it asks and hit Enter to continue.

2. Update package cache:

Ubuntu 18.04 user need to manually refresh package cache after adding new software sources:

sudo apt update

3. Install Drawing:

Finally, install the app via command:

sudo apt install drawing

Remove ‘Drawing’:

To remove the image editing tool, use command:

sudo apt remove --autoremove drawing

And remove the Ubuntu PPA either by running command in terminal:

sudo add-apt-repository ppa:cartes/drawing

or use the ‘Software & Updates’ utility under Other Software tab.

For those sticking to the old Ubuntu 18.04, but need higher Linux kernel version for specific hardware support, here’s how to install the Linux Kernel 5.13 from Ubuntu 20.04 repository.

NOTE: Ubuntu 20.04’s kernel package does install and seems running good in Ubuntu 18.04. But I’m not sure if it will cause compatibility issues. Install it ONLY that you do require it, and use it at your own risk!!

Linux Kernel 5.13 features include:

  • Initial and early support for Apple M1.
  • New “Landlock” Linux security module.
  • Initial graphics support for Alder Lake S.
  • AMD FreeSync HDMI support.
  • New Intel cooling driver
  • Realtek RTL8156 and RTL8153D support
  • New drivers support for Amazon’s Luna game controller.
  • Apple Magic Mouse 2 support .
  • Realtek RT1019, RT1316, RT711 and RT715 support.

Install Linux Kernel 5.13 in Ubuntu 18.04:

You know, the Mainline Kernel PPA maintains the latest kernel package. However, it’s now built against the most recent Ubuntu libc6 library.

The Kernel package from Ubuntu 20.04 repository could be the only way to get recent Kernels for Ubuntu 18.04, except for building by yourself.

1. Add Ubuntu 20.04 Updates repository:

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below and hit enter:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main" >> /etc/apt/sources.list'

The command adds focal-updates repository to your system software sources.

2. Set lower priority for the repository:

Also in terminal window, run command to create and open a config file via Gedit text editor:

sudo gedit /etc/apt/preferences.d/99focal-updates

When the file opens, add following lines and save it:

Package: *
Pin: release a=focal-updates
Pin-Priority: 1

After that, your system will not automatically install updates from this repository, unless you do it manually.

3. Update package cache:

Before being able to install packages from that repository, refresh system cache via command:

sudo apt update

If you’re following this tutorial on 18.04 based system that missing GPG key, run the commands below one by one to get them:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

4. Install Kernel 5.13:

Finally install the 20.04’s kernel package via the command below. So far, it’s Kernel 5.13.

sudo apt install linux-generic-hwe-20.04

After installation, restart your PC and verify via command:

uname -a

How to Remove Kernel 5.13 from Ubuntu 18.04:

To remove the focal-updates repository, run command to edit software sources file:

sudo gedit /etc/apt/sources.list

When the file opens, remove or comment (add # at the beginning) the line of:

deb http://archive.ubuntu.com/ubuntu focal-updates main

After saved it, run sudo apt update to refresh the cache.

To remove Linux Kernel 5.13, you need to firstly restart and select boot with an old kernel (v5.4.x) from boot menu -> Advanced options.

Once you get into Ubuntu 18.04 with the previous Kernel, run the command below to remove Kernel 5.13:

sudo apt remove linux-image-5.13.0-37-generic linux-headers-5.13.0-37-generic linux-hwe-5.13-headers-5.13.0-37

NOTE: Ubuntu updates the kernel packages regularly, the package version may be different!! Change it to the one that you installed.