I’m adopting Leo’s 8 year old Macbook Air from circa 2010, and its sluggishness provided the perfect excuse to tinker with Linux again. The hardware is still solid, and the specs are acceptable. The old boy has a few years more to go yet.

So from a few days ago I had been reading up on different distributions and then getting my hands dirty on the actual installation and customisations. After a few days of cracking my head on various seemingly trivial problems, I am finally at the stage where I am comfortable with my “new” computer, so I thought that I would jot down some notes for posterior’s sake.

Choice of distribution

There are many. There is Ubuntu, which I tried several years ago and had a good experience with (but don’t remember too much of), but I was afraid that it may be too bloated for the old machine. And then there are LXLE, Elementary OS, and Linux Mint that I had heard about that seemed to be viable alternatives.Ubuntu required 2 GB of RAM, Elementary OS 1GB, and LXLE only 500MB.

Eventually I decided to try out Elementary OS first. Elementary OS looked sleek and elegant at first glance, but soon started to get on my nerves. The language keyboard did not work, and keyboard hot keys did not make sense (I couldn’t figure out how to switch between windows when an Alt-Tab or CMD-Tab should do the job). The localisation was very messy – when I tried to use the Chinese version to see if the language input worked, some items on the country menu were translated, some were not. Also, on top of that, there was something annoying about the interface being so simplistic, I felt that it was bordering on patronising. And that it called itself elementary in lower case just felt pretentious.

So I decided to try LXLE on Virtual Box. Somehow I took to it quite immediately – the desktop gave you everything that you needed on dropdown menus, neatly organised into applications and files. There was even a button that when you pressed it, it gave you a random wallpaper, which tickled me to no end. As if it was so efficient in its interface that it even found the space to give you that trivial functionality. The OS also came pre-installed with numerous applications, such as Libre Office, Mozilla SeaMonkey (first time I’d ever used it), and other nifty stuff.

I never made it to Mint. I decided to ditch Elementary, and go with LXLE.

LXLE: Installation problems

This was where my problems started with LXLE. I created a live USB, and LXLE worked fine when I booted from it. However when I tried to install it it would always break down at the very last bit, saying that “the ‘grub-efi-amd64-signed’ package failed into install into /target/”, and that without the “GRUB boot loader” the installed system would not boot. The gibberish level of this one is just too high. I tried reinstalling it, same error message. I created the installer medium again, it didn’t work. I tried installing an earlier, beta version of the .iso file, nope. I suspected that something was amiss with UEFI (now I know what it is, it’s like BIOS but superior) but nope my system does support it, and the partitioning was done correctly.

Eventually through some hours of research I found an application called Boot Repair and I ran it on the system – it said something about lacking a 64-bit something (bear with my non-techie specificity), and so I tried to make another installer which was 64bit (previously I had used the 32-bit version), and this time it worked. That took about five hours of banging my head against the wall, and I finally made it at 2am.

Leo agreed that my stubbornness is useful sometimes.

Chinese/Japanese Input

So I went to bed, and this morning upon waking up I went straight to the computer and started working again. I must say that I quite like the LXLE interface, things are placed where they should be, and that gives me pleasure. The language input methods did seem to work at first glance, but I quickly realised that Pinyin was not available and I  don’t know how to use the other ones. I tried ibus, I tried Fcitx. Neither gave me Pinyin. The organisation of LXLE on its language settings is also a little strange, as it was a little fragmented, spread over “Languages”, “Ibus Preferences”, “Fcitx Configuration”, “Input methods”… and sometimes you have to restart after making some changes so that the input method options would show up. Patient trial and error was my friend.

Eventually I installed ibus-pinyin through Terminal (sudo does make me feel powerful) but for some reason it gave me Sun-Pinyin instead, which only had Simplified Chinese, while I prefer using Traditional Chinese. I poked around some more, and finally after restarting the computer I found Pinyin. I installed Japanese-Anthy through Terminal as well. I am now using Mozc as the Japanese input method. For the time being I am sorted, language-wise.

Installing applications

I realised that I don’t actually use that many applications. What is indispensable to me is just Dropbox, and KeepassX. Seamonkey was pre-installed so I just started using it as the default browser. In the beginning I thought that I would have to do everything through Terminal, which made me nervous, but eventually I found the pre-installed Lubuntu Software Centre (a little like App Store) which made things much easier – and even for other command-line installations it was usually just short lines of code that I could copy and paste. I don’t remember how it was in Ubuntu.

The Power Button

