Archives For Howtos

There are several Gnome Shell extensions to display system resource usage in Ubuntu, but in this tutorial I’m going to introduce an indicator that works in not only GNOME, but also Unity, MATE, and Budgie desktop environments.

It’s Indicator-SysMonitor, a free and open-source applet developed by the leader of Ubuntu Budgie team.

With it, user can display the usage and/or temperature of the following system resource in top-panel:

  • average CPU usage.
  • NVIDIA GPU utilization.
  • Memory usage.
  • network upload/download speed.
  • CPU, NVIDIA GPU temperature.
  • Swap usage.
  • Public IP address.

Most important is that user can customize the output, by setting which one or ones to display, in which order with which text. User just need to click the indicator on panel to open ‘Preferences’ dialog from pop-down menu, and format the output code in ‘Advanced’ tab.

How to Install Indicator-Sysmonitor

The developer has an Ubuntu PPA contains the packages for Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.10, and even the next Ubuntu 23.04.

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

sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor

Type user password when it asks and hit Enter to continue.

2. For the old Ubuntu 18.04, you need to manually refresh package index after adding PPA:

sudo apt update

3. And, install the indicator applet via command:

sudo apt install indicator-sysmonitor

Finally, search for and open the applet like a normal application (it has same icon to System Monitor).

And click on the applet to open Preferences, and turn on start at login, configure output layout, refresh interval, etc.

Uninstall Indicator-Sysmonitor

You can close the applet by clicking on it in panel and select “Quit”. And remove the package at any time by running a single command in terminal window:

sudo apt remove indicator-sysmonitor

Also remove the PPA repository, either by running the command below or open “Software & Updates”and remove source line under “Other Software” tab.

sudo add-apt-repository --remove ppa:fossfreedom/indicator-sysmonitor

There are several Lightroom alternative applications for editing your photos. LightZone is one of them works in Linux.

It’s a free and open-source professional-level digital darkroom and photo editor written in Java. It has less features than the popular Darktable and RawTherapee, but it’s good at processing black and white photos.

LightZone features include:

  • Windows, macOS, and Linux support.
  • Support RAW files for a variety of cameras.
  • Batch processing.
  • Range of available style filters
  • Many non-destructive tools
  • Raw tone curve modification

How to Install LightZone in Ubuntu:

The software has an official PPA so far with Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Linux Mint 21/20 support.

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

sudo add-apt-repository ppa:lightzone-team/lightzone

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

2. For Linux Mint and old Ubuntu 18.04, user need to manually refresh the system package index by running command:

sudo apt update

3. Finally, install this photo editing tool via command:

sudo apt install lightzone

With the PPA, you don’t have to run the apt command again and again, the future release page will be available to install in Software Updater (Update Manager) utility.

After installation, search for and launch the editor either from start menu or ‘Activities’ overview depends on your system.

Uninstall LightZone

To remove the photo editor, open a terminal window and run command:

sudo apt remove --autoremove lightzone

And remove the PPA repository either via “Software & Updates” utility under Other Software tab, or by running command:

sudo add-apt-repository --remove ppa:lightzone-team/lightzone

Wine, the compatibility layer for running MS Windows apps in Linux and macOS, announced new stable 8.0 release after 1 year of development.

Wine 8.0 has finally completed PE conversion. All modules can be built in PE format. Meaning various features to be supported, such as copy protection, 32-bit applications on 64-bit hosts, Windows debuggers, x86 applications on ARM, etc.

Wow64 (Microsoft’s subsystem for running 32 bit applications on 64-bit Windows) is implemented for essentially all Unix libraries. Once the legacy calls removed, it will be possible to run 32-bit Windows applications on Linux without any 32-bit Wine libraries.

Other changes in Wine 8.0 include:

  • Print Processor architecture implemented.
  • Enable light theme for configuration by default.
  • Convert the graphics drivers to run on the Unix side of the syscall boundary.
  • Effects are supported in Direct2D.
  • Direct3D improved with more graphics cards support.
  • Greatly improved the controller hotplug support.
  • Support Sony DualShock and DualSense controllers when the hidraw backend is used.
  • Introduce Windows.Gaming.Input API with hotplug notifications, force feedback effects and haptics, as well as trigger rumble support.
  • Mono engine updated to 7.4.0

How to Install Wine 8.0 in Ubuntu and Linux Mint

Winehq website now has a good tutorial teaching about how to install Wine packages in Ubuntu based systems. And, here is a re-write with more descriptions.

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

sudo dpkg --add-architecture i386

This command makes it possible to install 32-bit packages in 64-bit Ubuntu, since Wine at the moment still requires a lot of 32-bit libraries.

2. Then, run command in terminal to create “keyrings” folder under ‘/etc/apt’ directory for storing the keys. With -p flag, it ignores error if that folder already exist.

sudo mkdir -p /etc/apt/keyrings

3. Next, use wget command line downloader to download the GPG key for winehq repository, and store in the folder you created in last step.

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

4. Now, run command to download the config file for Winehq apt repository and store in ‘/etc/apt/sources.list.d/’.

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -sc)/winehq-$(lsb_release -sc).sources

IMPORTANT: This command is for Ubuntu 22.10, 22.04, 20.04, 18.04 only! For Linux Mint, Zorin OS, etc, you have to replace the “$(lsb_release -sc)” in command with the codename of Ubuntu version your system is based on:

  • For Ubuntu 22.10 based system, use kinetic.
  • For Ubuntu 22.04 based system (e.g., Linux Mint 21), use jammy instead.
  • For Ubuntu 20.04 based (e.g., Zorin OS 16.x), use focal.
  • For Ubuntu 18.04 based system, use bionic

