DevToys can’t start on Ubuntu 24.04

DevToys is a collection of essential developer tools packed into a single desktop application. It provides a wide range of utilities, including a color picker, JSON viewer, and various text manipulation tools, all in a user-friendly interface.

Symptoms: When you click on the DevToys icon, nothing happens. If you try to execute it through the terminal using the devtoys command, it throws the following error:

$ devtoys 

(DevToys:1306833): Gtk-WARNING **: 17:45:26.037: Theme parser error: gtk.css:7879:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.037: Theme parser error: gtk.css:7891:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.070: Theme parser error: gtk-dark.css:7879:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.070: Theme parser error: gtk-dark.css:7891:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.150: Theme parser error: gtk-dark.css:7879:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.150: Theme parser error: gtk-dark.css:7891:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.171: Theme parser error: gtk-dark.css:7879:18-22: Expected a number

(DevToys:1306833): Gtk-WARNING **: 17:45:26.171: Theme parser error: gtk-dark.css:7891:18-22: Expected a number
bwrap: setting up uid map: Permission denied

** (DevToys:1306833): ERROR **: 17:45:26.238: Failed to fully launch dbus-proxy: Child process exited with code 1
fish: Job 1, 'devtoys' terminated by signal SIGABRT (Abort)

The issue is that DevToys doesn’t work on Ubuntu 24.04 due to the missing AppArmor bwrap profile. This is because Ubuntu 24.04 has introduced restricted unprivileged user namespaces, and the AppArmor profile for bwrap is not included by default.

As mentioned in this comment (https://github.com/DevToys-app/DevToys/issues/1198#issuecomment-2411370778), the solution is to install the apparmor-profiles package, link the bwrap profile, and load it.

Here are the steps:

sudo apt install apparmor-profiles
sudo ln -s /usr/share/apparmor/extra-profiles/bwrap-userns-restrict /etc/apparmor.d/
sudo apparmor_parser /etc/apparmor.d/bwrap-userns-restrict

After following these steps, DevToys should start working correctly on Ubuntu 24.04.

Best Git GUI Clients to Easily Merge Git Branches

Managing Git branches can be a complex task, especially when it comes to merging them. Fortunately, there are several Git GUI (Graphical User Interface) clients that can simplify the process and make it more user-friendly. In this article, we’ll explore three of the best Git GUI clients that can help you easily merge Git branches.

Continue reading

locale: Cannot set LC_CTYPE to default locale

I have an Ubuntu 24.04 server and I have the following errors when I run “locale” command:
locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
That’s how I fixed it:
sudo apt-get update
sudo apt-get install locales
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8

How to manage the uploaded resumes on LinkedIn

You can manage your uploaded resumes on LinkedIn through the “Job Application Settings” page. Here’s a step-by-step guide:

  1. Login to your LinkedIn account and click on the Me icon.
  2. Click on Settings & privacy, then select Data privacy.
  3. Scroll down to the Job application settings section.
  4. Click on the three dots next to your uploaded resume(s) and select Delete resume to remove it.
  5. Alternatively, you can also Upload a new resume by clicking on the “Upload resume” button.

Continue reading

Pi-Hole and IPV6 – How to make it work?

Im using Pi-Hole with IPV4, recently I discovered my router Xiaomi AX1800 (OpenWRT) supports IPv6, as well as my ISP (A1).

I noticed that I can assign DHCP static IPv4 assignment from the router’s interface, but I can’t do the same for IPv6. That’s why I decided to set a static IPv6 address for the machine running Pi-Hole (Raspberry Pi 2).

There is a short guide on how to do that:

Continue reading

Can I disable the default browser response for Shift-click event?

In the newer browsers, you can distinguish the Shift-click event from a simple click, and disable the default response for Shift-click.

To disable Shift-click, insert the following code in your page’s <HEAD> section:


<script language="JavaScript">
  function mouseDown(e) {
    let shiftPressed=0;
  
    if (document.layers) {
        shiftPressed=(e.modifiers-0>3);
    } else {
      shiftPressed=e.shiftKey;
    }
  
    if (shiftPressed) {
      return false;
    }
  
    return true;
  }
  document.onmousedown = mouseDown;
<script>

Organize pictures by the data taken


#!/usr/bin/env bash
BASE_DIR=$1

if [ ! -d "${BASE_DIR}" ] ; then
echo "$BASE_DIR is not a directory";
fi

## Find those files that are older than a month
find "$BASE_DIR" -maxdepth 1 -mtime +30 -type f -name '*.jpg' |
while IFS= read -r file; do
## Get the file's modification year
year="$(date -d "$(stat -c %y "$file")" +%Y)"
## Get the file's modification month
month="$(date -d "$(stat -c %y "$file")" +%b)"

## Create the directories if they don't exist. The -p flag
## makes 'mkdir' create the parent directories as needed so
## you don't need to create $year explicitly.
[[ ! -d "$BASE_DIR/$year/$month" ]] && mkdir -p "$BASE_DIR/$year/$month";

## Move the file
mv "$file" "$BASE_DIR/$year/$month"
done

Hot to install GPaste on Ubuntu 23.10

GPaste is an open-source clipboard management tool for Linux-based operating systems. Clipboard managers like GPaste allow users to manage and access a history of items they have copied to the clipboard, enabling them to easily paste previously copied content.

Sadly, there are binary packages available but you can compile it and install it manually.

Continue reading

Docker fails to fetch http://deb.debian.org/debian/dists/buster/InRelease

I found a network issue when trying to build my docker image: the command `apt update` fails with the following error:

W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease
W: Failed to fetch http://deb.debian.org/debian/dists/buster/Release.gpg Temporary failure resolving ‘deb.debian.org’
W: Failed to fetch http://security.debian.org/dists/buster/updates/Release.gpg Temporary failure resolving ‘security.debian.org’
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/Release.gpg Temporary failure resolving ‘deb.debian.org’
W: Some index files failed to download. They have been ignored, or old ones used instead.

This happens because your ISP DNS servers are not reachable from this network. The easiest workaround is to directly instruct Docker to rely on some public DNS servers proven to be stable and reliable (Google, Cloudflare).

Add them to a new configuration file called daemon.json:

$ sudo pico /etc/docker/daemon.json

Insert the following:

{
    "dns": ["1.1.1.1", "8.8.8.8", "8.8.4.4"]
}

Then restart the service:

$ sudo service docker restart