Use DMZ-Red mouse cursor as default

Find a download site for the DMZ-Red mouse cursor theme and download the tarball to ~/140570-Cursors.tar.gz.

Expand it under /usr/local and fix permissions :

sudo mkdir -p /usr/local/share/icons
cd /usr/local/share/icons
sudo tar xvzf ~/140570-Cursors.tar.gz
sudo chmod -R go-w DMZ-Red

Edit the *.theme files so that they look like this :

$ cat /usr/local/share/icons/DMZ-Red/cursor.theme
[Icon Theme]
Inherits=DMZ-Red

$ cat /usr/local/share/icons/DMZ-Red/index.theme 
[Icon Theme]
Name=DMZ (Red)

Link into /usr/share/icons :

sudo ln -s /usr/local/share/icons/DMZ-Red /usr/share/icons

Configure as system-wide default :

sudo update-alternatives --install /usr/share/icons/default/index.theme x-cursor-theme /usr/share/icons/DMZ-Red/cursor.theme 100

sudo update-alternatives --config x-cursor-theme

The last command should come up with a list of choices and a prompt similar to this :

There are 4 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
* 0            /usr/share/icons/DMZ-Red/cursor.theme     100       auto mode
  1            /usr/share/icons/Adwaita/cursor.theme     90        manual mode
  2            /usr/share/icons/DMZ-Black/cursor.theme   30        manual mode
  3            /usr/share/icons/DMZ-Red/cursor.theme     100       manual mode
  4            /usr/share/icons/DMZ-White/cursor.theme   50        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

In XFCE, the “Settings – Mouse and Touchpad – Theme” dialog should look like this :

Advertisement

Add youtube to Firefox “One-Click Search Engines”

Install this extension: https://addons.mozilla.org/en-US/firefox/addon/youtube-opensearch-engine/

Background Info

The underlying standard is OpenSearch.

This is what I downloaded from https://youtube.com/opensearch :

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">

<ShortName>YouTube</ShortName>
<Description>Search YouTube</Description>
<Tags>youtube video</Tags>
<Image height="16" width="16" type="image/vnd.microsoft.icon">https://www.youtube.com/favicon.ico</Image>
<Url type="text/html" template="https://www.youtube.com/results?search_query={searchTerms}&amp;page={startPage?}&amp;utm_source=opensearch"></Url>
<Query role="example" searchTerms="cat"></Query>

</OpenSearchDescription>

Firefox ESR 91 now in Debian stable

Until yesterday Debian “stable” came with Firefox ESR 78, a browser that has been unsupported by Mozilla since October 5, 2021. This lead to concerned discussions.

Now it was finally replaced by Firefox ESR 91, along with a security advisory urging users to upgrade, listing no fewer than 17 Common Vulnerabilities and Exposures (CVEs).

The delay was apparently due to toolchain issues with rustc, a compiler required to build Firefox from source code. Kudos to the package maintainers who worked hard to resolve these problems, which is tracked here!

I upgraded tonight:

$ sudo apt update; sudo apt upgrade
[..]
Get:1 http://security.debian.org/debian-security bullseye-security/main amd64 firefox-esr amd64 91.4.1esr-1~deb11u1 [58.7 MB]
[..]
Unpacking firefox-esr (91.4.1esr-1~deb11u1) over (78.15.0esr-1~deb11u1) ...
[..]
Setting up firefox-esr (91.4.1esr-1~deb11u1) ...

Besides the security fixes it looks like Mozilla has once again opted for further flattening the appearance of UI elements.

What else is new: https://www.mozilla.org/en-US/firefox/91.0esr/releasenotes/

Make lightdm look better

In Debian 11 the default lightdm login screen had two visual flaws:

  • The infobar content on top of the screen was not properly centered.
  • The generic user icon was some faint white thing.

I edited /etc/lightdm/lightdm-gtk-greeter.conf and added these two settings in the greeter section:

[greeter]
default-user-image=/usr/share/icons/Tango/scalable/apps/system-users.svg
indicators=~host;~spacer;~clock;~spacer;~power

For the icon to work the Tango icon theme is required. It is usually already installed. If not, run this:

sudo apt install tango-icon-theme

The icon looks like this:

Switch Debian 11 desktop-theme

I do not like the default Debian 11 Homeworld desktop theme at all.

Here is how to switch back to “futurePrototype” the default theme of Debian 10, but without displaying “Debian 10” anywhere:

sudo update-alternatives --config desktop-theme

Pick the /usr/share/desktop-base/futureprototype-theme.

Then to ensure we use the “nologo” background for the login manager:

sudo update-alternatives --install /usr/share/images/desktop-base/login-background.svg desktop-login-background /usr/share/desktop-base/active-theme/login/background-nologo.svg 100

