Project Zebra: Let me know when you find out... ►

◄ Project Zebra: Project Zebra: And this is your brain on Cake

2018-10-24 📌 Project Zebra: Stand by for action. 5, 4, 3, 2, 1...

Tags 🏷 All 🏷 Linux 🏷 Tech 🏷 Personal

This entry is part of my Project Zebra series covering migration to Linux for personal computing use.

This entry is mainly about retaining functionality after updates, because progress isn't always in one direction.

Let's start off with the bits that are more likely to help other people searching for solutions... Thunderbird 60 breaks both FireTray and Lightning – two extensions providing very basic functions, a tray indicator for new mail and simple calendars. Both can be resolved, but for the average end user using those features 60 (released some months ago but just now filtering down into repositories) offers a very poor upgrade experience. The reason is that Thunderbird has been forced to swallow the Quantum extension limitations that made DownThemAll difficult if not impossible to be rewritten for Firefox, and thus the browser a write-off for quite a lot of people.

Starting with calendars, the 6.2 beta of lightning works fine, just install it like any other xpi;

Since my solution for a tray icon is a bit more involved (and something I've worked out for my desktop environment, which although isn't Windows the generic approach would work on any operating system) here's some discussion of the issues; is one approach to a solution, using a separate piece of software to overcome extension limitations, but is in early development. It's also Linux-only.

Xfce (and most desktop environments) have their own separate panel/taskbar notifiers, but that does rather defeat the point of having a calendar extension as it means Thunderbird isn't running in the background;

I also wondered if it would be possible to reverse engineer the Xfce panel Indicator Plugin and/or the Messaging Menu extension, and get "new mail" signals via dbus, but couldn't figure that out.

However (and much simpler) there is a Thunderbird add-on that can run a custom command when there's new mail;

So here's a simple script that uses yad to create a tray notification icon. On Windows the same sort of thing could be done with AutoHotkey, and I'll figure it out in a virtual machine if I get chance.

if ! pgrep -f yad.*mail-mark-unread.*thunderbird &> /dev/null 2>&1; then
yad --notification --image="mail-mark-unread" --listen --command="sh -c 'thunderbird ; pkill -f yad.*mail-mark-unread.*thunderbird'" &

i.e. If the notification icon isn't already running, create it and make it so that when clicked it runs Thunderbird (which raises its own window if it's already running) and removes the notification icon.

The --listen and the & are probably superfluous. I was messing around with different options to make the icon persistent, when it's just as easy to pkill it after it's clicked.

Minimising to tray I handle using kdocker (on Windows the best thing is probably RBTray or its fork) and a reminder about kdocker: under Xfce the Notification Area panel plugin works a lot better than the Indicator Plugin when it comes to tray icon handling, allowing single click actions rather than creating icons that always use a menu.

Now I just have to remember to minimise the Thunderbird window rather than close it.

Chrome/Chromium with a GTK+ style is growing on me. I don't like the washed out address bar, but in other respects it looks suitably retro next to the Raleigh-type 3D theme I use.

More annoyingly something changed in Chromium when new tabs are opened (or tabs are paused for a while) that seems to make pulseaudio treat them as new applications and switch to the default sound device (which for me is a USB soundcard with headphones plugged in, to avoid applications stealing the output). It is acknowledged, so hopefully it'll be fixed in due course;

This seems to help but isn't foolproof;
(Edit /etc/pulse/ and comment out "load-module module-switch-on-port-available" then run "pulseaudio -k" to apply).

Since I was reading around I went a bit further down the rabbit hole since I wanted my volume shortcuts to control a different audio device to the one set as default;

Use "pactl list sinks short" to list out your devices and find the numbers.

As a side comment, that [ sh -c "command ; command ; command" ] looks like a good habit since it's effective for chaining commands in situations it doesn't normally work and might otherwise need a short bash script.

sh -c "pactl set-sink-mute 1 toggle"
sh -c "pactl set-sink-mute 1 false ; pactl set-sink-volume 1 +2%"
sh -c "pactl set-sink-mute 1 false ; pactl set-sink-volume 1 -2%"

