Raging Slideshow 1.1.0

Appearantly Gnome does not implement the idle protocol. I therefore had to update my Slideshow for Gnome. It ran perfectly on KDE with Wayland using SwayIdle, but for Gnome on Wayland I had to come up with something else. Luckily the command

dbus-send --print-reply --dest=org.gnome.Mutter.IdleMonitor /org/gnome/Mutter/IdleMonitor/Core org.gnome.Mutter.IdleMonitor.GetIdletime

gives the idle time on Gnome. With this function in place my slideshow works on KDE and on Gnome with Wayland.
https://gitlab.com/raginggoblin/slideshow

Raging Slideshow

For years, I had a slideshow running in my living room, displaying all my digital photos in random order. Over time, I experimented with various screensaver applications, with xscreensaver’s glslideshow being the last one I used. However, I eventually grew frustrated with its inability to display the file path in a meaningful way. I didn’t want the full path cluttering the screen—just the subfolders, which would provide the context I needed to recall when and where a photo was taken.

Since my photos are meticulously organized in a structured folder system, I decided to solve the issue myself. I built a small JavaFX application, which has been running in our living room for the past few years.

Recently, I upgraded my home server and switched to Wayland, prompting me to update the application accordingly. At the same time, I figured—why not make it publicly available? So that’s exactly what I’m doing. The application is meant to run on Gnome with Wayland

Installation is still a pretty rough experience but I plan to improve this. Head over and check it out at: https://gitlab.com/raginggoblin/slideshow

Sound loopback

In my professional life I attend many video conferences. We use all kinds of software, Teams, jitsi , Zoom etc. Right before entering a meeting I like to check if my microfone is working and adjust the sound level of my microphone. Using the command
'pactl load-module module-loopback latency_msec=2000'
I can create a loopback device with a delay of 2s. This way I can perform a little soundcheck taking care I do not enter a conference blasting everyones ears to pieces. As I enter this command many times a day I decided to create a little button to my Gnome workspace.

Checkt it out at:
https://gitlab.com/raginggoblin/sound-loopback-device
or
https://extensions.gnome.org/extension/7577/sound-loopback/

Xscreensaver, GlSlideshow on Manjaro with Gnome 41

Another post about xscreensaver? You must be kidding me! Yes, because I could not find a blogpost that guided me to a satisfying setup. The official documentation did not help me either. This is how I configured it to my satisfaction.

My computer resides in the living room and while I am not using it, it displays a slideshow of all my digital photos. Many times I find myself just sitting and watching long forgotten holidays or trips we made. This is powered by Xscreensaver with GlSlideshow which picks a random photo from my collection. However, the integration with Gnome is not very good. Screensaver did not detect when a movie is playing or when I am watching Youtube. The official documentation of Xscreensaver does mention this problem but the configuration described there did not remedy my problem causing many sighs from my wife when I had to stop the screensaver 10 minutes into a movie.

I do not want to repeat the internet so please look at the official documentation first. The problem I had lies in the fact that Gnome keeps a connection to dbus not letting xscreensaver-dbus to connect (What kind of bus is this? The message buses I work with are all about subscriptions by many clients to a topic, but I might be overlooking something). In order to let xscreensaver detect a movie running, we have to kick this Gnome connection out of the way. As I understand things, the official way is by disabling it:

cp etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop \
/home/"USERNAME>/.config/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop

add a line Hidden=true to this file and reboot. For me this did not have any effect so I took a more radical approach:

sudo mv /usr/lib/gsd-screensaver-proxy /usr/lib/gsd-screensaver-proxy.org
sudo touch /usr/lib/gsd-screensaver-proxy

This way an empty file is executed, take that you prick! This way gsd-screensaver-proxy is not capable of snatching the one and only possible dbus connection from under xscreensavers nose and xscreensaver will detect media running as it should.

A second problem I had was that sometimes white images appeared between my photos. After cranking up the frame rate this problem disappeared.

To better suit my needs I forked xscreensaver to show the (relative) path to the photo. I replaced the slashes by a newline so you get a list of folder names. Many times I was looking at a photo wondering where it was taken. As my folder structure contains hints enough to lead me into the right direction this is finally a setup that suits me. You can find my fork at: https://github.com/raginggoblin/xscreensaver

Use Java as scripting language with a shebang and syntax highlightning

