Python 3.12.0 final was officially announced this Monday! Ubuntu LTS can easily install it from PPA.

New features in Python 3.12.0:

  • More flexible f-string parsing, allowing many things previously disallowed.
  • Python-level API for the buffer protocol
  • New API for monitoring Python programs running on CPython at low cost.
  • Per-Interpreter Global Interpreter Locks
  • Support for the Linux perf profiler to report Python function names in traces.
  • New type annotation syntax for generic classes
  • New decorator typing.override() in the typing module.

The new Python release also removed a few deprecated modules, including smtpd and distutils. For Ubuntu 22.04, Ubuntu 20.04, it causes a broken pip. As a workaround, you need to manually install pip for Python 3.12.

How to Install Python 3.12.0 in Ubuntu:

For Ubuntu 22.04, Ubuntu 20.04, and their derivatives such as Linux Mint 21, the Deadsnakes PPA has made the packages for all supported CPU architecture types: amd64, arm64/armhf, ppc64el, and s390x.

1. First, press Ctrl+Alt+T on keyboard to open terminal. Then paste the command below and hit run to add PPA:

sudo add-apt-repository ppa:deadsnakes/ppa

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

2. Ubuntu 20.04+ automatically refresh package cache while adding PPA. However, Linux Mint user may need to do this job manually by running command:

sudo apt update

3. Finally, run command to install Python 3.12:

sudo apt install python3.12

For other Ubuntu editions, you may manually compile Python 3.12 from source tarball.

This simple tutorial shows how to install GDM Settings tool to configure the Gnome Login Screen in Ubuntu 22.04 and Ubuntu 24.04 LTS.

GDM Settings, aka Login Screen Manager, is a graphical configuration tool for GNOME Login Screen. With it, user can easily configure following things for the login screen:

  • Background image or color.
  • Theme, icons, and cursor.
  • font and scaling factor.
  • top bar text color and background color.
  • Mouse and touchpad settings.
  • Disable user list.
  • Sound, night light, logo, etc.

Continue Reading…

This simple tutorial shows how to switch CPU power mode between ‘Performance’, ‘Balanced’, and ‘Power Saver’ using Linux command in Ubuntu 22.04, Ubuntu 23.10, and Ubuntu 24.04.

GNOME has options in both ‘Settings’ and top-right system status menu to change CPU frequency by switching between ‘Performance’, ‘Balanced’, and ‘Power Saver’.

It’s useful for saving battery life while being able to get better performance when gaming or doing heavy work.

For users who want to bind the options to keyboard shortcuts, or make the function into script or even application, here’s the single command to switch the power mode.

Single command to change Power Mode in Ubuntu

NOTE: This tutorial is only tested in Ubuntu (GNOME ONLY) with Intel CPU, though it should also work in Fedora workstation and Debian 12 with GNOME desktop.

The power mode setting option is handled by the power-profiles-daemon. It has a command line tool powerprofilesctl to check current and switch power profile.

To switch power mode to ‘power-saver’ for example, just press Ctrl+Alt+T on keyboard to open terminal and run command:

powerprofilesctl set power-saver

In command, replace power-saver with balanced or performance as you want.

After making change, verify by running command:

powerprofilesctl

In the output, the one with an asterisk ‘*’ in the beginning is the power profile currently in use.

For those who want to do the job through D-Bus interface, run the single command below instead:

gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'power-saver'>"

Also, change power-saver in command with balanced or performance as need.

View CPU Speed / frequency in Real Time

As mentioned, you can verify CPU power mode by simply running powerprofilesctl command.

For choice, you may also see CPU frequency (aka clock speed) in real-time by running command in terminal:

watch -n 1 "grep \"^[c]pu MHz\" /proc/cpuinfo"

It will show you the speed for all CPU cores, and update every 1 second. As you want, you may replace number 1 in seconds (e.g., 2 for 2 s, or 0.5 for 500 ms).

Auto-cpufreq, automatic CPU speed & power optimizer, now is at version 2.0.0 release!

This is a popular free open-source tool that monitors Linux laptop’s battery state, CPU usage, temperature and system load. And, automatically switches CPU profile between “power saving” and “performance mode” according to whether power supply is plugged. It also automatically turn on/off CPU turbo boost according to system load.

By releasing 2.0.0 version, it has a graphical GTK3 user interface, making the things easy for beginners! As well, it now has Nix Flake and better NixOS support

Auto-cpufreq graphical interface.

How to Install Auto-CpuFreq in Ubuntu Linux

NOTE 1: In Ubuntu with default GNOME desktop, there’s already an extension can do similar job. So, you may only need this on Ubuntu flavors such as XUbuntu, Ubuntu MATE, KUbuntu, etc.

