Archives For November 30, 1999

This is a step by step beginner’s guide shows how to install Sublime Text code editor in Ubuntu 22.04 and Ubuntu 24.04.

Sublime Text is available to install in Ubuntu Linux through 3 different ways. They include:

  • Snap package – maintained by contributors.
  • Deb pacakge – through its official repository.
  • Flatpak package (Sublime Text 3) – maintained by contributors.

Option 1: Snap package

A group of contributers maintain the text editor in Snap package format, which runs in sandbox. The package so far supports amd64 (Intel/AMD) and arm64 (Raspberry Pi) devices.

Ubuntu 20.04 and higher can simply search for and install it from Ubuntu Software (or App Center):

Sublime Text Snap package in Ubuntu Software / App Center

The snap package runs in sandbox and always up-to-date since it receives updates automatically. The only downside could be that some do NOT like sandboxing apps.

For those prefer Linux commands, the package also can be installed by running the command below in terminal:

sudo snap install sublime-text --classic

Option 2: Official Apt repository (.deb package)

This is the official .deb package works in Ubuntu, Linux Mint, Debian, and even Raspberry Pi OS (arm64).

1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to make sure ‘https’ source is supported:

sudo apt install apt-transport-https

2. Add the repository key

The sublime text website still use the ‘apt-key‘ command in its document, which is deprecated.

For security reason, Debian has updated the policy. And, it’s recommend to use the command below instead to install the key:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/sublimehq-pub.gpg

It will download the key from its website, convert it to un-readable encrypted key, and put into “/etc/apt/keyring” directory.

3. Add the official repository

Next, run the command below to create a source file and edit it via Gnome text editor:

sudo gnome-text-editor /etc/apt/sources.list.d/sublime-text.list

For Ubuntu 22.04 and earlier, replace gnome-text-editor with gedit. Or use mousepad for XFCE, pluma for MATE, or nano command line text editor that works in most desktop environments.

When the file opens, add the following line (it’s a single line) and save it.

