Archives For jimingkui

UPDATE: for Ubuntu 22.04, see this new tutorial instead!

Want to try out the Pipewire sound server? It’s easy to do this in Ubuntu 21.10 / Ubuntu 21.04, and here’s how!

PipeWire is a server for handling multimedia on Linux. Its most common use is for Wayland and Flatpak apps to implement audio and video playback and capture with minimal latency. And it offers seamless support for PulseAudio, JACK, ALSA, and GStreamer based applications.

Use Pipewire to replace PulseAudio in Ubuntu 21.10 & Ubuntu 21.04:

Ubuntu now has better Pipewire support in recent releases. The service is even running out-of-the-box in Ubuntu 21.10.

1.) Update system

Firstly, press Ctrl+Alt+T on keyboard to open terminal and run command to install all available package updates (recommend for those still running Ubuntu 21.04).

sudo apt update && sudo apt upgrade

A system restart may be required if you haven’t done system package update for long period of time.

2.) Install the latest Pipewire libraries:

Thanks to the “PipeWire Upstream PPA“, it contains the latest Pipewire libraries to make all the things easy!

Open terminal and run the command below to add the PPA:

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream

Type user password when it asks, while no visual feedback, and hit Enter to continue.

After adding PPA, run command to install pipewire:

sudo apt install pipewire

For GStreamer, JACK, Bluetooth support, install more libraries via command:

sudo apt install gstreamer1.0-pipewire libpipewire-0.3-{0,dev,modules} libspa-0.2-{bluetooth,dev,jack,modules} pipewire{,-{audio-client-libraries,pulse,media-session,bin,locales,tests}}

After installation, restart your system.

3.) Verify Pipewire:

In next boot, open terminal and run “pactl info” command will tell that Pipewire is in use even without any configuration.

[OBSOLETE] Replace PulseAudio with Pipewire in Ubuntu 21.04:

Ubuntu 21.04 has enabled support for pipewire officially. And here’s how I enabled it in my laptop:

1.) Firstly, open terminal either from system application launcher or by pressing Ctrl+Alt+T on keyboard.

When it opens, run command to install the pipewire-audio-client-libraries package:

sudo apt install pipewire-audio-client-libraries 

2.) Then create an empty file by running command:

sudo touch /etc/pipewire/media-session.d/with-pulseaudio

3.) Create pipewire-pulse service files by copying the example files:

sudo cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/

4.) You don’t have to remove the PulseAudio, just disable it and enable Pipewire:

  • Run command to reload the new service files:
    systemctl --user daemon-reload
  • Disable PulseAudio service via command:
    systemctl --user --now disable pulseaudio.service pulseaudio.socket
  • And finally enable the Pipewire services:
    systemctl --user --now enable pipewire pipewire-pulse

5.) I followed the previous steps via Debian Wiki, but it didn’t work. The system tray sound icon’s gone, and pactl info outputs “Connection failure: Connection refused”.

To workaround the issue, enable pipewire-media-session service may work by running command:

systemctl --user --now enable pipewire-media-session.service

Finally reboot your machine.

And check if Pipewire is working, run pactl info command. And it’s working if you see “PulseAudio (on PipeWire 0.3.24)” in output.

KeePass password manager released version 2.48 a few days ago. Here’s how to install it in Ubuntu 21.04, Ubuntu 20.04, Ubuntu 18.04 via PPA.

KeePass 2.48 introduces version 4.1 of the KDBX file format, which supports various new features, including:

  • group tags support,
  • ability to disable password quality estimation
  • remember the previous parent group when moving an entry/group into a different group
  • custom icons now have names and last modification or deletion times
  • save last modification time for custom date items.

Other changes include:

  • Add command ‘Move to Previous Parent Group’
  • Add support for loading images with Exif orientation tags.
  • Enhanced the LastPass import module to support CSV files created by the latest versions.
  • Enhanced the nPassword import module to import group tags.
  • Various user interface improvements.

How to Install KeePass 2.48 in Ubuntu via PPA:

KeePass2 is still available to install via an Ubuntu PPA. So far, the PPA supports for Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, and Ubuntu 21.04.

1.) Open terminal and run command to add the PPA:

sudo add-apt-repository ppa:ubuntuhandbook1/keepass2

2.) Then refresh system package cache via command:

sudo apt update

3.) Finally install the mono based password safe package:

sudo apt install keepass2

Uninstall KeePass2:

To remove the software package, run command in terminal:

sudo apt remove --autoremove keepass2

And remove the Ubuntu PPA via command:

sudo add-apt-repository --remove ppa:ubuntuhandbook1/keepass2

UPDATE: Ubuntu 22.04 has better pipewire support. The system default package runs quite good though PPA provides more recent package. See this tutorial for more.

This simple tutorial shows how to install the latest PipeWire server via an Ubuntu PPA in Ubuntu 20.04, Ubuntu 21.04, Ubuntu 21.10, and Ubuntu 18.04

PipeWire is a new low-level multimedia framework, aims to offer capture and playback for both audio and video with minimal latency and support for PulseAudio, JACK, ALSA and GStreamer based applications. And it also work with sandboxed Flatpak applications.

PipeWire is available in Ubuntu universe repositories, and it’s officially supported since Ubuntu 21.04. While the default version is always old, a fan of Arch user maintains an Ubuntu PPA with the latest packages so far for all current Ubuntu releases.

1.) Add the Ubuntu PPA:

To add the PPA, firstly open terminal either from system app launcher or by pressing Ctrl+Alt+T on keyboard. When it opens, run command:

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream

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

2.) Install or update PipeWire:

After adding the PPA, you can either update the engine via Update Manager (Software Updater):

or install it via command:

sudo apt install pipewire

For GStreamer 1.0, bluetooth plugins, jack client, also install gstreamer1.0-pipewire, libspa-0.2-bluetooth, libspa-0.2-jack packages.

Once installed, you can follow this guide to replace PulseAudio with Pipewire audio server.

How to restore stock PipeWire packages:

For any reason, you can purge the Ubuntu PPA to downgrade the packages to the stock version. To do so, run command:

sudo apt install ppa-purge && sudo ppa-purge ppa:pipewire-debian/pipewire-upstream

This is a step by step guide shows how to install the Eclipse IDE in Ubuntu 24.04, Ubuntu 22.04, Ubuntu 22.04, and their based systems, such as Linux Mint 22/21.

For Java developers, Eclipse is easy to install in Ubuntu through Snap package from either App Center or Ubuntu Software (for 22.04 and earlier). Though it runs in sandbox environment.

If you want to use Eclipse for C/C++, PHP, or other language developing, or you don’t like running in sandbox, then you may use the official installer.

1. Download & start Eclipse Installer:

Firstly go to the official download page, and grab the installer:

Then extract the tarball, and navigate into the result folder. Right-click and select “Run” the eclipse-inst file to start the installer.

For choice, you may right-click on blank area in that folder and select “Open in Terminal“, then run ./eclipse-inst command in the pop-up terminal instead:

2. Install Eclipse:

When the installer wizard opens, choose “Eclipse for Java Developers”, “Eclipse for C/C++ Developers”, or other options depends on which you want to install.

Next, choose either a local Java VM (if installed) or select download one from web, and change installation folder if you want (default selections are OK). Finally, click on “Install” button, and accept the license to start installing the IDE:

The software is by default installed to the user home folder for single user use. Once installed, you can launch it either from system application launcher or the desktop shortcut (need to first right-click and choose “Allow Launching”).

How to Remove Eclipse Completely:

The software is installed by default in user’s home directory. Simply open the file manager, and remove the eclipse folder and eclipse-workspace folder.

For the desktop shortcut, just move it to trash. For the app icon in start menu, press Ctrl+Alt+T to open terminal and run commands:

  • navigate to app shortcut folder for local user:
    cd .local/share/applications/
  • remove all Eclipse related desktop entry files:
    rm *eclipse*.desktop epp*.desktop

Want to make a certain folder different to others in Ubuntu? You can change the icon color and add emblem via Nautilus extension.

Nautilus, the default file manager in Ubuntu, has an extension called Folder Color. It allows to change the color of selected folder or folders into: Blue, Blown, Green, Gray, Pink, Purple, Red and Yellow.

