Archives For jimingkui

Looking for app to convert your photo images into other formats? Try Switcheroo.

For batch image processing, I’d recommend to use Converseen. However, stupid simple applications are always good choices for beginners.

And, Switcheroo is one stupid simple app for converting photo images, while having modern look and feel in today’s Linux desktop.

Click ‘Open Images’ or drag’n’drop files into app window

With it, just click “Open Images” button and choose your image file/files, or drag and drop files into the app window to open them.

It shows thumbnail preview of all opened images, along with delete buttons in top-right for each images.

By using top-left ‘+’ button, user can add more images (Tips: hold Ctrl or Shift can select multiple files). And, ‘≡’ menu even provides an option to paste images from clipboard.

After opening all your photo images, click the drop-down box in the right of “Export Format” to select which file format to convert to.

At the moment of writing, it support converting image to PNG, JPG, WEBP, HEIF, HEIC, BMP, AVIF, JXL, TIFF, PDF, GIF. Though, you have to either use top-right hamburger menu or press Ctrl + H to show less popular file types.

The app’s hamburger menu

Before clicking ‘Convert’, it provides few more options, such as set background color, resize with or without aspect ratio, and change image quality. There’s also “Save To Zip” to directly output images into ZIP archive.

Instead of providing an in-app option, it pops-up file chooser dialog asks to choose where to save output images or ZIP archive, once clicking “Convert” button.

How to Install Switcheroo Image Converter

The app is available as universal Flatpak package, that can be installed in Ubuntu, Debian, Fedora, Arch, Chrome OS, and most other Linux, even including the mobile device, such as PinePhone.

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

sudo apt install flatpak

Other Linux can follow the official setup guide to get Flatpak support.

2. Then, run command to install the app as flatpak:

flatpak install https://dl.flathub.org/repo/appstream/io.gitlab.adhami3310.Converter.flatpakref

As you see in the screenshot, the downside is that a small app can have 1 GB downloading due to run-time libraries (though shared).

3. Once installed, search for and launch it from your system application launcher, start menu, or ‘Activities’ overview depends on desktop environment.

First time installing Flatpak app needs a log out and back in, to make app icon visible.

4. To enable drag’n’drop support, you need to grant access permission to the folders that contain the photo images.
To do so, install Flatseal, then use it to allow access either all user files or certain folders (by adding Other files).

Uninstall Switcheroo

To uninstall the image converting application, also open terminal (Ctrl+Alt+T), then run command:

flatpak uninstall --delete-data io.gitlab.adhami3310.Converter

Also run flatpak uninstall --unused to remove useless run-time libraries.

Have 2 or more PCs connected to a single external monitor? If you run Ubuntu (or other Linux) on one of the PCs, then here’s how to add a keyboard shortcut to switch video source on the monitor.

Most external monitors today have more than one video input ports, e.g., HDMI1, HDMI2, DP1, allowing to connect with different computers at the same time.

And, they usually support DDC/CI protocol to control monitors without hitting physical buttons.

I have multiple computers connected to the single monitor.

To save desktop space, I have only one monitor on my desk, and 2 computers connected to this single monitor. One is running Windows 10 for gaming and another with Ubuntu for work.

In Windows, I use ControlMyMonitor (it’s http link, not sure if it works now) to modify monitor settings and autohotkey to setup keyboard shortcuts.

In Ubuntu and most other Linux, it’s easy to do the job through ddcutil. And, here’s the how to steps one by one.

NOTE: This tutorial should works in all current Ubuntu releases (Ubuntu 20.04, Ubuntu 22.04, Ubuntu 23.04/23.10), and most other Linux, though only tested in 22.04 LTS.

Step 1: Install ddcutil

For Ubuntu user, simply press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run command to install the command line tool:

sudo apt install ddcutil

Type user password when it asks for sudo authentication, though there’s no asterisk feedback.

For Fedora, RHEL, based systems, run the dnf command below instead:

sudo dnf install ddcutil

And, Arch based Linux can install it via command:

sudo pacman -S ddcutil

Step 2: setup permission

After installing the package above, i2c user group is created. You have to add current user to that group by running command:

sudo gpasswd --add $USER i2c

Not sure if required, but try to restart computer if next step does not work for you.

Step 3: Use Linux command to Switch Monitor Input Source

1. Now, run command in terminal to report connected monitors, and find out the logical display number:

ddcutil detect

In my case, it’s number 1. Usually you can skip this step if only one monitor connected.

2. Next, run command to find out the feature code, as well as its values for input source:

ddcutil --display 1 capabilities

Replace number 1 to yours according to the last command. And you can just skip for --display 1.

In the terminal output, 60 is the input source feature code for me. And, values include: 0f and 11 in hex. So, they are 0x0f and 0x11.

3. After finding out the feature code and its values, try running command to switch monitor input source:

ddcutil setvcp 60 0x11

In this command, replace 60 to yours feature code. And, replace 0x11 (its HDMI-1 in my case) to your values according which video source to switch to.

Step 4: Setup keyboard shortcut to switch input source

If the ddcutil setvcp command works for you, now you may do following steps to set keyboard shortcuts to do the job.

For GNOME (default desktop in Ubuntu & Fedora), open ‘Settings’ and navigate to “Keyboard -> Keyboard Shortcuts -> View and Customize Shortcuts”.

In pop-up dialog, select “Custom Shortcuts”, then add new shortcut with:

  • Name: switch monitor input source (or whatever you want).
  • Command: ddcutil setvcp 60 0x11 (change code 60 & 0x11 according to yours).
  • Shortcut: whatever key combination that you want.

