Before You Sudo Rm -rf /, Take Some Precautions

Maintaining or administering a computer system remotely is a common enough task these days, but it’s also something that can go sideways on you quickly if you aren’t careful. How many of us are guilty of executing a command, having it fail, and only then realizing that we weren’t connected to the correct computer at all? [Callan] occasionally has this issue as well, but in at least one instance, he deleted all of the contents of the wrong server by mistake. To avoid that mistake again, he uses color codes in the command line in a fairly unique way.

The solution at first seems straightforward enough. Since the terminal he’s using allows for different colors to be displayed for the user and hostname on the bash prompt, different text and background colors are used for each server. The only problem with this is that his friends also have access to these servers, and one of them is red/green colorblind, which led to another near-catastrophic mix-up. To ensure no edge cases are missed, [Callan] built a script which runs on every new server he spins up which selects two random colors, checks that they contrast well with each other, don’t create problems for the colorblind, and then applies them to the bash prompt.

For a problem most of us have had at some point or another, it’s a fairly elegant solution that helps ensure we’re sending the right commands to the right computer. This adds a layer of automation to the process and, while some color combinations do look similar, there are enough to help out most of us in some way, especially since he has released the source code on his GitHub page. For other helpful server administration tips, we’d recommend the Linux-Fu article about deploying your own dynamic DNS.

Linux Fu: Reading Your Memory’s Memory

Linux users have a lot of software to be proud of. However, there is the occasional Windows program that does something you’d really like to do and it just won’t run. This is especially true of low-level system programs. If you want to poke around your CPU and memory, for example, there are tons of programs for that under Windows. There are a few for Linux, but they aren’t always as complete or handy. Recently, I had half the memory in my main desktop fail and I wanted to poke around in the system. In particular, I wanted to read the information encoded in the memory chips configuration EEPROM. Should be easy, right? You’d think.

Not Really Easy

One nice tool a lot of Windows users have is CPU-Z. Of course, it doesn’t run on Linux, but there is a really nice imitator called CPU-X. You can probably install it from your repositories. However, the GitHub page is a nice stop if for no other reason than to enjoy the user name [TheTumultuousUnicornOfDarkness]. The program has a gtk or an ncurses interface. You don’t need to run it as root, but if you press the “start daemon” button and authenticate, you can see some extra information, including a tab for memory.

Continue reading “Linux Fu: Reading Your Memory’s Memory”

A Compact Camera Running Linux? What’s Not To Like!

One of the devices swallowed up by the smartphone for the average person is the handheld camera, to the extent that the youngsters are reported to be now rediscovering 20-year-old digital cameras for their retro cool factor. Cameras aren’t completely dead though, as a mirrorless compact or a DSLR should still blow the socks off a phone in competent hands. They’ve been around long enough to be plentiful secondhand, which makes [Georg Lukas]’ look at a ten-year-old range of models from Samsung worth a second look. Why has a deep dive into old cameras caught our eye? These cameras run Linux, in the form of Samsung’s Tizen distribution.

His interest in the range comes from owning one since 2014, and it’s in his earlier series of posts on hacking that camera that we find some of the potential it offers. Aside from the amusement that it runs an unprotected X server, getting to a root shell is fairly straightforward as we covered at the time, and it turns out to be a very hackable device.

Cameras follow a Gartner hype cycle-like curve in the popularity stakes, so for example the must-have bridge cameras and compact cameras of the late-2000s are now second-hand-store bargains. Given that mirrorless cameras such as the Samsung are now fairly long in the tooth, it’s likely that they too will fall into a pit of affordability before too long. One to look out for, perhaps.

Linux Fu: Gum Up Your Script

We often write quick bash scripts and judging by the comments, half of us use bash or a similar shell to pop out quick, useful scripts, and half of us think that’s an abomination, and you should only use bash for your command line and resort to something more like a traditional language to do anything else. If you’re in the former camp, you’re probably cursing your allegiance when you need to make your bash scripts more interactive.

Gum can help. It’s a utility that can handle your script input and output with a little flair while requiring almost no effort on your part.

The command looks simple, but it has twelve subcommands, each with myriad options. But you can break down the functions into a few simple categories. The input commands let you prompt for a line of input or a bunch of lines of input. You can also create a pick list or a yes/no type of prompt. There’s also a file picker and a filter, sort of like fzf.

