Change order of experts in GExperts Expert Manager

Prompted by a post on Delphi Praxis, I just added a new feature to the Expert Manager expert in GExperts (lots of experts here 😉 ): It can now change the order in which the experts are loaded into the IDE.

This may be important e.g. if you are using Andreas Hausladen’s Delphi Speed Up or IDE Fix Pack as those should be loaded before any other plugins.

Note that in order to these changes to have any effect, you need to save them! That’s no longer done automatically.

As there is no new release of GExperts yet, you need to compile your own DLL to get this feature.

Discussion about this post in the international Delphi Praxis forum.

RIP Michail Gorbatschow

I think we as Germans still cannot really appreciate the effect he had on our country. I also think the war against Ukraine would not have happened if he had been in charge for a few more years, but we will never know.

Rest in peace Gorbi!

Installing Webmin on Ubuntu 22.04 server

As a follow up to my notes on installing Webmin on Ubuntu 16.04 and 18.04 (on 20.04 it worked as in 18.04) now two additional steps are necessary for Ubuntu 22.04. Those steps must be executed as root:

  1. Convert Webmin’s PGP key to a format that apt can use to verify files:
    cat jcameron-key.asc | gpg --dearmor -o /usr/share/keyrings/webmin.gpg
    
  2. Add that key to the entry in webmin.list like this:
    deb [signed-by=/usr/share/keyrings/webmin.gpg] https://download.webmin.com/download/repository sarge contrib
    

    I got that from a tutorial by DigitalOcean.

Where did Microsoft move the underline menu shortcut option?

So I don’t forget:

Microsoft seems to love changing the place where they hide useful configuration options. One that I always turn on is “Underline access keys when available” and in Windows 10 it is now in “Keyboard” -> “Change how keyboard shortcuts work” which is about half way down the page just where it won’t be visible without scrolling.

Setting colors for Linux ls command

Those people who selected the default colors for the Linux ls command must have much better eyes than I. E.g. I think that dark blue text on black background is very difficult to read, but apparently they think it is fine.

Fortunately it is easy to change these colors by setting the LS_COLORS environment variable. To make that change permanent, I put it into my .bashrc file like this:

LS_COLORS=$LS_COLORS:'di=1;35:' ; export LS_COLORS

I have put this here so I can easily find it whenever I need it. If anybody else finds this useful, you are welcome.

added support for TColor and Local Variables to dzDebugVisualizer

After making the source code of dzDebugVisualizer available I got interested in Debug Visualizers in general and had a look at how they are supported in Delphi 11. I wrote a visualizer for TColor, based on an old EDN article (now only in the Internet Archive). And after that I simply added that functionality to dzDebugVisualizer. It supports both, the Watch window and Evaluate and Modify dialog. In the latter, there is now a new modifyer key ‘L’ for Co*l*or. The output shows three values:

  • The color name, e.g. “clLime”
  • The web color name, e.g. “clWebLime”
  • The RGB value, e.g. “RGB(0, 255, 0)”

On top of that I moved the new menu items to a “Visualizers” submenu and added support to the “Local Variables” window as well.

These changes have already been committed to the svn repository on OSDN.

dzDebugVisualizer source code available

Several years ago I wrote a Delphi IDE plugin to extend the functionality of the “Evaluate and Modify” dialog as well as the Watches window called dzDebugVisualizer and even released an update for it. Back then I wasn’t sure whether I wanted to open source it or possibly commercialize it. I am now sure that the latter isn’t worth the effort, so I have made it open source under the Mozilla Public Licence 2.

You can find the source code on OSDN. And since I was at it, I also added support for Delphi 2009. To install it, get the source code, open the appropriate package, build and install it into the IDE.

For the description see the links to my old block posts.

Thunderbird 102.0.3 no longer asks to accept a self signed certificate for IMAP

One of my computer’s hard disk didn’t survive a recent power failure so I had to set up its Thunderbird client again (a backup didn’t work, don’t ask). My internal IMAP server uses a self signed certificate which worked like a charm until now. Normally, the first time Thunderbird connects to the server after the account has been set up, it will display a warning for this certificate with an option to permanently accept it. This warning did not come, so no emails were available. The same procedure worked fine for the similarly configured SMTP server, so apparently the feature/workaround for self signed certificates wasn’t removed on purpose.

I found two workarounds for this:

  1. Start with an older Thunderbird version (102.0.0 worked fine for me) and upgrade to the latest one. Unfortunately older versions seem to vanish from the interwebs within a very short time when a new release comes out (or equally possible my Google Fu has failed me again [it did, here they are]).
  2. With Thunderbird 102.0.3, in Account Settings -> Server Settings set Connection Security from “SSL/TLS” to “none”, then try to get the emails. All of a sudden the missing dialog popped up, I could accept the certificate and emails started being downloaded. While that was running, I changed the setting back to “TLS/SSL” and all seems good now.
    I found this by pure chance because I was desperate enough to completely disable SSL just to get to my emails.

I am posting this so I can look it up later in case I need it again (Google will hopefully turn it up when I search for a solution). But if it helps others too: You are welcome.

I’m sure many people are now itching to suggest other possible solutions. If your’s is “Use Let’s encrypt certificates”, please read the following link on why you might not want to do that for internal servers.

Some Linux tools for handling and filtering the passwd file

Linux (and other Unixes) store user information in a file called passwd and the associated passwords in another file called shadow, both located in /etc. Both files are text files and use a : as the field separator.

I currently have the need to sort and filter these files in various ways. This post is mostly so I can look it up later, but if it is useful for others, you’re welcome.

Sort the passwd file by the user id

The user id is stored in the 3rd field of the file and it is numeric:

sort --numeric --field-separator=: --key=3 passwd

Remove computer accounts from passwd and shadow

If the computer is used as the domain controller for a Samba NT4 domain, the files contain entries for all computers in the the domain. These user name for these entries ends in a dollar sign “$”. So we need a regular expression that excludes all these entries.

grep -v "^[^:]*\$:" passwd
grep -v "^[^:]*\$:" shadow

Remove system users from passwd

On a Linux system there are many system accounts that are used for special purposes, e.g. for the web server, email or backup. These accounts have a user id < 1000 (this might be some specialty of Ubuntu Linux). We only want lines where the user id has 4 digits. We also must be sure that these 4 digits are in the user id field, so we have to anchor the regex on the start of the line and skip the name and password (always "x") field.
egrep “[^:]:x:[0-9]{4}:” passwd

(On servers with very many users, there may be user ids with more than 4 digits, but that doesn’t currently concern me.)