Also, add another keyboard shortcut to switch back.

For other Desktop Environments, try launching “Keyboard Shortcuts”, “Shortcut Keys”, “Custom Shortcuts”, “Keyboard”, etc, for the custom keyboard shortcuts settings page.

Fedora workstation displays Fedora logo on the desktop for the default wallpaper, now there’s an extension that can do the similar job in Ubuntu 23.10, Arch, and Manjaro Linux with GNOME 45.

It’s “Logo Widget”, which allows to add any user selected image into desktop as background logo, resize and place it in top-left, top-center, top-right, center, bottom-left, bottom-center, or bottom-right of screen.

Background Logo in Ubuntu 23.10

Along with Activate Gnome, user can put both image and custom text in desktop as background logo/text. See the screenshot below.

Enable background logo in GNOME 45.

Ubuntu 23.10 users can firstly search for and install “Extension Manager” from App Center.

Install Extension Manager in Ubuntu Software/App Center

Then, launch “Extension Manager”, navigate to Browse tab, finally search and install the Logo Widget extension.

After installation, navigate back to “Installed” tab, click settings icon for the newly installed extension to open the configuration page.

Finally, choose logo image file (for Ubuntu logo, choose /usr/share/plymouth/ubuntu-logo.png), set position, size, opacity, etc and enjoy!

For Arch,Manjaro Linux, etc with GNOME 45, just open the link below to visit the extension page in EGO:

The, use the ON/OFF switch to install the extension, and install “Gnome Extensions” app to configure it.

If you don’t see the ON/OFF switch, click the link in the page to install browser extension and refresh!

MPV media player released version 0.37.0 yesterday! Here are the new features and Ubuntu PPA for installing the .deb package in Ubuntu, Linux Mint.

MPV 0.37.0 has big improvements for Apple users. It added Vulkan support in vo_gpu and vo_gnu_next. And, it now supports VideoToolbox hardware decoding, a low-level framework that provides direct access to hardware encoders and decoders.

The release also added support for delivery system ISDB-T for dvb streaming, support SPDIF passthrough for OSS audio, and can play up to 64 channels.

For libmpv library, the release added new mpv_time_ns() to allow more precise time based on nanoseconds.

For command line, MPV 0.37.0 added new options, they include:

  • --hdr-peak-percentile and --libplacebo-opts for vo_gpu_next.
  • --term-remaining-playtime for player.
  • --x11-wid-title for x11.
  • --subs-match-os-language to replace ‘auto’ option for player.
  • --video-crop for vo.
  • --window-corners, --window-affinity, --title-bar, --backdrop-type for win32.
  • and --sub-stretch-durations for sub.

See the official manual about the new command options. And, see the github release page for more changes about MPV 0.37.0.

How to Install MPV 0.37 in Ubuntu

The new release will be available in Ubuntu Software (App Center) in next few days as Snap package.

For those who prefer the classic .deb package format, here’s the PPA for Ubuntu 22.04, Ubuntu 23.04, and Ubuntu 23.10.

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

sudo add-apt-repository ppa:ubuntuhandbook1/mpv

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

2. Linux Mint 21 user needs to run command in terminal to manually refresh the package cache:

sudo apt update

3. Finally, install mpv media player v0.37.0 by running command:

sudo apt install mpv

To verify, run mpv --version command in terminal.

 

Tips: for hardware video acceleration, first make sure your graphics driver support it, then edit ‘/etc/mpv/mpv.conf‘ file and add hwdec=auto. For the missing header-bar, use gpu-context=x11egl.

Uninstall:

You can choose to purge the PPA repository, which will also downgrade mpv to the stock version in system repository. To do so, open terminal and run command:

sudo apt install ppa-purge && sudo ppa-purge ppa:ubuntuhandbook1/mpv

Or, remove PPA by running command:

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

To remove the mpv media player, use command:

sudo apt remove --autoremove mpv

Mozilla announced Firefox 120.0 a day ago as the latest stable release of the popular web browser.

The new release continue adding new security improvements. In the right-click menu of web links, there’s now “Copy Link Without Site Tracking” to ensure that copied links no longer contain tracking information.

The ‘Privacy & Security’ setting page now has an option “Tell websites not to sell or share my data“.

For Germany users, Cookie Banner Blocker and URL Tracking Protection by default in private windows to auto-refuse cookies, and remove non-essential URL query parameters.

For Ubuntu, both Firefox and Chromium (in system repository) are Snap packages run in sandbox. Since 120.0 release, user can now import data from Chromium to Firefox, when both web browsers are installed as Snap packages.

Other changes in Firefox 120.0 include:

  • enhance Canvas APIs with Fingerprinting Protection for private windows.
  • imports TLS trust anchors (e.g., certificates) from the operating system root store.
  • New keyboard shortcuts to edit and delete a selected credential on about:logins.
  • support corner snapping for Picture-in-Picture on Windows and Linux
  • Various security fixes and developer improvements.

Download Firefox 120.0

The official release note as well as download link is available in the Mozilla website via the link:

For Ubuntu users with the pre-installed Firefox package, it has been already updated to the new 120.0 release. Just check it via menu “Help -> About Firefox”.

For those who prefer the classic .deb package format, the Mozilla Team PPA has made the package for all current Ubuntu releases, however, Ubuntu 22.04 users need to manually set PPA priority.