You can also add a emblem, e.g., Important, In Process, Favorite, Finished, and New. And reset to default is also available in folders’ context menu.

Install Folder Color:

The extension is available in Ubuntu universe repository. However, it’s not well working with the default Yaru theme.

For Ubuntu 20.04, So you have to first add the developer’s PPA with Yaru integration. To do so, open terminal (Ctrl+Alt+T) and run command:

sudo add-apt-repository ppa:costales/yaru-colors-folder-color

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

For Ubuntu 22.04, add another PPA instead:

sudo add-apt-repository ppa:pakaoraki/yaru-colors-folder-color

Then install Folder Color, as well as Yaru integration via command:

sudo apt install folde-color yaru-colors-folder-color

To apply change, run command to restart Nautilus file manager:

nautilus -q

Finally, open file manager, right-click on a folder and enjoy the new icon colors:

Uninstall:

To remove the Ubuntu PPA, open terminal and run command:

sudo add-apt-repository --remove ppa:pakaoraki/yaru-colors-folder-color
sudo add-apt-repository --remove ppa:costales/yaru-colors-folder-color

And, to remove the folder color extension, run command:

sudo apt remove --autoremove folde-color yaru-colors-folder-color

Finally, run nautilus -q to apply change.

qBittorrent, free and open-source Qt5 based Bittorrent client, released version 4.3.5 a few days ago.

qBittorrent 4.3.5 is the last release in the 4.3.x series. And it’s going to drop support for Ubuntu 20.04 in the next release since it has an outdated Qt5 libraries.

Users who prefer qBittorrent can still get updates for Ubuntu 20.04 through the Flatpak package, since it’s a containerised package format bundle with most run-time libraries.

Changes in qBittorrent 4.3.5 include:

  • Move cursor to the end when autofilling URL/hash in “Download from URLs” dialog
  • Sort invalid QDateTime values after valid values
  • Fix tabChangesFocus attribute in “Edit trackers” dialog
  • Update DynDNS register url
  • Handle “not enough disk space” error more graciously
  • Correctly draw progress background with stylesheet
  • WEBUI: Fix magnet url from the search facility
  • WEBUI: Revise folder monitoring functions
  • WEBUI: Fix magnet url from the browser
  • WEBUI: Allow to specify file indexes in torrents/files API
  • WINDOWS: NSIS: Allow more strings to translated
  • WINDOWS: NSIS: Update Italian, German, Estonian, Russian, PortugueseBR translations.
  • LINUX: Fix D-Bus Notification desktop-entry field
  • MACOS: Don’t use executable name as CFBundleName value
  • Lower Qt requirement to 5.11
  • Clarify that the license is GPLv2+

How to Install qBittorrent 4.3.5 via PPA:

The official qBittorrent PPA has built the new release packages for Ubuntu 20.04, Ubuntu 20.10, and Ubuntu 21.04.

1. To add the PPA, open terminal by either pressing Ctrl+Alt+T on keyboard or searching for “Terminal” from application menu. When it opens, run command:

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable

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

2. If an old version was installed on your system, upgrade it via Software Updater,

or run following commands to install /upgrade qBittorrent in terminal:

sudo apt update

sudo apt install qbittorrent

Uninstall:

To remove qBittorrent PPA, either go to Software & Updates -> Other Software, or run command in terminal:

sudo add-apt-repository --remove ppa:qbittorrent-team/qbittorrent-stable

To remove the bittorrent client, either use your system package manager or run command:

sudo apt-get remove --autoremove qbittorrent

This tutorial shows how to set custom screen resolution in current Ubuntu releases, including Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 24.04, on either Wayland or Xorg session.

So this tutorial is going to show you another way to add your favorite screen resolution if it’s not available in Display settings.

In the case, I’ve the default 1920X1080 (16:9) resolution. However, I prefer 1600X900 (16:9) a little more which is not available in settings.

Before getting started:

In this tutorial I’m going to add video mode option as Kernel parameter. The good side is that it works on both Wayland and Xorg.