I also figured it was worth created a generic monitor volume indicator that can show if a sink is on or muted (for use next to a launcher for pavucontrol);

pactl list sinks | perl -000ne 'if(/#1/){/(Volume:.*)/; print "$1\n"}' | grep -o '[0-9]\+% ' | head -1
pactl list sinks | perl -000ne 'if(/#1/){/(Mute:.*)/; print "$1\n"}' | sed -r 's/.{6}//' | awk '{gsub("no","ON");gsub("yes","OFF");print}'

Going back to the sh -c tip I've updated my pass-through Foobar shortcuts;

sh -c "xdotool key --window $( xdotool search --limit 1 --all --pid $( pgrep foobar2000 ) --name foobar2000 ) Super_L+Insert"
sh -c "xdotool key --window $( xdotool search --limit 1 --all --pid $( pgrep foobar2000 ) --name foobar2000 ) Super_L+End"
sh -c "xdotool key --window $( xdotool search --limit 1 --all --pid $( pgrep foobar2000 ) --name foobar2000 ) Super_L+Delete"

And the launcher I use to control my second monitor and show desktop;

sh -c "xrandr --output VGA1 --auto --output HDMI3 --auto ; xrandr --output VGA1 --off"
sh -c "xrandr --output HDMI3 --auto --output VGA1 --auto --below HDMI3"
sh -c "if wmctrl -m | grep 'mode: ON'; then ( exec wmctrl -k off ) else ( exec wmctrl -k on ) fi"

Before being done tinkering, I set Win+E to "exo-open --launch FileManager" and removed most of the standard Xfce application shortcuts apart from Ctrl+Alt+T for terminal and Ctrl+Alt+Escape for xkill, the latter which I've never used but looks handy and works similarly to the "kdocker -fq" crosshairs picker.

On a side note, since turning off hardware acceleration VLC has still hung once – if it does it again I need to see if it responds to Alt+F4 shortcut, which I never actually thought about trying, and also that Ctrl+Alt+Escape shortcut I've set up for xkill.

In Windows news, 10 has been wiping files randomly in some upgrades, Microsoft is seeing an edging out of Windows on its own Azure platform and people are getting increasingly pissed off with things like Candy Crush and Disney Magic Kingdom being spammed onto Windows, plus being used as unpaid testers;

Now, onto a grab bag of bits and pieces… recommends against Grub Customizer… and against removing default applications… and against installing Nautilus… I suppose I'm not exactly the newbie audience they're cautioning, in fairness, it's just the tone rubbed the wrong way a bit.

There've been a lot of interesting anniversary-style articles about Linux this year; plus an older one –

PDF splitting and merging: take a look at if you need to work with existing PDF files and don't have a full version of Acrobat. I was looking for something a little more shiny than GUI_PDFTK for colleagues and since Java is part of a standard deployed image at work, that requirement isn't a blocker. PDFsam Basic has a range of nice features including optionally creating an index page for merged files.

I'm making a mental note to look into systemd-analyze and systemd-analyze blame, although honestly my system boots and shuts down well.

Linus has conceded being a bit less abrasive, whilst putting across his reasoning well – – although the fact remains most development communities will always support giving incompetence both barrels so I doubt big companies will get away without comeuppance;

Kernel development is the site of a lot of battles, because eg certain companies with vested interests in DRM persistently submit patches that are designed to allow users to be locked out from controlling their own hardware. But it can also mean that things get personal when code such as TuxOnIce (which offers a better experience for users with system hibernation) gets refused.