NOTE  2: Ubuntu Software (or App Center) includes auto-cpurfreq package, though it’s Snap package that so far does not support GUI, due to sandbox permission issue.

NOTE 3: Installing auto-cpufreq in GNOME Desktop will disable the default power profile daemon.

1. First, download the source code (ZIP or Tar.gz) from github releases page:

2. After downloading the source, open your “Downloads” folder and extract the tarball. Then, right-click on extracted folder and select “Open in Terminal“.

3. In pop-up terminal window, run command to start the official installer, and answer “i” to start installing the tool.

sudo ./auto-cpufreq-installer

It will automatically install auto-cpufreq as well as download and installing all required dependencies on your system. If everything goes OK, you’ll be able to launch it from applications menu or ‘Activities’ overview.

And, first launch will prompt to click install and run the daemon. Just click ‘Install’ and re-launch the tool. Finally, you should be able to see the main UI like the top screenshot shows you.

Then, just leave it there to automatically change power profile depends on power state and CPU load. Or, you can manually switch to Power-save or Performance as you need.

Uninstall Auto-CPUFreq

To remove the tool, simply re-run the previous steps, but answer ‘r‘ while running the installer script in terminal window.

This simple tutorial shows how to install the latest Whisker Menu, the main menu for launching apps, in XUbuntu 22.04, Linux Lite 6.6, and Linux Mint 21 XFCE Edition.

The default main menu (aka applications menu, or start menu) in Debian and Ubuntu with XFCE Desktop is Whisker Menu. It’s a free and open-source project being developed by gottcode.org.

XUbuntu 22.04 includes Whisker Menu 2.7.1, while the latest version has now reached v2.8.0. For users who want to try out new features and receive bug-fixes, here’s how to install it step by step.

What’s New in Whisker Menu 2.8.0

For multiple monitors, you may have more than one instances of the menu in panel. In the case, the default Super shortcut key always open the menu in primary monitor.

To trigger the Whisker Menu in other monitors, user can bind xfce4-popup-whiskermenu -i ID-number to a keyboard shortcut. To get the ID-number, open ‘Panel Preferences -> Items’ and move mouse over the Whisker Menu applet to see the tooltip. It’s NOT the PID, but seems to be applet sequence number.

Also for keyboard users, the new release can trigger the menu in screen center by binding xfce4-popup-whiskermenu -c to a shortcut key.

The appearance settings menu has been redesigned in the release. There’s a new “Position profile on buttom” option. With it, user can put the user figure, Settings, Logout buttons in either top or bottom of the menu.

There’s also a “downside” in the release. User can no longer drag menu border to resize it. Instead, there are new “Menu width” and “Menu height” setting options to resize the menu. For more about the new release changes, see its official page.

Install Whisker Menu 2.8.0 via its Official PPA

The software developer has an official PPA contains the latest Whisker Menu packages for Ubuntu 22.04, Ubuntu 23.04, Ubuntu 23.10, and their derivatives.

(X)Ubuntu, Linux Mint XFCE Edition, and Linux Lite users can follow the steps below one by one to install it:

1. First, press Ctrl+Alt+T on keyboard to open up a terminal window. When terminal opens, run command to add the PPA:

sudo add-apt-repository ppa:gottcode/gcppa

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

2. Then, Linux Mint users need to manually refresh the system package cache, by running command:

sudo apt update

3. Finally, install the latest version of Whisker Menu by running command:

sudo apt install xfce4-whiskermenu-plugin


After installing the package, log out and back in. Then, right click on the menu and go to ‘About‘ to verify its version!

For Debian 12 with XFCE Desktop, user can download and install the .deb package directly from the PPA packages page.

How to Uninstall

To restore the original Whisker Menu, open terminal (Ctrl+Alt+T) and run command to install ppa-purge tool:

sudo apt install ppa-purge

Then, purge the PPA which will also downgrade the menu to the original version:

sudo ppa-purge ppa:gottcode/gcppa

In case the command above failed for you, you may manually remove the PPA by running command:

sudo add-apt-repository --remove ppa:gottcode/gcppa

Then, remove the Whisker Menu package by running command:

sudo apt remove xfce4-whiskermenu-plugin

And, install back the original version via command:

sudo apt install --reinstall xfce4-whiskermenu-plugin

This is a beginner’s guide shows how to set custom keyboard shortcut to tile windows in Ubuntu 24.04 Noble Numbat

Ubuntu (since 23.10) introduced enhanced tiling window support with a new system extension. With it, user can easily arrange all opened windows side by side by either mouse dragging or keyboard shortcuts.