Downsides includes:

  • You can’t set custom resolution higher than the maximum one in Display settings. In my case (see the picture above), X resolution must be less than 1920, and Y resolution have to less than 1080.
  • If you have dual-boot or multi-boot systems, below steps may not work for “other Linux” in Grub boot menu. For instance, I’ve Ubuntu 21.04 and Ubuntu 20.04 dual-boot in my laptop, the startup boot menu is handled by Grub for Ubuntu 21.04. It lists Ubuntu 21.04 as the first menu entry, custom Kernel parameter does not work for Ubuntu 20.04 in my case.

And after adding the parameter, the custom resolution should appear in Display settings, 1600×900 for instance:

How to Tell the Display Device Name in Ubuntu:

Firstly, you have to find out the current Display name. To do so, open terminal from the system application launcher:

When terminal opens, run command:

for p in /sys/class/drm/*/status; do con=${p%/status}; \
echo -n "${con#*/card?-}: "; cat $p; done

This is a single command separated into 2 lines. It checks all the sub-folders under ‘/sys/class/drm‘ directory. For the sub-folder includes ‘status‘ file with ‘connected‘ as content, the folder name exclude ‘card?-‘ part is the device name we need.

As the picture shows, it’s eDP-1 in my case.

DON”T edit the files

How to add video mode kernel parameter:

Option 1.) edit Grub configuration file.

a.) Open terminal from system app launcher. When it opens, run command to edit the config file:

sudo gnome-text-editor /etc/default/grub

Replace gnome-text-editor depends on your DE or Ubuntu edition, such as gedit for Ubuntu 22.04 and earlier, or nano command line text editor for most desktops.

When it opens, add video=eDP-1:1600×900@60, in my case, as value for “GRUB_CMDLINE_LINUX_DEFAULT”.

IMPORTANT: you have replace video=eDP-1:1600×900@60:

  • eDP-1 is the Display Device Name, you can find it in previous step.
  • 1600×900 is the desired screen resolution. Replace it with yours.
  • 60 is the refresh rate. It’s OK to skip it, so it will be video=eDP-1:1600×900

There are more flags for the video mode kernel parameter. See the documentation for detail.

b.) After saving the changes (for nano, press Ctrl+S, then Ctrl+X.) Finally apply changes by running command:

sudo update-grub

And reboot.

Option 2.) use Grub Customizer:

Grub-Customizer, the popular graphical tool offers an option to add the Kernel parameter.

Install it from Ubuntu Software if you don’t have it. Then launch it and navigate to General Settings tab. Finally add the value and click on Save button.

Set Custom Resolution for Multiple Displays:

If you have multiple monitors connected to your Ubuntu machine. It’s OK to set one screen resolution for all displays, or use more “video=” parameter for each display.

a.) To set one screen resolution for all displays, just skip the device name. For instance:

video=1600x900@60

It will add 1600×900 screen resolution with 60 Hz refresh rate for all the connected displays.

b.) To add more “video=” parameter. For instance, I have two displays: eDP-1 and DP-1 connected. And to add 1360×700 for eDP-1 and 1600×900 for DP-1, use:

video=eDP-1:1360x700@60 video=DP-1:1600x900@60

That’s all. Enjoy!

NVIDIA graphics driver for Linux released version 465.27 a day ago with new Laptop GPUs support and a few bug-fixes.

In NVIDIA 465.27, following new GPUs are supported:

  • T600 Laptop GPU
  • T1200 Laptop GPU
  • RTX A5000 Laptop GPU
  • RTX A4000 Laptop GPU
  • RTX A3000 Laptop GPU
  • RTX A2000 Laptop GPU

There are also some fixes in the release including:

  • Fixed a bug that could prevent a system from resuming from suspend when DisplayPort activity occurred while the system was suspended.
  • Fixed a regression that prevented eglQueryDevicesEXT from correctly enumerating GPUs on systems with multiple GPUs where access to the GPU device files was restricted for some GPUs.
  • Fixed a regression that could cause system hangs when changing display resolution on SLI Mosaic configurations.
  • Fixed a bug that could result in blank displays when driving multiple displays at the same resolution using active DisplayPort dongles.

How to Install NVIDIA 465.27 in Ubuntu:

Ubuntu now builds the latest NVIDIA drivers and pushes them via its own security & updates repositories.

Just wait! It’ll be available in next few days. At that time, launch Additional Drivers utility and you’ll see the driver available to install.