Looking forward (at time of writing it'd been released but I hadn't upgraded yet, I wanted to look at my Timeshift settings first and decided to stick to a couple of daily snapshots rather than also using boot ones, since I usually hibernate) Xubuntu 18.10 will be getting more Xfce 4.13 enhancements, and there are some interesting things such as saving display profiles, dialogue window polishing and refreshing the Elementary icon scheme (I'm a fan of manila rather than blue folders, the filing system icons on my install are currently copied in from Faenza) –

Of course, since writing that I've jumped straight in, which did take a little bit of forcing... if necessary just do a "sudo apt update && sudo apt upgrade" to flush, then re-run Software Updater.

The only quirks during was xscreensaver needing to be shut down during the upgrade (which was flagged by a warning message – apparently libc upgrades could otherwise cause problems during – and a few files I'd modified got prompts to overwrite (which I accepted on the basis that re-applying tweaks ensures that the rest of the config is as expected).

So for /etc/sysctl.conf it was subsequently a case of adding back


Which I created as /etc/sysctl.d/local.conf this time so maybe it won't be overwritten in subsequent upgrades. Cache settings make a huge difference to responsiveness when doing file system scans during backups. smb.conf and grub config likewise get taken over if you let them – I haven't bothered to recreate smb.conf as I haven't used shared folders since the last time I set them up, and grub was a quick tidy up with Grub Customizer.

And of course don't forget to re-enable repositorites you want to check for updates.

First impressions of Xubuntu 18.10 are that as expected it's a polishing release. There's more GTK3, including the panel, launchers and the system clock calendar. This included the panel buttons reverted to dimming (which makes me strain to see them) and of course the gtkrc setting didn't work any more... other quirks appear to include xfce4-panel -r failing sometimes and xfce4-panel & being needed to start it. Also, the Truecrypt icon frequently disappears when it's restarted, although since the Truecrypt icon now often displays with a black frame (but can be re-run from a start menu shortcut) it's not really a hardship. Lastly, my background settings got overwritten and a wallpaper applied before I reverted to #3B6EA5.

So, over to ~/.config/gtk-3.0/gtk.css to make some changes;

#whiskermenu-button { font-weight: bold; font-size: 1.2em; border-top: 1px white solid; border-left: 1px white solid; border-right: 1px gray solid; border-bottom: 1px gray solid; margin: 0; }
#whiskermenu-button label { margin-left: -4px; } /* bring text closer to 'X' icon */
#whiskermenu-button:checked { background-color: #e0e0e0; border-bottom: 1px white solid; border-right: 1px white solid; border-left: 1px gray solid; border-top: 1px gray solid; }

.tasklist button { border-top: 1px white solid; border-left: 1px white solid; border-right: 1px gray solid; border-bottom: 1px gray solid; }
.tasklist button:checked { border-bottom: 1px white solid; border-right: 1px white solid; border-left: 1px gray solid; border-top: 1px gray solid; }

* {
-XfceTasklist-minimized-icon-lucency: 100;

The last bit is with thanks to Toz on - it looks like that's a general equivalence between GTK2 settings such as XfceTasklist::minimized-icon-lucency and GTK3. Incidentally, I tried the new elementary icons but they're a bit too washed out to be distinct in the file explorer, so sticking with old elementary plus parts of faenza it is.

It's interesting… on the one hand, Xfce is in state of transition to switch from GTK2, so with each Xubuntu release things change, and not necessarily in ways you want, but the desktop environment is inherently so customisable (without any other software required, just the tools/options it comes with) you can get things to be comfortable pretty easily. It's the opposite of Windows, where Microsoft doesn't give a toss about accessibility and paints white-on-black and white everywhere without giving users adequate tools to deal with that.

Or Gnome, where there some people who want to take away options and the selling points of a customisable environment every bit as much as Microsoft in the belief that the "one true way" is tablet-sized widgets, no traditional menus or toolbars, and trying to convince other developers to stop supporting tray icons, customisation and alternatives to other things mentioned. A recent example being:

Mint is consistently a top-ranking Linux distro partly for this reason: it doesn't use Gnome 3, but a choice of desktop environments (Cinnamon, MATE and Xfce) based on traditional desktops all very similar in overall layout to Windows. The current popularity of Manjaro and MX Linux, which use Xfce as their default desktop environments, speaks volumes. Even Ubuntu, which ships Gnome as default, doesn't drink the koolaid and adds back in features Gnome devs have removed. And the main pieces of software users rely on, web browsers and office suites, have largely ignored Gnome's bullshit.

Anyway, there are still a lot of projects that use GTK2 (and presumably a lot that have shifted to GTK3 but not made it into Ubuntu's repositories yet), but having the base desktop environment transitioned enough for panel elements to be consistent is more than enough personally.

💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.