The extension supports both “edge tiling” to automatically resize and fill a window to left, right, top, or bottom screen half, and “corner tiling” to tile a window to top-left, top-right, bottom-left, and bottom-right screen quarter.

The default keyboard shortcuts use “Super + number pad key” combination. But, some laptop and PC don’t even have a number pad. In the case, you have to set custom shortcuts. And, here’s how to do the job in 2 ways.

Method 1: Use Extension Manager

Firstly, press Super (Windows Logo) key to open overview screen. Search for and launch the new “App Center”.

When it opens, search and install “Extension Manager” app.

Install Extension Manager in Ubuntu Software/App Center

Next, launch “Extension Manager” by searching from the overview screen.

When the tool opens, scroll down and find out “Ubuntu Tiling Assistant“. Finally, click its setting icon to open the configuration dialog.

In the pop-up dialog, navigate to “Keybindings” tab, scroll down and click your desired tile action under “Edge Tiling” and “Corner Tiling” and press a key combination on keyboard to set as new shortcut.

Method 2: Use single command to set custom tiling shortcut

For those who are familiar with Linux command, the thing can be done by running gsettings command.

Firstly, search for and launch a terminal window from the overview screen.

When terminal opens, run command to set custom shortcut (Alt + q for example) for tiling to top-left quarter:

gsettings set org.gnome.shell.extensions.tiling-assistant tile-topleft-quarter "['<Alt>q']"

In command you may replace tile-topleft-quarter with one of the tile actions below:

  • tile-left-half
  • tile-right-half
  • tile-top-half
  • tile-bottom-half
  • tile-topright-quarter
  • tile-bottomleft-quarter
  • tile-bottomright-quarter

For the shortcut value, there must be quotation marks both inside and outside of bracket. And, the commonly used functions keys include <Control>, <Alt>, <Super> and <Shift>.

For example, set Ctrl + Alt + E to tile window to top-right corner by running command:

gsettings set org.gnome.shell.extensions.tiling-assistant tile-topright-quarter "['<Control><Alt>e']"

One tiling action can have 2 or more shortcut keys, for example, set both Alt+a and Ctrl + Left Arrow to tile a window to left half:

gsettings set org.gnome.shell.extensions.tiling-assistant tile-left-half "['<Alt>a', '<Control>Left']"

 

This simple tutorial shows how to install the latest Clang compiler 17 and/or 16 in Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 23.10.

Ubuntu includes several versions of Clang in its system repositories. But, it rarely builds newer releases into Ubuntu stable repositories.

You can easily install Clang 10, 11, 12, 13, 14, and 15 by running sudo apt install clang-xx (replace xx with major version number) command in terminal.

For the most recent 16 and 17, they are also easy to install via the official apt repository.

Step 1: Download the Automatic installation script

The official Clang repository, so far supports Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 23.04, and Ubuntu 23.10. It has a script to make adding repository and installing Clang as easy as few Linux commands.

1. First, press Ctrl+Alt+T on keyboard to open terminal. When terminal opens, run command to download the official installation script:

wget https://apt.llvm.org/llvm.sh

You may also use the script in Debian stable, though you may need to install wget first.

2. After downloading the script, add executable permission by running command:

chmod u+x llvm.sh

Step 2: Use the script to install Clang

The script automate the process of adding the official apt repository, updating package cache, and installing specific Clang version into your system.

All this can be done by running a single command. For example, install Clang-17:

sudo ./llvm.sh 17

Replace 17 with 16 for installing Clang-16, or even 18 if it’s already released when you see this tutorial

During the process, it will ask to hit Enter to confirm adding the apt repository. Then, you may just wait until the process done.

Step 3: Verify

If everything’s done successfully, just run clang-xx --version and/or locate clang-xx to verify.

Uninstall

To remove the repository added by the script, just open terminal (Ctrl+Alt+T) and run command to remove the corresponding source file:

sudo rm /etc/apt/sources.list.d/archive_uri-http_apt_llvm_org_*.list

And, remove the repository key file via command:

sudo rm /etc/apt/trusted.gpg.d/apt.llvm.org.asc

Or, launch “Software & Updates” and remove source line and key from “Other Software” and “Authentication” tabs.

To remove Clang packages (replace 17 accordingly), just run command:

sudo apt remove --autoremove clang-17 lldb-17 lld-17 clangd-17

This simple tutorial shows how to add a “Show Desktop” icon to the top panel in Ubuntu 22.04 and Ubuntu 24.04 with default Wayland session.

I’ve written about how to add ‘Show Desktop’ to the left dock panel, however, it works for the class Xorg session only. Since 22.04, Ubuntu switched to Wayland as its default display server. If you switched back to Xorg (via the gear icon in login screen), then this tutorial still works.

