Rainbow #Aberdeenshire

Digital Camera

Image | Posted on by | Leave a comment

Ubuntu 19.10 and #icewm

So, I’ve got my new ubuntu version going. Installing took awhile, seemingly longer than what I’m used to. An error was reported during the process. I ignored it, figuring it was not fatal. Fortunately, I was right.

I used to hate Ubuntu’s default desktop. What is it? Unity/GNOME? Now I can grudgingly accept it. It’s not too bad. Ubuntu’s customisation of GNOME is reasonable.

I still think there’s things it doesn’t get right, though. Docks are a bad idea, in my opinion. They waste too much space. Windows 95, with its toolbar, is a far better layout. The title bars are too chunky. The active window has a darker font, but it’s too subtle. Windows 95 solved all this. Inactive windows should have lightly coloured title bars, and the active one should have a dark title bar.

In some ways, theming a windows manager is the easiest thing in the world. It’s about simplicity, about all those little details done right that add up, about evolution, not revolution.  What see, though, is a case of two steps forward, one step back, as designers chase ideas that don’t work, and discard ideas that do work.

There’s probably only one really good interface innovation in a decade.  Most of the rest is just busywork. Desktops were largely a solved problem in 1995, despite it never being the year of Linux On The Desktop since then.

I have tried a few desktops. I think the following are lightweight and serviceable: LXDE, Fluxbox, and Cinnamon. The few times I had tried IceWm I baulked at its aesthetics. But I installed it again, and it’s beginning to grow on me. Let’s face it, it will never be a “gorgeous” desktop. It’s a desktop for those who want an environment that does what it needs to do, and stays out of the user’s way. Actually, IceWm seems to have better ideas about how the windows should be laid out than most WMs.

“Most of the themes look like mad colorings of a third grader,” said one webpage. That was in 2002. Things haven’t gotten much better since then. I find the Windows95 theme to be the best, actually. The wacky aesthetics have been eskewed for a more basic design.

IceWm does need some customisation, I feel. I populated the Quicklaunch tab with choices more to my liking: PCManFM, Firefox, Thunderbird, and xterm. I also made the desktop background a pleasant dark gray, which I prefer over an austere black background.

I would like to figure out how to add a volume control applet to the control panel. That would be a useful feature.

I would also like it if IceWm had aerosnap. I cobbled together a work-alike solution using wmctrl.

The more I use it, the less I tend to care about its fugly 90’s feel. So I think I’ll be sticking around with IceWm. Famous last words.

I did try Enlightenment for a brief spell. It was cutesy. I quickly tired of it, though. I would have to set up the clock a bit better. I’m not a fan of docks. There doesn’t seem to be a Folder icon in the dock. There is one on the desktop, which is a pain in the arse, because it usually obscurred by a window.

I mean, some people will like Enlightenment, and if I stuck with it I’d probably be able to massage it into something much more to my liking. But I didn’t feel inclined.

I am tempted to remove gdm3, the display manager. For some reason, IceWm doesn’t execute the startup file or register the keys when I start it from the display manager. It seems to be OK when I start it from the command-line, though.

There we have it.



Posted in Uncategorized | 1 Comment

Brown noise sleep machine

Here’s my fantabulous sleep machine, so far:


I haven’t finished painting it, squaring it off, or adding some mesh to protect the speakers.

As a first step, let’s build a white noise generator. You can find electrical circuits online (or here) to do just that. I opted for something simpler: using a MCU (microcontroller) to generate random on-off signals to generate the white noise. I used an ATTiny85 in my circuit, which is a nice, cheap MCU. It is overkill for the task, but the chips are cheap, and it is what I had available. An Arduino Uno would be excessive overkill for the project, but you can use it if you want to experiment. I found RS Components to be a great supplier, where the chips cost about £1. You could use cheaper chips like the ATTiny45. The 85 cost just a little more than the 45, but will give you more breathing space for your projects. Really, most chips will be up to the task for what this project needs it for.

The code for the Arduino IDE is as follows:

const int SPK = PB1;// Pin 6
void setup() {
  pinMode(SPK, OUTPUT);

void loop() {
  digitalWrite(SPK, random(2));

The code is so simple that you should not have any problem adapting it to your MCU.

Here is the schematic:


Here are the components I used:

  • R1: 100K ohm potentiometer. This was really too much for what I wanted. I would recommend that you try to 1K pot, and see how that suits you. If the volume is still too loud, then maybe try a 10K pot. If the volume is too low, then try a lower pot.
  • D1: 1N4148 diode. This is a pretty common diode. Many diodes are likely to be suitable. At a pinch, you can omit the diode, but I advise you to use one if you have one. It acts as a flyback, a protective measure to against voltage spikes caused by inductive loads, in this case the speaker.
  • SPK: 4 ohm 5W speaker. This is quite large, and probably overkill. Just use whatever speaker you have at hand.

Instead of sticking slavishly to my specs, feel free to experiment. There is considerable scope for using other components. Do not over-fuss your design at this stage, because producing Brown noise will change it.

Note that I have used 5V as input. You might feel happier using 3.3V, but note that it will affect you choice of potentiometer and maybe speaker. Although the specs for the ATTiny85 say that it takes 3.3V input, I found that it was 5V tolerant. You have to be careful with voltages going in an out, as it possible to wreck the chip if you do things in a bad way. The ’85 was perfectly happy with my particular setup, though. I have accidentally abused ’85 chips in the past, and they have shown themselves to be quite robust little chips.

White noise has equal intensity at equal frequencies (Wikipedia). This sounds tinny and harsh to humans. The problem is due to the high frequencies. In order to produce a more pleasant sound, we need to attenuate those high frequencies. This is called a “low pass filter”.

Fortunately, there is a very easy way to do this: add a capacitor. We won’t produce the exact Brown Noise frequency response, but our results will be perfectly adequate for our purposes. We have thus created an RC circuit. A schematic of the intensity output of a resistor-capacitor at a given frequency looks something like this:


Compare this with proper Brown noise (as might be generated by Audacity):


Our modified circuit looks as follows:


It is basically the same setup, except that an electrolytic capacitor C1 has been added. I found that 100uF to be suitable. If the output sounds too tinny, which I think is unlikely, then increase the capacitance.

As you increase the capacitance, the output volume will go down. So you might try experimenting with a lower capacitance and potentiometer.

I hope you found this article useful and get a good night sleep as a result.

Update: This post is being discussed on Reddit.

Posted in Uncategorized | 1 Comment

Absolute Linux: first impressions

Being bored with Ubuntu, I decided to have a go at Absolute Linux , herein after referred to as Abs.

Abs is based on Slackware Current, with releases every couple of months. Abs is designed for older PCs, for which mine definitely qualify. I am a fan of fast systems in any event, and would consider using them over more bloated systems whatever the age of my machine.

Abs comes with the IceWm Window Manager. No other Window Managers are included, apart from the twm fallback. I am using a 1080p TV screen to test the WM, instead of a proper monitor, so I expect my screen to look worse than it would on a nice monitor. My past experience with IceWm is that it is fast, but with a ghastly mid-90’s look and feel. I was pleasantly surprised. Presumably Abs has done some customisation.

It’s not a pretty WM, but it’s not an eyesore. It is a fast one, though. Abs has added a default background which is grey, with text saying “Absolute Linux”. My verdict on this is: great! It’s simple, and unobtrusive, exactly how a desktop background should be. It there’s any Abs distro developer out there: do not change the background, perfection has been achieved!

The developers have eschewed gradients and fancy colour schemes. I hate gradients anyway, as they can look a bit naff if the rendering isn’t perfect. Colour schemes are also difficult to get right, and the team have actually got it right by not trying too hard to be fancy.

There are a few other desktop backgrounds to choose from, but I preferred the default. You can also choose a solid background colour if you like. What I do is have the default background for a regular user, and a red background for root.

Actually, there’s a neat trick here. I login in as a regular user using the login manager. In a separate virtual console I log in as root, and type “startx” to get a root X Windows session. I can flip backwards and forwards between the two sessesions using Ctl-Alt-F7 and F8.

Logging in as root is frowned upon, of course, but I think it’s OK for the first few times to get the box configured properly.

So far, I have concluded that Icewm is a good choice of WM. It even auto-mounts disks that are inserted. It’s nice, lightweight and doesn’t lack any important features. Except areosnap, which I think that all WMs should do.

I have two X Windows sessions going, including Chromium, and the system is using up 383M of memory. Good!

The thing I like about Abs over Slackware is that it has more up-to-date software. Yeah, I know Slackware users should be more concerned about stability over shiny shiny, but having said that, I have noticed that more recent software tends to have a better polish to it and is a little easier to use. I also like the latest version of GCC for development purposes, so there’s that.

I would argue that Slackware stable is too old, in general. Maybe it’s OK if you want to use it as a server where you never need to change anything, but for most people, something that is not as ancient is a much more sensible option.

Abs users can also make use of sbopkg, which is a boon.

Where Abs lets itself down compared to Slackware is it does not include Thunderbird mail, tmux or vim. I have compiled tmux and vim fairly easily. Still, I think they should be available out of the box.

Abs does have Chromium, which is OK, but I hate the fact that it doesn’t have a  more conventional menu and bookmarking system. Abs also includes a web browser called Falkon, which follows conventional desktop conventions, and I am more inclined to use. It also uses DuckDuckGo as a search engine, which I am increasingly favouring over Google for privacy reasons.

Youtube works out-of-the-box with both browsers, which is great to see.

I have tried Slackware Current a couple of times in the past. I failed to install it once. On another occasion I had a couple of things I wasn’t happy about. So I think Abs is a good distro to try if you like the principles of Slackware, think that the stable branch is way too old, and want a more polished version of Current.

Abs is obviously lighter in weight than Ubuntu with its bloated GNOME stuff, but has far less in the way of software. My main computer is Ubuntu 19.04 running LXDE as a WM. I have grown not to hate GNOME too much, although its resource utilisation is something I am unhappy with.

I like Slackware’s init system, too. It’s very easy to understand and configure. In other words, not systemd, which seems more hassle than it’s worth, in my opinion.

Anyway, make of that what you will. If I make sufficient progress on my test machine, then I might consider ousting Ubuntu from my main PC. We shall see. It has to be said, though, that Ubuntu is a pretty good distro despite its negatives.



Posted in Uncategorized | Leave a comment

A personal message

It seemed an opportune to write this post. It is aimed at the people who knew me personally, from the Glasgow Caledonian University days, rather than for general consumption. I decided to write it because there was talk of a get-together at Glasgow. Also, David made contact with me recently.

It’s probably not wise to divulge too much information on a public forum, but here goes anyway …

As you all know, I was frequently taking the mickey out of the university, and several people there. If I had caused offence, then I apologise to the people concerned. Most of it was meant in jest, but some of it overstepped the line. My treatment of Arlene was particularly uncalled-for. Looking back, I must have seemed like a bit of a tearaway. To quote Mark Sinclair, “we’ve created a monster.”

I am a man with particularly underdeveloped social skills, so I hope that you will all forgive me for my misdemeanours. Despite all my snide put-downs, I want you to know that my time at the university was very special to me, and something I look back on in fondness.

I also treasured the gifts that you gave me when I left the university. I know that they were a little joke on your part about how much I berated the university, but they did mean a lot to me. I still have the hat, and use it frequently; not now that it’s summer of course, but in the winter, for sure.

I used the mug regularly, mostly at work. Unfortunately, it eventually broke, although I did get a solid decade’s worth of use out of it. I was so attached to that mug I decided to get another. Unfortunately the replacement was rather flimsy, and broke within a few weeks. Alas, the quality of their merchandise fell short of my expectations from such an august institution. Cough.

If anyone knows how to pass this post onto Jagan, or indeed anyone else who may be interested in an update, then please do pass a link to this article along. I think that I hadn’t shown Jagan enough appreciation for his supervision on my thesis. If you’re reading this Jagan, then I thank you, and hope I wasn’t too much of a handful to deal with.

I value you all. I had a great time. I wouldn’t necessarily want to repeat it, but it was great nonetheless. It is of course David that I formed the deepest bond with. I consider myself lucky to have him as such a close friend, even though contact has waned over time.

Ah, nostalgia ain’t what it used to be.

If any of you want to chat with me personally, then feel free to do so. If you want some kind of collective “Question and Answer” session, then maybe we could do something like that, too.

Many of you have gone on to achieve distinguished careers, becoming professors, heads of departments, hedge fund bigwigs, and so on. My life is rather more humble, however. I joined an outfit called IQ Financial in the early 2000’s. They were bulking up in staff in anticipation of a big sale. That sale never materialised, so they made a complete about-turn.

I was laid off after only being there for about a month. I moved back in with my folks up in Scotland. I found a job in 2002 at a company called Smith Rea. It was an Oil & Gas consultancy. I secured the position because of Russell, a friend I had made whilst at Sheffield University. I owe him an enormous debt of gratitude, and like David, he is a very close friend. I do not make many friends, but of the friends I do make, the friendship runs deep.

Smith Rea was acquired by Intertek, a big UK company, and a constituent in the Footsie. They basically bought out Smith Rea at its peak. A few years later the price of oil declined, and they ceased many of their operations in that sector, and of course ousted staff in the process.

That was in 2015. Although no-one said it, I knew that I was not an especially valuable employee of the company. I had not lived up to the potential that they expected of me. So I was one of the first out the door, at a time that they considered that their Aberdeen operation might still be viable.

I had always figured that Intertek would be the last job I would ever have. That assumption has, so far at least, turned out to be true. A programmer in his 50’s does not stand much chance.

It has given me time to pursue my own interests at any rate, even if those interests have only amounted to staring at the internet.

I started some hobby projects in programming. Most recently, I have been interested in mcus (microcontrollers). These are tiny “computers”, but with only a fraction of the power than the ones that drive your typical desktop PC.  They are typically used to control electronics. I have made a few devices. They can be fun to program, but also frustrating at times. It’s great to be able to create a little device that can be run off of a coin cell battery, though.

I’ve also got into doing some exercise on a regular basis. Nothing fancy, just some cardio, flexibility stuff, and some running. I’ve done a few “parkruns.” These are free public group runs held each Saturday. It’s become a world-wide phenomenon. My local parkrun is quite a long way away, so it’s not something I go to often. The rest of my runs are out and about the countryside where I live. I am happy with my progress, and think I’m doing quite well.

Well, that’s about it for now. I hope you have all been keeping well.

Although I cringe at the prospect, I have decided to attach a pic. Alas, time has not been kind to me. I’m wearing my Glasgow Caledonian hat event though it’s summer; because, well, it somehow seems appropriate to the occasion.


Take care, one and all.

Posted in Uncategorized | Leave a comment

Pics of #Aberdeenshire

These pictures were taken today, despite being date-stamped 2015. Glorious weather and scenery.


Posted in Uncategorized | 1 Comment

Gauging button bounce on an #esp32 using atlast forth

I thought I’d try to get some kind of handle as to how much a button is bouncing around. Here’s the code:

23 input_pullup pinm
variable count
: ++ dup @ 1+ swap ! ;
: 0count 0 count ! ;
: igo 23 digr v0 @ <> if count ++   1 v0 @ - v0 ! then ;
: go 0count begin  igo     key? until count @ . ;

It counts the number of times the value of the button on pin 23 changes. Enter “go” on the serial port, press the button down, then release. Then hit the Return key to stop the loop and obtain a count of the number of times a change had been detected.

Most of the time it prints the value 2, which is the expected answer. Occasionally it will print 4 or 8. The highest value it reached was 10. So although my switch is pretty good, debouncing is still necessary.


Posted in Uncategorized | Leave a comment