Blog logotrial and stderr

linux

A 4 post collection


Widgets in GNOME

 •  Filed under linux, tutorials

If you've used GNOME extensions for more than a few months, you've probably realized that they can easily send your desktop into a hellish crash-on-login loop that can only be remedied by dropping to a root shell.

This is obviously insane and awful, but is also wholly predictable. GNOME is written in JavaScript, and the official GNOME extension "mechanism" is that arbitrary JavaScript is allowed to mess with your GNOME environment. When an update introduces an incompatibility and something goes wrong, GNOME crashes. It's like a handful of mechanics are continuously making modifications to your car without talking to each other, and there are no seat belts.

I got tired of GNOME crashing every other day, so I disabled extensions. The thing I really missed, though, was an always-visible system resources monitor. Turns out there's a nice way to get one!

The answer is a minimalistic terminal emulator called Tilda. Here's the bottom-left corner of my screen.

I'll walk you through setting this up.

Install Tilda and htop (or whatever you'd like to run in your widget) and open preferences. Go to the "Title and Command" tab, tick "Run a custom command...," and enter htop for the "Custom Command."

Configure htop by hitting F2 (if you like what I have going, you can use my htoprc).

Once you get it right, go back to the Tilda preferences, go to "Appearance" and get it to appear at the size and position that you like.

Then from the GNOME launcher, launch "Startup Applications" and add a startup program with command tilda.

There you have it!

Gnome to KDE and back again

 •  Filed under linux

I was a mostly-happy Gnome (that is, vanilla Ubuntu 18.04) user for almost a year. I liked almost everything about it, really. The big problem is the fact that extensions are written in JavaScript and have no sandboxing of any sort, so that when Gnome updates and some incompatibility with an enabled extension is introduced, Gnome crashes on login.

I disabled all my extensions from the Ubuntu recovery console. While this made it so I could log in, it didn't stop all the crashes. Clearly there was still just some instability with Gnome.

So I switched to KDE. KDE required a lot more configuration to get it to look and feel right. Probably a lot of that was due to residual configuration from the Gnome installation. I imagine it's much smoother getting started with Kubuntu directly. But I was dismayed to realize that KDE too was crash-prone. After a few months, it eventually got to the point where it was crashing every time I closed my laptop lid. At that point I switched back to Gnome, sans extensions.

Both Gnome and KDE are pleasant to use, except when they crash. They are bad when they crash.

Gnome has more reasonable defaults; it makes more sense out of the box. KDE has more cool features – a vertically-split file browser is what I want basically 100% of the time, and I didn't know it until I used KDE.

But the way Gnome does extensions is irresponsible to the point of insanity. There's just no hope of having a stable system like that. A huge ecosystem of extensions has sprung up based on a software design decision so abysmally bad it could only have been an afterthought.

I imagine that the crashes on lid-close-lid-open have to do with shitty drivers for my hardware, so as a warning to future generations: I'm using an HP Spectre x360.

Syncing Google Drive on Linux (using ODrive free)

 •  Filed under linux

GNOME's Google Drive integration never quite seems to work for me. So I started using google-drive-ocamlfuse, which is great, if you're happy with using Google Drive as a remote mount. The internet where I am isn't reliable enough for me to trust that kind of connection, so I'm looking for a Google Backup and Sync type option for Linux.

I've found one I'm happy with.

It's ODrive. Yes, there's no desktop client for Linux (yet?). Just the miserably poorly documented ODrive CLI. But it's not actually hard to get it working.

Scott Lowe wrote a great post that covers just about everything. Go read that. Then, if you're using GNOME, do the following.

Add a "Sync" option to the Nautilus right-click context menu (gist here):

#!/bin/bash
# Put this file at ~/.local/share/nautilus/scripts/Sync
# Remember to `chmod +x` it

IFS='
'
for file in ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}
do
    if [[ $file == *.cloud ]] || [[ $file == *.cloudf ]]
    then
        odrive sync "$file"
    fi
done

Installing Ubuntu on a USB Drive

 •  Filed under tutorials, linux

After many, many failed attempts, I finally got this working, and nonetheless in a very convenient fashion. I also got the flash drive Ubuntu running within VirtualBox, so I can administer it from the comfort of my host machine's OS. Awesome. If you're not interested in knowing what attempts failed, read on...