deb [signed-by=/etc/apt/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/

This step can be done alternatively by running the single command below in terminal:

echo "deb [signed-by=/etc/apt/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

4. Now, run the command below to refresh system package cache:

sudo apt update

In the output, it should print a line looks like “Get: x https://download.sublimetext.com apt/stable …

5. Finally, install the code editor from that repository by running command:

sudo apt install sublime-text

Option 3: Flatpak package

Sublime Text 4 is NOT available as Flatpak so far. But for the old version 3, you may install it by running the commands below one by one in terminal.

NOTE: Like Snap, the Sublime Text as flatpak is also un-official package maintained by contributors, runs in sandbox.

Firstly, press Ctrl+Alt+T to open terminal and run command to install Flatpak daemon:

sudo apt install flatpak

Then, install Sublime Text 3 via Flatpak by running command:

flatpak install https://dl.flathub.org/repo/appstream/com.sublimetext.three.flatpakref

Uninstall Sublime Text:

For the Snap package, remove it either using Ubuntu Software or by running command in terminal:

sudo snap remove --purge sublime-text

For the Flatpak package, use the command to uninstall the package:

flatpak uninstall --delete-data com.sublimetext.three

and cleanup useless run-times via flatpak uninstall --unused.

For the official .deb package, remove it by running command:

sudo apt remove --autoremove sublime-text

The apt repository will not display in “Software & Updates” utility, so get rid of it by running command to remove the source file:

sudo rm /etc/apt/sources.list.d/sublime-text.list

And remove the key file by running command:

sudo rm /usr/share/keyrings/sublimehq-pub.gpg

Summary:

Here I introduced 3 ways to install Sublime Text in Ubuntu. The Snap is the easiest, which is available in Ubuntu Software, but the official apt repository is recommended! For those still looking for the old Sublime Text 3, the Flatpak package is available for choice.

Got some beautiful photo images? Let me show you how to set them as desktop slideshow, so it will be your Ubuntu background wallpaper and switch automatically in certain time interval.

Option 1: Use Shotwell

Using Shotwell is the easiest way to do the job in Ubuntu. You don’t need to install anything, as it available out-of-the-box.

Just search for and open the app from Activities overview screen. Import (via File menu) and select your photos (Ctrl or Shift + Click), then you may use “File -> Set as Desktop Slideshow” option to set them as wallpaper and change automatically.

You may set time interval from 5 seconds up to 1 day. And, the slideshow will work even in next boot, until you select another wallpaper in “System Settings -> Background” page.

Option 2: Use Gnome Extension

There’s an extension can do the job, not only for Ubuntu, but also for Fedora and other Linux using GNOME desktop (e.g., Arch, Manjaro, CentOS, etc).

It’s light, simple and just do the basic function as well as options to manually go next wallpaper, and stop changing automatically.

Install the extension

Firstly, press Ctrl+Alt+T on keyboard to open terminal and run the command to install the agent package:

sudo apt install chrome-gnome-shell

Secondly, turn on the toggle icon in the link page below to install the extension.

NOTE: The pre-installed Firefox does not support installing Gnome Extension so far, use another browser or install the Deb version instead. And, for the first time, you need to install browser extension and refresh the page to see the toggle button.

Option 3: Use Variety

Besides automatically changing your desktop wallpaper, Variety is a good choice that also supports for downloading photo images from flickr, deviantart, unsplash, etc.

What makes it different is that it supports displaying custom text and digital clock on wallpaper. As well, it can apply random effect to your wallpapers, e.g., blur, oil painting.

To install Variety in Ubuntu, either press Ctrl+Alt+T on keyboard to open terminal and run command:

sudo apt install variety

or just search for and click install in Ubuntu Software.

Option 4: Use Wallch

Wallch was a popular wallpaper managing app for Linux. Though it’s not been updated for a long period of time, the basic desktop slideshow function still works. And, it can be a choice for old desktop environments.

However, the live earth, daily picture, wallpaper clocks and live website features never work in my case.

To install Wallch, either use Ubuntu Software or run command in terminal:

sudo apt install wallch

Option 5: Group your images via XML file

If you would like to add your desktop slideshow as a choice in Background selection page, then this is for you.

1.) Create XML:

Firstly, you need to create a XML file that defines which photo images to use, how long each wallpaper will be displayed, transition time, etc.

To make things easy, you may install “Dynamic Wallpaper Editor” by running following 2 commands one by one in terminal (Ctrl+Alt+T):

sudo apt install flatpak
flatpak install https://dl.flathub.org/repo/appstream/com.github.maoschanz.DynamicWallpaperEditor.flatpakref

2.) Make use of XML:

After creating XML file or files, you need to put them into “~/.local/share/backgrounds” folder.

  • Run command in terminal (Ctrl+Alt+T) to create the folder in case it does not exist.
    mkdir -p ~/.local/share/backgrounds
  • Open that folder in file manager to do copy & paste things.
    nautilus .local/share/backgrounds/

For each XML, you have to create another XML under “~/.local/share/gnome-background-properties”.

  • Run command to create that folder in case it does not exist.
    mkdir -p ~/.local/share/gnome-background-properties
  • Open that folder in file manager to create another XML files.
    nautilus ~/.local/share/gnome-background-properties

In this new XML file, you need to add following lines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper>
    <name>TYPE NAME HERE</name>
    <filename>PATH-TO-DESKTOP-SLIDESHOW-XML</filename>
    <options>zoom</options>
    <pcolor>#2c001e</pcolor>
    <scolor>#2c001e</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
</wallpapers>

As the picture shows, you have to type the full path (‘/home/USERNAME/.loca/share/…’) to the generated XML you created in previous step. If you did everything correctly, you should see the new choice (with little clock) in Background settings page.

That’s all. Enjoy!

Mozilla Firefox has reached its 100th release! It has been more than 17 years since the first 1.0 was released in 2004.