Now you should see background-nologo.svg as the activated option for the desktop-login-background:

sudo update-alternatives --config desktop-login-background

The desktop-theme change also affects the background image of the grub boot loader, so we need to run this:

sudo update-grub

The next time we boot the system we should see background images from the configured theme for

  • Grub boot screen
  • Login manager (for example lightdm)
  • Desktop (for example XFCE)

Enter passphrase once at X login for ssh, scp, sshfs

I use ssh, scp, sshfs and x2go with key-based authentication, ie. not entering remote passwords when I connect. There are pros and cons of this, but I think it is more secure.

I use a non-empty passphrase but do not want to enter it on every connection. Once per X session is enough for me.

Here is how I set it up on Debian 11 (“bullseye”):

# do this once and set a good passphrase:
ssh-keygen
# then for each of your accounts on remote hosts:
ssh-copy-id username@otherhost

Configure ssh agent and ssh-add to run when your X session starts. I use the gnome-keyring service as agent:

sudo apt install gnome-keyring

In XFCE – Settings – Session and Startup – Application Autostart, I have two entries with trigger “on login” :

  • “SSH Key Agent (GNOME Keyring: SSH Agent)”
  • “ssh-add” – created by me, command: ssh-add

This setup will bring up a visual prompt for your ssh passphrase right after XFCE login. The default ssh-askpass looks quite ugly, so I installed a more modern one:

sudo apt install ssh-askpass-gnome

On Debian, that package sets itself as default ssh-askpass “alternative”. If in doubt , try this:

sudo update-alternatives --config ssh-askpass

The resulting prompt looks like this for me (“Adwaita Dark” theme):

After all this your ssh, scp, sshfs, x2go and other ssh based tools should be able to connect to your remote accounts without password prompts.

Update: I took convenience one step further and enabled “Launch GNOME services on startup” in the Advanced tab of Session and Startup in the XFCE setting, as described in the XFCE wiki.

This activates GNOME Keyring which “is integrated with the user’s login, so that their secret storage can be unlocked when the user logins into their session”. This means it will store your once entered ssh passphrase on disk, using your Linux login as the only secret that you still have to enter (as you log in as usual).

Hide window from taskbar

Some application windows are sort of “background noise” and you would usually not like to see them on your taskbar, i.e. on the panel item that shows a button for each application window. Often, applications like that support a “minimize to system tray” option, but some don’t.

In the latter case you might at least want to have a convenient way to hide those windows from your taskbar. I did the following on Debian stable:

Install the “wmctrl” package:

sudo apt install wmctrl

In my XFCE, I added a launcher to the panel, specifying the command:

wmctrl -r :SELECT: -b add,skip_taskbar

See “man wmctrl” for details.

Webex web client in Firefox could not acquire local media

If you run Webex Teams – i.e. http://teams.webex.com – in Firefox and join a video meeting, you might see the error

Could not acquire local media. Please check your settings.

This probably means that support for the H264 video format is missing.

Go to “about:config” and search for

media.gmp-gmpopenh264.enabled

and set it to “true”.

Restart Firefox, and go to “about:addons”, click “Plugins”.

The plugin “OpenH264 Video Codec provided by Cisco Systems, Inc.” should now be installed, and video calls in the Webex web client should now work.

Server folder as photo gallery in web browser

I wanted to make image folders on our family file server browseable and provide convenient image gallery features like index view, slideshow, etc.

The file server is on our home network and runs Debian GNU/Linux.

I installed webfs, configured it to use port 80 (instead of its default port 8000), added a symbolic link to the root folder of the image folders that I wanted to make browseable (/opt/data in my case) and restarted webfsd:

sudo apt install webfs
sudo sed 's/web_port=.*/web_port="80"/' -i /etc/webfsd.conf
sudo sed 's/web_root=.*/web_root="/var/www/html"' -i /etc/webfsd.conf
sudo sed 's/web_index=.*/web_index="index.html"/' -i /etc/webfsd.conf
sudo ln -s /opt/data /var/www/html
sudo service webfs restart

The name of the server is “bubba” and at this point pointing a web browser to http://bubba/ already worked, but it only showed a simple listing of file names like this:

Next I installed the Slideshow Firefox add-on on all our computers, and now the image folder is presented like this:

Mission accomplished! 😀

Testing HTML5 / CSS3 editor BlueGriffon

I used to use the now-outdated Mozilla based editor Kompozer, which was a bug-fix fork of Nvu.

Today I realized that in the meantime (since 2015) the Nvu author Daniel Glazman has developed BlueGriffon, an Open Source next-generation Web Editor based on the current rendering engine of Firefox.

I just installed it on Windows at work and my Debian laptop at home and plan to give it a try.

If it is easy to use and generates clean standards-compliant code, I might use it for Web UI mock-ups and other prototyping. :)