5. After setting up the Wine’s official apt repository, run the command below to fetch package index:

sudo apt update

In the output, there should be a output line indicates Get x https://dl.winehq.org/wine-builds/ubuntu xxxxx InRelease.

6. Finally, install Wine stable 8.0, as well as dependency libraries via command:

sudo apt install --install-recommends winehq-stable

7. After successfully installed Wine packages, run command to generate the config files and open the configuration dialog.

winecfg

There you can verify Wine version and change the settings of this layer.

8 Finally, right-click on your EXE file in file manager and select “Open With Wine Windows Program Loader” (or select it from open with other applications dialog). See if Wine supports your Windows app.

How to Remove Wine 8.0

To remove the software package as well as dependency libraries, simply open terminal and run command:

sudo apt remove --autoremove winehq-stable

Also, remove the Wine apt repository by removing the source file:

sudo rm /etc/apt/sources.list.d/winehq-*.sources

And remove the key file via:

sudo rm /etc/apt/keyrings/winehq-archive.key

Finally, remember to refresh package index via sudo apt update command.

Going to buy a new monitor or laptop, or want to calculate whether it’s a HiDPI display? Here’s a handy app can help!

I previously thought that 4K and 8K displays are HiDPI, but 720p that I’m being using is LoDPI. It’s 100% wrong! HiDPI, stands for High Dots Per Inch, also known by Apple’s “Retina Display”. Meaning screens with a high resolution in a relatively small format.

A HiDPI monitor may be good for displaying photo images or playing FPS games, but not all software behaves well in high-resolution mode yet. If you’re going to buy a monitor or calculate existing display DPI, then here’s a good app for choice.

It’s ‘Dippi’, a free and open-source GTK4 application developed by a GNOME Foundation member.

With it, you just need to tell: laptop or desktop, monitor size (inches), and screen resolution. Then, it shows you aspect ratio and DPI value, as well as display’s density.

They include:

  • Very Low DPI,
  • Fairly Low DPI,
  • Ideal for LoDPI,
  • Potentially Problematic,
  • Ideal for HiDPI,
  • Fairly High for HiDPI, or
  • Too High DPI

Each value has some texts below to tell the text and UI feeling (too small or too large) at typical viewing distances. As a GTK4 app, it looks good in Ubuntu, Fedora and other Linux with GNOME desktop. And, it automatically changes the UI color between light and dark mode, to follow system color scheme.

How to Install Dippi

Dippi is also available as an online service, you can visit this page to analyze your display.

For most Linux users, it’s available to install as universal flatpak package in Flathub.org.

Ubuntu user can do following steps one by one to install the package:

  1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to make sure Flatpak is enabled:
    sudo apt install flatpak

    For the old Ubuntu 18.04, add this PPA repository before running apt install command.

  2. Then, install the application by running command:
    flatpak install https://dl.flathub.org/repo/appstream/com.github.cassidyjames.dippi.flatpakref

    Like normal apps, you can search for and launch it from either start menu or ‘Activities’ overview depends on your desktop environment.

How to Remove Dippi

To remove the app installed as Flatpak, open terminal and run command:

flatpak uninstall --delete-data com.github.cassidyjames.dippi

Also clear useless runtime via flatpak uninstall --unused.

There are quite a few ways to transfer files between different machines. For Ubuntu and most other Linux, here’s an easy way for choice.

Usually, I use a USB cable or a messenger app for transferring photo images between my personal PC and mobile devices.

However, my USB cable is always NOT near at hand and I hate to scan QR code again and again on PC for logging 3rd app. In this case, creating a temporary http file server with Python is an easy and good choice.

Upside and downside

Python is pre-installed in most Linux Distros. So this is an universal method for Linux. It also works in Windows and macOS with Python programming language installed.

As a simply http server, any devices with a web browser can download (or upload) files from/to the server side either over local network or internet.

However, http is NOT designed for transferring files. It’s OK to handle small files (e.g., photo images and short videos less than a few hundred MB). But for large files with a few GB or more file size, it may not work! As well, it’s NOT secure for accessing important files outside from local network.

Single command to create a Python http server:

For those who are new to Linux, user may first open file manager, navigate to the folder that contains the files to share with other device, right-click on blank area and select “Open in Terminal”.

It will open a terminal window and automatically navigate to that folder as working directory.

Or, you can also open terminal from start menu and run cd command to navigate directory. For example, run the command below to navigate to user’s Pictures folder:

cd ~/Pictures

Then, run the single command to start a http file server (For some Linux, replace python3 with python in command):

python3 -m http.server

By default, it listens to port 8000. If the port is already in use, use python3 -m http.server 9090 to set another port number (change number 9090 as you want).

After that, visit http://ip-address:8000 (change number 8000 if you set another port) in any device via a web browser. You can then open and/or right-click save as to download any file from that folder.

Create python http server with upload support

1. If you want to send files from any device to Ubuntu Linux, open terminal and run command:

python3 -m pip install --user uploadserver

Install pip first via sudo apt install python3-pip if the command above does not work. This command will install a Python module uploadserver.

2. Then open or navigate to your desired folder in terminal window, and run command to create simple http file server with both download and upload support:

python3 -m uploadserver

Also specify port number if you want, for example, python3 -m uploadserver 9990

3. Finally, visit http://ip-address:8000 in any device via web browser can access and download files. Or, go to http://ip-address:8000/upload for uploading files.

For security reason, you may add a token authentication so client machines need to verify before being able to upload a file. To do so, run the command below instead in Ubuntu Linux:

python3 -m uploadserver -t password_here