Firefox 100 now supports for displaying subtitles in the pop-out video (Picture-in-Picture mode) for YouTube, Prime Video, and Netflix videos. Also, it supports video captions on websites that use WebVTT (Web Video Text Track) format, like Coursera.org, Canadian Broadcasting Corporation, and many more.

For macOS 11 with HDR-compatible screens, users can now enjoy HDR video on YouTube out-of-the-box, though you have NOT to enable “optimize video streaming while on battery”.

For Windows, hardware accelerated AV1 video decoding is enabled for support GPUs, including Intel Gen 11+, AMD RDNA 2 Excluding Navi 24, GeForce 30. Though, AV1 Video Extension from the Microsoft Store is required.

Other changes in Firefox 100 include:

  • Detect and offer choice if Firefox does not match system language on first run.
  • Add multiple languages support for spell checking.
  • Enable video overlay to reduce power usage for Windows user with Intel GPU.
  • Support credit card autofill and capture in the United Kingdom.
  • Ignore less restricted referrer policies
  • Choose preferred color schemes for websites.
  • Support for profiling multiple java threads
  • Add Geckoview APIs

Get Firefox 100:

For the release note as well as download link, go to Mozilla web site:

For Ubuntu users, Firefox 100 will be available in next few days. Just keep your system up-to-date and you’ll get the release soon.

For Ubuntu 22.04 (and old Ubuntu 16.04), you may install Firefox 100 as .deb from Mozilla Team PPA (Need to set PPA priority, see HERE for more).

Ubuntu’s default Rhythmbox music player finally released a new version with podcast improvements, code cleanup, and various bug-fixes.

It has been more than 2 years since the last release of Rhythmbox music player. The new Rhythmbox 3.4.5 comes with improvements to the podcast support:

  • Rewritten podcast downloader with better resume and retry
  • Use podcast episode GUIDs to handle episode URL changes
  • Fixes for feed description, album art, and downloading issue.

The release also ported DAAP plugin to libdmapsharing-4.0 API, enabled UTF-8 support in metadata scanner. The app ID has been renamed to “org.gnome.Rhythmbox3”. And, it has now switched to Meson for its building system.

Other changes include:

  • Remove soundcloud plugin, mmkeys plugin, and gnome-settings-daemon MediaKeys plugin
  • Song info ui, webremote plugin, and many other fixes.
  • And, translation updates. See more here.

How to Get Rhythmbox

Ubuntu usually won’t update the package for all current Ubuntu releases. So far, the only way to get Rhythmbox is using the Linux universal Flatpak package.

1. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the commands below to install the Flatpak daemon:

sudo apt install flatpak

Ubuntu 18.04 and Ubuntu 16.04 need to add the Flatpak PPA first.

2. Next, all current Ubuntu releases may install the player by running the command below in terminal:

flatpak install https://dl.flathub.org/repo/appstream/org.gnome.Rhythmbox3.flatpakref

To avoid duplicated app icons, you may remove the system default package via sudo apt remove rhythmbox

Uninstall Rhythmbox flatpak

For any reason, you can remove the package easily by running the command below in terminal window:

flatpak uninstall org.gnome.Rhythmbox3

And cleanup unused runtimes via flatpak uninstall --unused.

Want to set a certain size of your desktop icons and/or change the spacing between them? Here’s how to do the job in Ubuntu 22.04.

Ubuntu 22.04 defaults to GNOME desktop 42 and uses an extension called “Desktop Icons NG” (DING in short) to handle shortcut icons on desktop.

It provides 4 icon sizes (“Tiny”, “Small”, “Normal”, and “Large”) in ‘Appearance‘ settings for choose from.

Change icon size via Appearance settings page

If somehow the default icon sizes do not meet you need, then you may edit the source file and customize the 4 sizes manually.

1. Edit the config file

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to edit the file which is located in ‘/usr/share/gnome-shell/extensions/[email protected]/’ directory:

sudo gedit /usr/share/gnome-shell/extensions/[email protected]/enums.js

sudo is required as it’s a system wide extension and you need to type user password to authenticate when running the command.

When file opens, you’ll see the first line (except the comments) defines the icon sizes in pixels:

var ICON_SIZE = { ‘tiny’: 36, ‘small’: 48, ‘standard’: 64, ‘large’: 96 };

Just change the number 36, 48, 64 and 96 will replace the corresponding ‘tiny’, ‘small’, ‘normal’, and ‘large’ icon sizes.

And, change the numbers in lines of “ICON_WIDTH” and “ICON_HEIGHT” will adjust how large the square area that each icon takes. It’s the orange area when you drag and drop an icon, which can be useful if you want to change the icon spacing.

NOTE: The change will take place for all system users. For single user only, you may copy the extension folder to local directory ‘.local/share/gnome-extensions’. However, the option in “Appearance” won’t work for the local copy.

2. Apply change

After editing and saving the config file, search for and open “Gnome Extensions” app.

App to Manage your extensions

Install the tool via sudo apt install gnome-shell-extension-prefs command if you don’t have it.

When the app opens, turn off “Desktop Icons NG” extension and turn it on again will apply the changes you made in previous step.

Want to change the background wallpaper or just set another color for Ubuntu Gnome login screen? Here’s how to do the trick in Ubuntu 22.04 and Ubuntu 24.04!

As you may know, the GDM background is not easy to modify since GNOME hard-coded the CSS into a .gresource file. Thankfully, there’s now a graphical configuration tool can do the job for Ubuntu 22.04 and higher.

It’s GDM Settings, a free open-source tool not only for changing the background for GNOME login screen, but also supports for configuring login screen for following things:

  • Change the Fonts.
  • Tweak top-bar color, background.
  • Configure sound, mouse and touchpad.
  • Disable User list.


Continue Reading…

HP printer and scanner drivers, HPLIP, released version 3.22.4 recently with a list of new devices support.

This release adds Manjaro 21.2 as well as following new printers support:

  • HP LaserJet Pro 4001ne, 4001n, 4001dne, 4001dn, 4001dwe, 4001dw, 4001d, 4001de,
  • HP LaserJet Pro 4002ne, 4002n, 4002dne, 4002dn, 4002dwe, 4002dw, 4002d, 4002de,
  • HP LaserJet Pro 4003dn, 4003dw, 4003n, 4003d, 4004d, 4004dn, 4004dw
  • HP LaserJet Pro MFP 4101dwe, 4101dw, 4101fdn, 4101fdne, 4101fdw, 4101fdwe
  • HP LaserJet Pro MFP 4102dwe, 4102dw, 4102fdn, 4102fdw, 4102fdwe, 4102fdne, 4102fnw, 4102fnwe
  • HP LaserJet Pro MFP 4103dw, 4103dn, 4103fdn, 4103fdw, 4104dw, 4104fdw, 4104fdn
  • HP ScanJet Pro 3600 f1
  • HP ScanJet Pro N4600 fnw1
  • HP ScanJet Pro 2600 f1
  • HP ScanJet Enterprise Flow N6600 fnw1

Download & Install HPLIP 3.22.4

HP provides official .run installer for all Linux users, simply download the package “hplip-x.xx.x.run” from the link page below:

Then right-click on the Downloads folder, select “Open in Terminal”, and finally run the installer via command:

./hplip-3.22.4.run

Follow the on screen prompts, and re-plug your printer when everything’s done successfully.

Install HPLIP 3.22.4 for Ubuntu 22.04:

The installer so far does not support Ubuntu 22.04. If you do require the new version, here’s how to manually install dependencies and built the package (Thanks to fostips).

Firstly, run the previous “./hplip-3.22.4.run” command will generate the source folder in Downloads. Right-click on it and select “Open in Terminal” to open terminal.

Next, run command to manually install dependency packages:

sudo apt install --assume-yes libcups2 cups libcups2-dev cups-bsd cups-client libcupsimage2-dev libdbus-1-dev build-essential ghostscript openssl libjpeg-dev libsnmp-dev libtool-bin libusb-1.0-0-dev wget python3-pil policykit-1 policykit-1-gnome python3-pyqt5 python3-dbus.mainloop.pyqt5 python-gi-dev python3-dev python3-notify2 python3 python3-reportlab libsane libsane-dev sane-utils xsane libavahi-client-dev libavahi-core-dev avahi-utils

Finally, run the commands below one by one in this terminal window to configure and build HPLIP (with source folder as working directory):

./configure --prefix=/usr --enable-qt5 --disable-qt4
make
sudo make install

It works in my case on Ubuntu 22.04 LTS.

Uninstall HPLIP 3.22.4

To remove the driver package, you need to first open terminal with source folder as working directory (See the last picture). When it opens, run the command to start uninstall script:

sudo ./uninstall.py

Same to the installing process, it will asks few questions to confirm during the process.

The hugin package is removed from Ubuntu 22.04 repository. For those need this free open-source panorama stitcher, here are 3 alternative methods to install it back. Just choose the one that you prefer.

Option 1: Hugin Flatpak package

The panoramic photo stitcher is available as the universal Flatpak package than runs in sandbox.

Flatpak package installs on most Linux, but it takes more disk space for run-time libraries!

Firstly, open terminal by searching it from the ‘Activities’ overview screen (or press Ctrl+Alt+T on keyboard):

When terminal opens, run the command below to install the daemon package first:

sudo apt update && sudo apt install flatpak

And finally install Hugin as flatpak using command:

flatpak install https://dl.flathub.org/repo/appstream/net.sourceforge.Hugin.flatpakref

As you see, the flatpak package will also install run-time libraries that take more disk space.

Option 2: Non-install AppImage package

There’s a non-install AppImage package available for Hugin. No installation required, just add executable permission and run the file will launch the tool.

Download the latest Hugin AppImage:

Then, give executable permission in file properties dialog and finally right-click run it to launch the app:

Option 2: Hugin PPA

For those prefer the classic .deb package, I’ve upload the package as well as dependencies into this Ubuntu PPA.

NOTE: Don’t know why Ubuntu 22.04 removed the package, but it still present in all Debian repositories. And the package in this PPA is just a backport from Debian Unstable. Use it at your own risk!

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

sudo add-apt-repository ppa:ubuntuhandbook1/apps

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

2. Next, install the panorama photo stitcher by running the apt command below:

sudo apt install hugin

For Linux Mint and other Ubuntu based systems, you may need to run sudo apt update to refresh cache first.

How to Remove Hugin in Ubuntu 22.04

For the Flatpak package, uninstall it via command:

flatpak uninstall --delete-data net.sourceforge.Hugin

And remove unused run-times via flatpak uninstall --unused.

To remove Hugin PPA package, run the command below in terminal:

sudo apt remove --autoremove hugin

And remove the Ubuntu PPA using command:

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

Cheese, the default app for taking photos or recording via webcam, is not working properly in my case in Ubuntu 22.04.

By launching the app, webcam light turns on and persists only for a few seconds. Then it displays a blank screen with following text:

“There was an error playing video from the webcam”

According to the Ubuntu bug report and the upstream one, it seems to have something to do with the patch for MJPEG output support that causes issue on low end PC (I guess).

And, here are a few workarounds that works in my laptop with HP TrueVision HD Camera.

Workaround 1: Change output resolution

Firstly, launch Cheese and open “Preference” dialog from the hamburger menu. When it opens, change the resolution from 1280×720 to 640×480. Then close the app.

Next, launch Cheese again. It display a blank screen but camera light keeps on in my case. Continue decreasing the resolution until it works again. Then switch back a higher photo/video resolution.

However, the highest 1280×720 resolution produces a corrupted display just as the bug reported. While 640×480 works great in my case.

Workaround 2: Install Cheese 3.38 via Flatpak