If you can’t wait, go to NVIDIA website and download the .run installer package (not recommended for beginners):

Want to create a bootable live-USB for installing Ubuntu on your machine? Well, here’s how to do it in Windows, Linux, or Mac OS.

I used to use UNetbootin to create bootable Live USB. However, the USB drive does not boot after writing with recent Ubuntu ISO images. So here I’m going to introduce you few other USB writing tools.

Though I prefer the style of Ventoy, it however does not install in my USB stick for unknown reason. If you need bootable USB with other data transfer usage unaffected, try it!

Requirements:

Firstly you need an USB stick with at least 4 GB storage. And backup your data before getting started.

Also a PC, Laptop / Notebook, or even Raspberry Pi running Linux, Windows, or Mac OS.

And download Ubuntu ISO image from either releases.ubuntu.com or ubuntu.com/download

Create Bootable USB from Ubuntu:

If you’re now working on Ubuntu, that’s great, simply search for and launch Startup Disk Creator. Other Ubuntu based systems can get it by installing the usb-creator-gtk package.

When the tool opens, click on “Other …” and select the Ubuntu ISO image. Plug-in USB stick and it will auto-detect it.

Finally click on “Make Startup Disk“, click OK to confirm and type your user password to get start.

When done, it should prompt you installation complete. That’s it.

Create Bootable USB from Other Linux, Windows, Mac OS.

For all other systems I’d recommend USBimager if no system built-in tool available, though there are many other USB creating tools in the web.

USBimager is a free and open-source tool with really simple interface. It small in package size with less than 200 KB. And it works on old systems, minimum system required Windows XP, Mac OS 10.13. Also it’s available for Raspberry Pi.

1.) Firstly select download the USBImager package from your system:

2.) Then install and/or launch the tool, select ISO image via three dots “…” button and choose your USB stick from drop-down menu after plugged in.

Finally click on “Write” to start creating the USB installer.

The bottom bar will show the process info with data size and time left.

When done, you’ll see “Done. Image written successfully in xxx” message in the bottom.

That’s it. Enjoy!

KDE’s Kdenlive video editor 21.04 was released today with lots of usability improvements and some great new features.

Kdenlive 21.04 introduced new Speech-to-Text feature which automatically transcode audio to text, and it supports for 17 languages and dialects using the official models.

The release also features new Media Browser, which can be enabled from View menu. With it, you can easily browse through file system and drag’n’drop add clips to the Bin or Timeline.

And there are new effects typewriter effect with 3 animation modes, Alpha Strobe effect to text, images, or videos, Effect Zones to apply effects to specific regions of tracks or the timeline.

Other features in Kdenlive 21.04 include:

  • Zoombars in the timeline.
  • New icons and functions for the effect’s keyframe panel.
  • New online resources widget
  • Add AV1 render profile.
  • Re-enable audio playback on reverse speed.
  • Add “unused clip” filter in Project Bin.
  • Add channel selection to audio waveform filter.
  • Add ITU 2020 colorspace in clip properties.
  • Treat GIFs as video, not as image.

How to Install Kdenlive 21.04 in Ubuntu:

The kdenlive team ppa has made the latest packages for Ubuntu 20.04, Ubuntu 20.10, Ubuntu 21.04, Linux Mint 20.

1.) Add Ubuntu PPA:

Open ‘terminal’ from your system application menu, then run command to add the PPA:

sudo add-apt-repository ppa:kdenlive/kdenlive-stable

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

2. ) Install or Upgrade Kdenlive:

If an old version of kdenlive was installed, you can upgrade it via Update Manager:

Or simply run command in terminal to install the video editor:

sudo apt install kdenlive

NOTE for non-KDE users, Kdenlive will be installed along with a large list of KDE libraries.

Uninstall:

To purge the PPA as well as downgrade Kdenlive package, run command in terminal:

sudo apt install ppa-purge && sudo ppa-purge ppa:kdenlive/kdenlive-stable

To remove the PPA only, run command:

sudo add-apt-repository --remove ppa:kdenlive/kdenlive-stable

And to remove Kdenlive, run command:

sudo apt remove --autoremove kdenlive kdenlive-data