Category Archives: GNU/Linux

All about my involvement in the free software world.

Debian 13 Trixie Xfce4 desktop

Restore Xfce4 to default settings

I run Debian 13 (Trixie) with KDE (on Wayland) as my daily driver for Android development on a Lenovo ThinkPad P50, with Xfce4 alongside mainly for tinkering. As with everything you tinker with, things tend to break along the way.

Here is a script that will restore Xfce to it’s default desktop settings for the current user.

#!/bin/bash
pkill -KILL xfconfd xfce4-panel xfce4-session xfsettingsd xfdesktop 2>/dev/null || true
 
rm -rf ~/.config/xfce4
rm -rf ~/.cache/xfce4
rm -rf ~/.config/xfconf
rm -rf ~/.cache/sessions
rm -rf ~/.local/share/xfce4
rm -rf ~/.local/share/xfce4-panel

Save it as restore_xfce.sh, and make it executable:

chmod +x restore_xfce.sh

Log out of your Xfce session and switch to a virtual console using Ctrl + Alt + F3, log in with your username and password, and run:

./restore_xfce.sh

Switch back to GUI by pressing Alt + F2 or Alt + F1.

pulseaudio wasting CPU time because of speech-dispatcher

Disable speech-dispatcher on Debian 12

I’m running Debian 12 “Bookworm” on a HP ProBook x360 G1 EE. This “beast” is serving as a Jenkins node running an automated test suite on attached Android devices for GSM Signal Monitor. It also runs xRDP and XFCE as the desktop environment. I’m remoting into the machine from time to time for device management and configuration using scrcpy.

One thing I noticed when running htop and using Firefox to visit sites such as stackoverflow.com was the abnormal CPU utilization by PulseAudio.

After a bit of research, the issue was pinpointed to speech dispatcher auto spawning on demand when called by certain applications.

I don’t use speech synthesis or software synthesizers on this machine (or anywhere, to be fair) and would rather waste CPU cycles on something more useful—such as running complete regression test suites against GSM Signal Monitor when a build is merged into the dev branch, or pre-release testing on 24 devices attached to the little beast.

To prevent speech-dispatcher from auto-spawning on demand, open a terminal and run:

sudo nano /etc/speech-dispatcher/speechd.conf

Locate the “DisableAutoSpawn” option near the bottom of the file and uncomment it. Save the file and restart speech-dispatcher.

sudo systemctl restart speech-dispatcher

Optionally restart Firefox if it’s running.

Now speech-dispatcher should no longer spawn on demand by applications. You can verify that by navigating to a topic on Stack Overflow, for example.

speech-dispatcher disabled, firefox complaining

Firefox should complain that it can’t use speech synthesis.

Managing SSL for Jenkins with Sectigo Certificates

At VMSoft, I manage a Jenkins instance that uses SSL. To configure SSL using a certificate issued by Sectigo (in my case), the supplied .crt and .key files must be imported into a keystore, which is then passed as a Jenkins startup parameter.

The process of creating a keystore from the .crt and .key files involves using the openssl command-line utility to create a PKCS#12 file:

openssl pkcs12 -export -in <file_name>.crt -inkey <file_name>.key -out jenkins.p12

Next, convert the resulting .p12 file to a .jks file using the keytool utility, which comes bundled with the JDK:

keytool -importkeystore -srckeystore jenkins.p12 -srcstoretype PKCS12 -destkeystore jenkins.jks -deststoretype JKS

Finally, make Jenkins aware that you want to use HTTPS by editing the jenkins.xml configuration file. Modify the jenkins.war command-line arguments by appending the following:

--httpPort=-1 --httpsPort=8443 --httpsKeyStore=<path_to_key_store_file> --httpsKeyStorePassword=<key_store_password>

Note: If your Jenkins instance fails to start, check the error log. If you see an error like:

java.security.UnrecoverableKeyException: Cannot recover key

ensure that the password you provided during the creation of both the PKCS#12 file and the .jks file is the same. Inconsistent passwords can cause this error.

Copying Cyrillic URLs in Google Chrome and Firefox

Using Google Chrome, I encountered strange bug affecting the copying and pasting of cyrillic urls.

When pasting, the non ASCII characters in the Url are converted to Punycode.

Performing some tests revealed that the same behaviour is present also in Firefox.

Punycode produced by Google Chrome and Firefox

Punycode produced by Google Chrome and Firefox

Doing some research led me to Issue 68718, unfortunately marked as WontFix stating:

Links on Wikipedia itself are a red herring, as comment 50 notes -- they're escaped in the page source.  The actual issue here is demonstrated by the link in comment 0.  We escape URLs when copying them.  This behavior matches Firefox 4 (by default) and Safari 5, though not IE9.

We added this behavior on  issue 2820  to fix a variety of problems in languages like Japanese.  Because those problems resulted in users unable to navigate to the pasted links, whereas this issue seems to be solely about cosmetics (in that escaped URLs are ugly and hard to read), preserving that behavior change seems like the more important thing to do.

Workarounds

Few things can be done if this issue is affecting your day to day usage of Google Chrome…

  • Before copying the URL add any character at the end of it, then erase it. After this operation the copied URL will preserve its structure not producing punycode when pasted.
  • Use the COPY URL extension.
  • Use a different browser. Microsoft Edge on Windows and Safari on OSX are producing the expected results.

Featured Image: https://wallpapercave.com/w/A7ZAUTz

Gentoo Linux

Gentoo: No image size information in Dolphin

Dolphin 16.04.3

Dolphin 16.04.3

One thing that was not working with my Gentoo installation was the information for image dimensions (and image data in general) in Dolphin. The resolution is to rebuild Dolphin with the semantic-desktop use flag turned on.

echo "kde-apps/dolphin semantic-desktop" &gt;&gt; /etc/portage/package.use/dolphin
emerge --ask kde-apps/dolphin

I thing that this flag should be on by default when building a system with KDE desktop profile or at least mentioned somewhere in the Gentoo wiki.