Some random Linux tinkering

I though this was just going to be a normal blog post, but it turned out much longer than I expected.

This weekend I went on little software intalling/customizing rampage. Normally I'm a little bit shy about doing that, even though I like to imagine that I can do whatever I want with my computer and that I know my system and can control and manipulate it better than most, I guess the truth is that I am no power-user. But I think that is more because of shyness than a lack of knowledge.

Well, this past few days I've been leting myself go a little bit more and I'm happy about it.

During the weekend I can work mostly in an old laptop with Lubuntu installed that I share with the family, we mostly use it just for watching tv, but sometimes I get to tinker with it and do my stuff. The idea was to test a few programs, try to configure them and get them to work nicely so that on Monday I could implement what worked on my PC, a slightly more powerfull computer with Pop!_Os installed. It's newer, but it's also not that great.

Mostly I'm trying to "rice" my terminal a bit, and use it as much as possible. Why, you ask? Because we're Linux users, we like the terminal, that's why. Am I right?

First, I wanted a terminal file manager so I tried a few different ones:

Ranger is great, looks nice, the basic use is intuitive, you can preview images and most files. I'm not sure why but it had a lot of issues with the image previews, so I spent some time tinkering with the config file. By default it uses w3m, the terminal web browser, to render images. I tried chaging that setting to mpv or feh, but those are external, it renders the image in a separate window. You can set an offset in the configuration, but it's only x-offset, and I needed y-offset because for some reason it rendered the image at the top of the window and not aligned with the text. This was really just in the laptop, on the PC it seems to work fine out of the box.

Nothing really seemed to improve it, so I installed a couple other terminals to see if one of them worked better. I installed:

  • kitty: this one didn't even work because of the gpl version on the laptop.
  • rxvt: it worked, but not a great improvement, plus it would mean to configure a new terminal and I didn't really want to do that so I just went back to Mate-terminal that I have by default.

When changing terminals didn't do much, I decided maybe I should change the shell, so I installed zsh, and then spent some time configuring it, installed Oh My Zsh, and ranger did render images slightly better. Of course that implied learning how to use zsh, so for now I went back to bash but now there is a lingering feeling that maybe I'd like to get used to zsh in the near future, but that'll be for a nother time.

I also wanted to try Yazi, but that needs 'Nerd Fonts' to render the icons, so I installed a couple fonts from Nerd Fonts, and it was easy enough to set up in Mate Terminal on the laptop, but in the PC I use Alacritty so it took me a little while to figure out, but I'm satisfied with it. So I tried yazi on the laptop, and it looks great with the icons and all, but it's even more picky about what terminals it works well with for rendering image previews, so I ditched it.

Last I tried fff, wich is interesting because it is written in Bash, it looks nice, it's different, but it doesn't render image previews. Bummer.

At some point in the process, since I was already installing Nerd Fonts for the icons, I thought of also installing an ls replacment, so I found lsd and it works great. In my PC I set aliases in the '.bashrc' to replace it, so I just have to type 'ls' like before and it uses 'lsd' instead, it works perfectly with options and all.

Another thing I've wanted to try for a while is a terminal ebook reader. So I found epy, it works great, not much to say about it. You install it through 'pip3', the python package manager. Most of the other packages I mentioned are also not available in the standard 'apt' repositories so you can find them on their github pages and follow their instructions to install them. I had to install rust and the rust package manager 'cargo' too.

A small tangent: I thought it would be cool to be able to convert pdf files to epub since I have dozens, maybe hundreds of pdf books that I've accumulated for years. This could turn into a longer project since I haven't found any program that directly converts them. I thought of first converting the pdf file to txt or to html and from there to epub. So I've been playing a little with programs like 'pdftotext', wich is part of 'poppler-utils', 'pdftohtml' and 't2html'. Then I thought of just reading the txt file with a normal unix pager, 'less' and 'more' are a little too bare-bones for that so I tried out 'most' another alternative pager with a few more features.

Lastly, I decided I also need a program for reading markdown files in the terminal because I downloaded the README.md file frmo the 'epy' github page and I wanted to have a quick way to access it. I'm using 'glow' and it works well, it was available only through 'snap'.

So there's a little chronicle of my weekend (the part that pertains to installing and tinkering with Linux). If you got this far, thank you for reading and I hope you found it useful.

PS: I've got an itch to try a new Linux distro that I've been hearing good things about: ArchCraft. But a part of me is resisting and wants to stop with the distro-hopping, for a while at least.

Photo by Matt Hardy