Typing 詩歌 with mozc-ibus

For context, and to serve as fluff to intentionally bury the lead, I use mozc-ibus to make Japanese squiggly bits appear on Ubuntu. For the last few moons I have also enlisted myself as a slave to a thing that exists called The Crabigator as a way to drill into my numbskull the meaning of most Japanese squiggly bits.

Now, recently I’m at a point where I have to type the word 詩歌 rather frequently. Thing is, this numbskull was not reading properly, so I thought the only way to make that certain squiggly bit appear is to type しか. Because why not? [If you’re in the know, now is the time to start cringing.] But when I do, mozc-ibus is not giving me the right squiggly bit for the word. It just doesn’t.

So I do the stubborn thing and try to bend mozc-ibus to my will and add しか as a way to type 詩歌. I make the Mozc Settings thing appear, click on the Edit user dictionary, and start adding an entry. Thing is, when doing so I’m being asked to indicate which part of speech the thing I’m adding is so the recommendation magic would know how to sort the new thing properly when doing its thing; but the category list is in Japanese, and said list invoked all sorts of null-pointers causing me to segfault. (Also, how do I capture a screenshot of a GTK dropdown again? With a phone? What heresy! NO.)

So I go scavenging the mozc source code on github to arrive at this file (with text that I could feed to a translator). It must be the source of the part of speech thing I’m being asked to put in the category. I arrive at this file for an embarrassingly long amount of time (at least relative to the realization that follows).

As I was about to add the new entry in the user dictionary that instructs mozc-ibus to do things my way, it dawned on me. How about I try to type しいか? Of course.

Oh well. Now this numbskull doesn’t have to type しじん + Backspace + かしゅ + Backspace every damn time, nor needs bother with untranslated part of speech categories in Mozc settings.

Make big disks short in space grow

Title is stupid.

What I mean is that when you create an ext2/3/4 partition, by default 5% of the disk is allocated as reserved system space.

So things like this happen:

df -h shows 443G total, 420G used, but only 941M available space. Where did the 22G go?

Bad accounting: df -h output showing missing space allocation


If I have a size 443G disk and I used 420G, I should have 23G unused space, no?

So, imagine my surprise when this started to pop-up every so often:

the volume home has only 986.3 MB disk space remaining

Whut? Only 986.3 MB remaining, when I should have around 23G free space!

To make sense of what’s happening, this gibberish from some redhat geek provides some psychological comfort for what most tutorials instruct on what to do next.

What you do is alter the percentage of the aforementioned reserved system space  to something more reasonable for a large disk, like 1%, by issuing this command:

 $ sudo tune2fs -m 1 /dev/sda7

Take note that doing this is advisable for non-root partitions, since the reserved system space is reserved for a reason. This is one upside of having a partition for all them data separate from the OS, I think.

Btw, I blame youtube-dl for all that disk usage, because I download Youtube now, because adaptive streaming don’t cache videos anymore, and I don’t want to download the same data repeatedly when I watch instructional stuff and music videos, because I am billed by the amount of data I consume*, because I live on some island where internet access is only available wirelessly.

Plus, www [dot] skytorrents [dot] in. No ads, no popups. Hope it stays that way.

* Sort of, and yes, for most, but for me, not exactly.