For GNOME (the default desktop) on Wayland, the thing can be done via a simple extension. And, here’s how to do it step by step.

Step 1: Install Extension Manager

Ubuntu has an “Extension Manager” tool in system repository, which allows to easily install and manage Gnome Shell extensions.

First, search for and install the tool from either Ubuntu Software or App Center, depends on your Ubuntu edition.

Install Extension Manager in Ubuntu Software/App Center

Or, press Ctrl+Alt+T on keyboard to open terminal, and run single command to install the tool:

sudo apt install gnome-shell-extension-manager

Step 2: Install the ‘Show Desktop’ button extension

After installing the Extension Manager, search for and launch it from the overview screen.

When the tool opens, navigate to ‘Browse’ tab, finally search and install the “Show Desktop Button” extension.

A ‘Home’ icon should appear immediately on the top-panel after installed the extension. By clicking on it, will hide (or show) all open app windows.

For choice, you can switch back “Installed” tab in Extension Manager, and open the preferences dialog for the extension. In which, you can choose to place the ‘Show Desktop’ icon in left, far left, center, right, or far right corner.

In addition, you may also install “Just Perfection” extension using Extension Manager. Which provides an Panel Button Padding Size option under Customize tab, to make the top-right panel icons look more compact.

That’s all. Enjoy!

For those who prefer the new ‘App Center’ in Ubuntu 23.10 and Ubuntu 24.04, it’s easy to install it in Ubuntu 22.04 and here’s how!

The new App Center is also the snap-store but re-built with Google’s Flutter UI toolkit. It’s fast and always works!

With it, the software app will never stuck at “Downloading Software catalog” or the spinning loading circle.

The App Center supports both Snap and native Debian (.deb) packages in Ubuntu 23.10/24.04, however, in my tests, searching Debian package always show me “No results found” in 22.04. If you know how to fix the issue, please leave a comment here.

App Center dark mode

App Center light mode

How to Install the new App Center in Ubuntu 22.04

NOTE: The NEW App Center so far lacks ability to install local .deb package!!

1. First, press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run command:

snap refresh snap-store --channel=latest/stable/ubuntu-24.04

This command may fail and output something look like: snap ‘snap-store’ has running apps, pids: 2205. In the case, just kill snap-store using the ID number (replace 2205 to yours):

sudo kill -9 2205

Then, re-run the snap refresh command.

2. After that, just press Super (windows logo) key to open overview screen, search and launch “App Center”.

How to Restore

To revert back the previous ‘Ubuntu Software’, also press Ctrl+Alt+T on keyboard to open terminal and run command:

snap refresh snap-store --channel=latest/stable/ubuntu-22.04

Ubuntu 23.10, code name “Mantic Minotaur”, is in Beta stage now!

The Ubuntu team announced the release today on Sep 22:

This Beta release includes images from not only the Ubuntu Desktop, Server, and Cloud products, but also the Edubuntu, Kubuntu, Lubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Unity, and Xubuntu flavours.

Ubuntu 23.10 features GNOME Desktop 45, Kernel 6.5, and some other exciting new features!

They include a new App Center based on Google’s Flutter toolkit. Compare to the previous Ubuntu Software, it’s fast and just works!

New App Center

The release also features a new firmware updater, for users who are running Ubuntu on real machine. The features also include TPM based full disk encryption, workspace indicator in top-left, Super + S shortcut to open Quick Settings, new Tiling Assistant extension.

The Ubuntu installer now defaults to the ‘Minimal’ installation, though the previous “Full” installation is still available for choice.
Other changes include:

  • Polished ‘Files’ and Settings pages.
  • Use deb822 .sources files for PPA.
  • Network manager now uses Netplan as it’s default settings storage backend
  • Enable Wayland by default for Firefox.
  • New package for the old classic font, that is default in Ubuntu 22.04 and earlier.
  • Drag and drop saving web image into file.
  • Default wallpaper now has dark variant.
  • Firefox 117, Thunderbird 115, LibreOffice 7.6.

Toolkit updates:

  • GCC 13.2.0, binutils 2.41, glibc 2.38.
  • Python 3.11.5 (3.12 rc in the archive), Perl, 5.36.0, LLVM 16 (17 is available in the archive), rustc 1.71.
  • OpenJDK 17, OpenJDK 21, .NET 7, golang 1.21.

For more about Ubuntu 23.10, see the official release note.

Get Ubuntu 23.10

Ubuntu 23.10 final is planned for October 12. The current Beta as well as final release is available to download at the link below:

For other download links and upgrade channel, see the official announcement.