Felix Rambles

Another step to taking back control

GtkDialog and missed chances

06 November 2019 — Felix Pleşoianu

After rediscovering Puppy Linux earlier this autumn, I got the chance to re-evaluate a number of technologies I had run into before and forgotten about. One of them is BaCon, a.k.a. the Basic Converter, that I already used successfully for half a dozen game ports and a little utility, with more to come. Another is GtkDialog.

Wait, what's GtkDialog? You can think of it as a powerful alternative to Xdialog, but it's really much more. Thanks to a markup language that resembles XML (but apparently isn't), you can tell it to make any kind of GUI, even with a menubar, and it will reply with everything the user entered when they press OK. That's not where GtkDialog shines though; among other things, you can make buttons run some shell command then refresh another widget, which itself reads from the shell:

<window title="Hello, GtkDialog!">
 <vbox>
  <entry>
   <variable>OUTPUT</variable>
   <input>cat /tmp/gtk-date</input>
  </entry>
  <hbox>
   <button>
    <label>Refresh</label>
    <input file stock="gtk-refresh"></input>
    <action>date > /tmp/gtk-date</action>
    <action>refresh:OUTPUT</action>
   </button>
   <button>
    <label>Quit</label>
    <input file stock="gtk-quit"></input>
    <action>EXIT:OUTPUT</action>
   </button>
  </hbox>
 </vbox>
</window>

Feed this to GtkDialog, e.g. via the --filename or --stdin options, and you've got yourself a graphical front-end to a command-line utility that was never meant to have one.

So why have you never heard of this little wonder?

Read more...

Tags: Linux, programming

Comments? Tweet  

Even more Puppy Linux nonsense

26 September 2019 — Felix Pleşoianu

So, as of this week, I've been using Puppy Linux 8.0 full time. It's hardly ideal, but the only reasonable upgrade path for me right now. And as promised last time, there's still more to unpack.

For one thing, it turns out that much of the reason why the system felt sluggish was Compton. What's Compton? A compositor as it turned out. Which does nothing except add shadows to the windows and menus... while using a noticeable amount of CPU. It also seems to leak memory, so after several hours of continuous operation it starts thrashing, which is how I found the problem. And could it be? Yep... after disabling the compositor, the freezing desktop bug also vanished. Well, until next boot, when the damned thing auto-started again despite my disabling it. When it returned for a second time, I removed it from the base OS image altogether, at which point it finally stayed out.

Hey, programmers: an OS that doesn't obey the person at the keyboard is broken, and potentially dangerous.

Anyway, even without it, Thunderbird still thrashes horribly just starting up, while LibreOffice takes way too long to do the same. Downgrading to 5.4.3 (from the previous edition of Puppy) helped, but only a little. In desperation, I also tried OpenOffice, which is much smaller but also unusably slow. And there's nothing at all between them and the much more primitive AbiWord.

Well, "primitive". It turns out the information on the Puppy Linux wiki is badly out of date. Contrary to what it says, AbiWord 3.0.1 proved perfectly able to open a 123-page ODT file, while preserving most of the formatting. Only the table of contents looked different, though page numbers were still correct, and trying to follow the internal links did nothing. (Gnumeric seems to work fine too.)

But none of that is the operating system's fault. To its credit, Puppy was at least very stable through all this, remaining up even when I gave Opera more than it could chew by accident. Closing the offending app is hard when you're low on RAM, but Puppy somehow managed anyway. Not unlike during installation in fact.

Let's see, what else? I like the DeaDBeeF music player. It might even be able to supplant Audacity for my limited needs. As for video, after trying out the various available options and finding most of them barely functional if at all, I ended up right back at good old VLC. This is why everyone uses it, folks: it gets the job done.

Which is my verdict on Puppy Linux after several more days: it gets the job done, dammit! It's weird, full of quirks and even a few bugs, but stays put, works as advertised, and allowed me to move forward at my own pace, with my limited means. When that's more than I can say about big names, you know IT needs a shakedown.

Tags: Linux, software, review

Comments? Tweet  

Puppy Linux Redux

23 September 2019 — Felix Pleşoianu

Nearly two weeks ago, I wrote about my experiences trying Puppy Linux again for the first time in way too many years. It proved much more useful than expected, and right now it's the most widely deployed operating system in my household (on par with the Android devices), at three installations. Let me tell you how that happened.

But first, a couple of clarifications:

  • I failed to get the Broadcom wi-fi adapter working after all. Oh well.
  • There is, in fact, a tool to fetch and set up SFS bundles automatically, called sfsget, though in the 32-bit edition it lists just a couple of essentials.

Anyway, for my second attempt I picked the same edition, and an even more limited machine: my original Asus Eee PC 701 netbook. It has the same 512M of RAM, but only a 900MHz Atom CPU, and a 4GB (not a typo!) SSD for storage. Can't exactly afford setting any of that aside for a swap partition, which made the install process almost run out of memory. But it worked, and let's just say solid state drives plus compressed filesystems make for speedy loading. X11 on the other hand ruins the boot time. (Also, there's no way the poor machine will run a modern browser, so Dillo will have to do.) And you know what? With two distros installed, I still have three quarters of the drive free. Another success!

Now for the big test: Bringing my work computer to 2019, or almost. It's a rather beefier machine, with a dual-core Atom running at 1.6GHz, and 2GB of RAM. Too bad the 64-bit edition pretty much nullifies the advantage. Oh well, at least the HDD no longer sounds like it's dying all the time, and restarting the window manager is almost instant. Something I had to do quite often at first, both for config changes and another odd bug: after moving the main tray to the top of the screen, the application menu would often freeze while browsing through it, taking along the entire desktop. The mouse cursor would still move, but nothing else. Luckily, I can press F12 to bring up the pop-up version, pick Exit, and restart JWM.

Otherwise, LibreOffice 6.1.4 barely starts, and Thunderbird 60.0.1 is even slower! Good thing the operating system uses SysV Init and a lightweight C library (Musl), otherwise it would be unusable. Opera (58) is sluggish, too, but that's because individual tabs are swapped to disk when out of focus. Guess it will have to become my default browser, with PaleMoon only for development.

The things I have to think of in order to keep an older PC alive nowadays.

As of this writing, I still haven't tried to do all my usual work, but the essentials are there. Keeping in touch with everyone was the biggest issue, and that was easily taken care of. Might come back with a part three to wrap it up.

Tags: Linux, software, review

Comments? Tweet  

Meeting an old friend again: Puppy Linux

11 September 2019 — Felix Pleşoianu

The last time I used Puppy Linux for any length of time must have been 15 years ago, or almost. Much has changed in computing since. In 2018, on my first attempt to revive a laptop almost as old, the ole' pupper didn't have 32-bit support anymore. I walked past, thinking they had fallen into the trap of planned obsolescence like so many others. But Devuan Linux, my choice at the time, didn't work out for a number of reasons, and when I decided to try again this autumn, neither did Debian 10, which even in text mode makes the poor machine run hot enough to worry me. After seriously considering NetBSD, and rejecting it (not for the first time), a second look at the Puppy website revealed those ever more elusive 32-bit editions were now available for all the official, actively maintained versions. I grabbed the latest one: 8.0, codenamed Bionic Pup. Not the best choice in retrospect, given the target hardware.

Speaking of which, this is a single-core Celeron M running at 1.6GHz, with 512M of RAM and a SiS 630 video adapter whose driver was retired from X.org at some point. You'd be surprised how well it can (still) run modern Linux if a sane init system is used. In fact Puppy boots faster on it than the much older distribution on the newer, beefier machine I'm using to write these lines. The first-boot setup wizard is comprehensive, even allowing the screen resolution to be picked from a list, and installation is dead simple, taking up a directory on any available partition. Since it doesn't disturb what is already there, dual boot was an easy choice.

Puppy is such a friendly animal, bundled with a surprising number of apps for its tiny size, and more graphical setup utilities than Mageia. Newcomers can probably get away with doing like I did: grab the latest version, boot from the live CD (yes, CD!) and follow the prompts. Linux experts might want to skim the wiki and forum first, to learn about the things Puppy does in its own way. Like how each edition is slightly different, as members of the community express themselves. Or how you can trust an older version, as the base is self-contained and rock-solid while packages still get updates simply because people care. Bigger additions can take the form of filesystem overlays, that are more robust than packages but must be retrieved manually, which takes a bit of poking around.

That was where the hardware showed its age, in fact, as LibreOffice 5.4.3 barely started. Maybe if I had remembered to close the browser first. Oh well. If anything, the surprise was how well everything else worked. Also how good it all looks. (Better than the 64-bit edition in my opinion.) I did run into a bug where the desktop sometimes freezes, but switching to another virtual console then back to X fixes it. Might be my ancient, oddball hardware, or lack of RAM.

As of this writing, the one thing left to try is installing the firmware for my Broadcom wi-fi adapter. Wish me luck!

Tags: Linux, software, review

Comments? Tweet