Having gone through the previous hurdles I was starting to feel confident, and decided to tackle one more important problem. The power button on the Macbook Air triggered an immediate shut down, no questions asked, and this is very dangerous since you could lose your work if you accidentally press it when you were pressing the Delete button, or your cat could trigger it easily when it is walking on your keyboard (which is not an infrequent happening in my household).

This little endeavour proved to be much more difficult than I thought it would be. I was instructed to download and install dconf Editor, which I did, with just a faintest idea of what it was – and I started to tinker with it, but I couldn’t find this thing called gnome setting daemon. What’s gnome? What’s a daemon? Later on I found that there’s this other thing called “Mate” which seems to be a similar something as Gnome, even though nothing happened after I changed the values in the dconf Editor. I was getting a little too far out of my depth.

In the midst of all this despair I sent a distress call to Pellaeon. While waiting for his reply, Leo helped me with a hack that I found online (this one) which instructed us to modify a certain logind.conf file, which stopped the immediate shutdowns, even if I felt a little insecure about changing some code that I had no idea about, since it might cause problems later on. We left the cafe, somewhat triumphant, and I collapsed into a deep sleep when we arrived home.

When I woke up, I saw that Pellaeon had replied my messages in a superbly comprehensive manner. I copy his explanations here for future reference:

  • GNOME is the name of the “desktop environment”, it includes supporting programs for the desktop (such as drawing the windows outlines and toolbars), many basic functionalities (such as the system settings tool and text editor)
  • in the linux world, GNOME and KDE are the two major desktop environments
    they have the most development resources
  • They are also modular, so parts of them may be re-used by other projects
  • the LXDE reuses many parts of the GNOME desktop environment
  • LXDE and MATE are also desktop environments, they reuse parts from GNOME but combine them in different ways, so the interface looks different
  • “daemon” is basically a program constantly running in the background, for some service, imagine it as a shop that waits for customer 24h
  • in contrast to daemons, the applications are only opened by users while they need it and closed while they don’t, such as your browser, documents editor, etc
  • daemons and applications are both programs
  • to build a desktop environment, many daemons are needed, for example, there is a daemon handling power button, lid open/close, power plug/unplug events
  • the daemon is called “dbus”, it is the de facto desktop event handling daemon, used by both GNOME and KDE, and of course most of all the desktop environments
  • dconf stands for “dbus configuration” if i’m not mistaken, so dconf-editor is a editor to change dbus configurations
  • beside power change events, dbus also handles most of the desktop-related events , such as wifi scans, enable, disable, headphones/mic plug/unplug, device plug/unplug, keyboard layout management, printing, etc
  • it is basically a “message hub”, it receives notifications of some event (such as power button press” and rewrite/block/re-broadcast the notifications to programs that “subscribes” themselves to the event
    org.gnome.settings-daemon is the name of the configuration value that decides the behavior when you press the power button
  • the configuration values are grouped in a hierarchical fashion
  • under “org.gnome” are all settings related to GNOME, and under settings-daemon are the configurations related to the GNOME settings daemon
  • so for example, the KDE settings are likely under “org.kde”
  • the problem with these configuration knobs is that, the paths/names may change from version to version
    LXDE might simply follow the settings of “org.gnome.settings-daemon.plugins.power” , or they might decide to use their own settings under “org.lxde.xxx.yyy.zzz”
  • so for your error message, it cannot find the path org.gnome.settings-daemon.plugins.power, there might be 2 possibilities:
    1. the org.gnome.settings-daemon.plugins.power knob have moved to some other path in your version of GNOME (that your version of LXDE is using)
    2. LXDE simply has its own knob somewhere
    3. LXDE doesn’t allow you to customize the power settings behavior at all
    Can you try this? https://askubuntu.com/questions/568957/how-to-shut-down-lubuntu-immediately-with-the-power-button-instead-of-a-logout-m

So we undid the hack, and installed the XFCE Power Manager (as per the link sent by Pellaeon) which provides a GUI for all the tweaking to happen. I am very satisfied with the outcome.

Current Status

I’m still having to get used to Hotkeys that are a little different from what I had in Mac OS, but all in all everything works like a breeze. I like the task bar, which Mac OS didn’t have, which I didn’t know that I missed. I like the different work spaces as they’re laid out more intuitively than in Mac. There are small things that I still need to tweak, such as the volume buttons on the keyboard not working anymore, but those are not high priority.

Using LXLE now somehow brings me back to perhaps 15 years ago when I was tinkering with my first computer, when things crashed, and working with the PC had some element of learning and risk when you didn’t know what you were doing, but 硬着头皮 did it anyway. Nowadays everything works and you don’t even think about it anymore.

I think I’m going to enjoy my new old computer :)