Continue reading “Linux Fu: Gum Up Your Script”

An Old Netbook Spills Its Secrets

For a brief moment in the late ’00s, netbooks dominated the low-cost mobile computing market. These were small, low-cost, low-power laptops, some tiny enough to only have a seven-inch display, and usually with extremely limiting hardware even for the time. There aren’t very many reasons to own a machine of this era today, since even the cheapest of tablets or Chromebooks are typically far more capable than the Atom-based devices from over a decade ago. There is one set of these netbooks from that time with a secret up its sleeve, though: Phoenix Hyperspace.

Hyperspace was envisioned as a way for these slow, low-power computers to instantly boot or switch between operating systems. [cathoderaydude] wanted to figure out what made this piece of software tick, so he grabbed one of the only netbooks that it was ever installed on, a Samsung N210. The machine has both Windows 7 and a custom Linux distribution installed on it, and with Hyperspace it’s possible to switch almost seamlessly between them in about six seconds; effectively instantly for the time. Continue reading “An Old Netbook Spills Its Secrets”

SheepShaver: A Cross-Platform Tool For Retro Enthusiasts

The world of desktop computing has coalesced into what is essentially a duopoly, with Windows machines making up the bulk of the market share and Apple carving out a dedicated minority. This relatively stable state hasn’t always existed, though, as the computing scene even as late as the 90s was awash with all kinds of competing operating systems and various incompatible hardware. Amiga, Unix, OS/2, MacOS, NeXT, BeOS, as well as competing DOSes, were all on the table at various points.

If you’ve still got a box running one of these retro systems, SheepShaver might be able to help expand your software library. It’s not the sort of virtualization that we’re used to in the modern world, with an entire operating system running on a sanctioned-off part of your system. But SheepShaver does allow you to run software written for MacOS 7.5.2 thru 9.0.4 in a different environment. Unix and Linux are both supported, as well as Mac OS X, Windows NT, 2000, and XP, and the enigmatic BeOS. Certain configurations allow applications to run natively without any emulation at all, and there is plenty of hardware support built-in as well.

For anyone running retro hardware from the late 90s or early 00s, this could be just the ticket to get an application running that wasn’t ever supported on one of these machines. As for the name, it’s a play on another piece of software called ShapeShifter which brought a Mac-II emulator to the Amiga. SheepShaver has been around since the late 90s, too, so we’re surprised that we haven’t featured it before since it is such a powerful tool for cross-platform compatibility for computers of this era. Even if all you are hanging on to is an old BeBox.

Dreamcast Linux: Looking Back At Linux On A SuperH-based Gaming Console

The Dreamcast is probably best known as the swansong of Sega’s ambitions as a gaming console manufacturer, but perhaps lesser known is the fact that you can run Linux on it. In a deep-dive by [Cameron Kaiser] over at the Old VCR blog, it is demonstrated what it takes to make this feat even work in 2023, and what one can expect from a system with a 200 MHz HItachi SuperH SH-4 CPU, 16 MB of RAM and the luxuries of VGA and network interfaces.

What’s interesting about Dreamcast Linux is that it was among the first times that Linux got put on a gaming console, even if it wasn’t entirely official or remotely supported by Sega. In fact, the fact that it works at all has its roots firmly in an exploit that was discovered shortly after the Dreamcast’s release. While Dreamcast discs are generally in a format called GD-ROM (Gigabyte Disc), early on it also supported the MIL-CD standard, which was Sega’s ill-fated attempt at creating multimedia CDs with MIL-CDs.

Not only did MIL-CDs flop in the market, the support form in Dreamcast units also provided a juicy exploit via the firmware that handles detecting and switching between GD-ROM and the much more constrained, audio-only MIL-CD mode. Later Dreamcast models dropped MIL-CD support and will thus also not boot Dreamcast Linux, which is an important gotcha to keep in mind when dragging out a Dreamcast for some Linux action.

As for running Linux on a Dreamcast, it’s pretty much what you’d expect from running it on such a constrained, RAM-disk only device. While [Cameron] was able to use workarounds such as swap-over-NFS to increase functionality, a lot more work remains to be done. Linux SuperH support seems to have petered out around the 2.6.x era, which would seem to have cemented the fate of Dreamcast Linux and similar SuperH platforms.

We’re curious, would double the RAM make a difference to this Linux platform?