The previous v3.38 does not has the issue. It’s available to install via the universal Flatpak package.

1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to install the daemon:

sudo apt install flatpak

2. Next, install Cheese as Flatpak using command:

flatpak install https://dl.flathub.org/repo/appstream/org.gnome.Cheese.flatpakref

There’ll be a few hundreds more MB run-time libraries to install for the first time.

Finally, run the command below to launch the Flatpak to see if it works:

flatpak run org.gnome.Cheese

3. (Optional) Remove the pre-installed Cheese package.

The make the app icon in search result to launch Cheese as Flatpak instead of the pre-installed package. You may remove the original package via command:

sudo apt remove cheese

And a system restart is required if you’re first time installing an app as Flatpak.

How to Restore

To remove the Flatpak package, use command:

flatpak uninstall --delete-data org.gnome.Cheese

And install back the original Cheese package using command:

sudo apt install cheese

Workaround 3: PPA with Cheese package (patched)

As @matthew.ruffell mentioned in the bug report, revert the commit will make it work again. This could be a workaround until the upstream fixed the issue. However, in my build the 1280×720 resolution just disappeared…

Ubuntu 22.04 has better support for the low latency PipeWire multimedia framework. Here’s how to setup it for PulseAudio, ALSA, JACK and Bluetooth output.

Firstly, Pipewire is pre-installed out-of-the-box, and runs as background service automatically. You may check it out by running command below in terminal:

systemctl --user status pipewire pipewire-session-manager

PipeWire installed out-of-the-box

IMPORTANT: This is NOT officially supported by Ubuntu so far. It still may not work on some devices. Don’t do it on production machine!

Step 1: install client libraries

Though available out-of-the-box, it’s not in use by default for audio output. To get start, first press Ctrl+Alt+T on keyboard to open terminal, and run command to install client libraries:

sudo apt install pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack

Step 2: install wireplumber to replace pipewire-media-session

The project maintainer now recommends more advanced “wireplumber” session manager when to use Pipewire as system sound server.

To install the package and remove “pipewire-media-session”, run the command below in terminal:

sudo apt install wireplumber pipewire-media-session-

NOTE: there’s a ‘-‘ in the end of the command indicates to remove the package. The command will also install the required pipewire-pulse automatically.

Step 3: Copy configuration files:

wireplumber makes things quite easy! If you just want to replace PulseAudio with Pipewire, enable the media session service and restart and that’s all!!

For ALSA clients to be configured to output via PipeWire, run command to copy the configure file:

sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/

For JACK client, run command:

sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/

And then sudo ldconfig.

For Bluetooth, just remove the pulseaudio-module-bluetooth package via command:

sudo apt remove pulseaudio-module-bluetooth

And, finally enable the media session by running command:

systemctl --user --now enable wireplumber.service

Step 4: Verify

After restarted Ubuntu 22.04, run the command below in terminal.

pactl info

It should output Sound server: PulseAudio (on PipeWire x.x.x) indicates Pipewire is in use as sound output.

How to Restore:

To undo the changes, firstly remove the client libraries via command:

sudo apt remove pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack

Remove wireplumber and install back the previous media session package (there’s also ‘-‘ in the end):

sudo apt install pipewire-media-session wireplumber-

Finally, re-enable pipewire-media-session service by running commands:

rm -f ~/.config/systemd/user/pipewire-session-manager.service
systemctl --user --now enable pipewire-media-session

Thanks to @lestcape, if sound’s still not working, try to disable pipewire-pulse services via command:

systemctl --user --now disable pipewire-pulse.service pipewire-pulse.socket

If you tried to enabled it globally, also disable it via command:

sudo systemctl --global --now disable pipewire-pulse.service pipewire-pulse.socket

And re-enable the original pulseaudio service via command:

systemctl --user --now reenable pulseaudio.service pulseaudio.socket
sudo systemctl --global --now reenable pulseaudio.service pulseaudio.socket