Recently I have been playing with Java as a scripting language and I must say, this could become a very nice way of scripting for me. Of course, there are always soreheads that will point out Java is too slow for this and that language X or Y is so much better suited for this task, but as I am writing Java on a daily basis, I am much quicker in writing a Java script (not a javascript!!!) than e.g. a bash script. And if you do not know Java, please keep your mouth, because you have no idea how powerful it actually is. As for startup speed of the jvm, this will become less an argument because of modularity and Graal.

Using the shebang in a Java file however will rob you of all the nice features an IDE is providing you as it has no way of knowing what the file actually represents. I therefore propose (and that is what I practice from now on) to use the file extension .jv. You can than tell your IDE that a jv file should be treated as a Java file.

shebangandcodecompletion
A .jv file treated as a java file

Breeze theme for Thunderbird

Lately I switched back to KDE as I like to switch between desktop environments from time to time. One thing that always bothered me was how awful Thunderbird sticks out when using the default KDE Breeze theme. It is a beautiful theme but Thunderbird looks horrible with its GTK-ish icons. Especially because the folder icons are taken from the system theme:

Default

Yesterday I saw a nice adjustment of the Monterail themes on Github (https://github.com/BDeliers/thunderbird-monterail) that gave me enough information to make at least the folder tree a bit more pleasing to the eye.

BreezeIcons

Thunderbird still does not fit in very well, but it looks tolerable. I have tried switching to KMail over and over again but keep coming back to Thunderbird as it is just a superior email client. And with these Breeze icons I can use it on KDE as well.

Code and usage information is on my Gitlab page: https://gitlab.com/raginggoblin/thunderbird-breeze

CSV2CalDav

Sometimes a spreadsheet program is ideal for creating a schedule. But I could not find a way to import this into my calendar. In order to do this I wrote a small utility to convert a CSV file to a CalDav file. This CalDav file can be imported by any kind of calendering software.
For more information see: https://digitalcarpentry.nl/wordpress/csv2caldav
For downloads see: https://gitlab.com/raginggoblin/csv2caldav

Xfce fakes ghosting of conky characters

Since the introduction of Gnome 3 I switched to Xfce. I just couldn’t adjust to the new ways to interact with the desktop Gnome forces upon the user. Call me old-fashioned, but at least I tried! After a while I noticed however some ghosting of the characters displayed by conky.

Characters ghosting a little

I have been playing for hours to correct this. To no avail I have been trying many variations of settings of the ‘own_window_hints’. Until I noticed that running applications at the time of shutdown where restarted when Xfce was restarted. In the ‘Session and Startup’ of the Xfce settings manager, I had the option to save the session on logout deliberately disabled. Besides this, conky did not show up in the list of running applications in the ‘Session’ tab. Strange, but a ‘ps’ revealed multiple instances of conky. So no ghosting at all! Just 2 instances of conky running on top of each other.

Starting conky using the following bash snippet released me of this.

#!/bin/bash
sleep 10
conky=`ps -e | grep conky`
if [ "$conky" == '' ]; then
        conky &
fi

Python imap changes with python 3 (II)

Due to a new update my conky.rc broke (again). The script that shows the status of my email box (imap.py) now failed with the following message:

Traceback (most recent call last):
  File "./imap.py", line 37, in <module>
    server.login(username,password)
  File "/usr/lib/python3.1/imaplib.py", line 517, in login
    typ, dat = self._simple_command('LOGIN', user, self._quote(password))
  File "/usr/lib/python3.1/imaplib.py", line 1067, in _quote
    arg = arg.replace('\\', '\\\\')

This guy explains how to solve it. As a quick fix I added a new line to /usr/lib/python3.1/imaplib.py on position 1067.

arg = arg.decode("utf-8")

Though this solution will only work until the next update, for now it will do.

Systray not supported with OpenJDK and Compiz

Yesterday I stumbled upon a bug in the the OpenJDK. A system tray icon is not supported while using Compiz. I found out about this because I was playing around with the Google WindowBuilder. It kept freezing while using the Sun-JDK. With the OpenJDK it only freezes with opening a separate preview window. Then I noticed that my Infolog program wouldn’t start anymore. So when you are using the particular combination of Compiz and OpenJDK you won’t be able to use a system tray icon with Java. These options are open to you:

  1. Install Sun-JDK and don’t use the Google WindowBuilder.
  2. Install both JDK’s and use the Sun-JDK with programs that need a system tray icon, and the OpenJDK with Eclipse and the Google WindowBuilder.
  3. Install the OpenJDK en don’t bother with a system tray Icon.
  4. Stop using Compiz.
  5. Install Sun-JDK and use Windho$e in a virtual box.

The last one is not a real option of course, I only mentioned it to be complete ;-).