FOSSPicks
xonsh
Despite most distributions defaulting to use the Bash shell, we all know there is a good selection of alternatives. There's the original sh, of course, the geeky C shell (csh), Korn shell (ksh), and the increasingly popular Z shell (Zsh). Each one of these is well established and likely to be a simple configuration option or package install away. Xonsh, however, will need to be installed manually, usually as a Python pip
package, although there's an AppImage available too. And installing via pip
is a clue to why you might want to install xonsh in the first place, because it's a shell that's going to be of most use to Python developers and users.
Xonsh is a little like launching the Python interactive interpreter and still being able to run regular shell commands. It lets you easily execute all the commands you might expect, such as ls
, mv
, and echo
, within a Python environment. As a Python programmer, you can type 3.14*3.14
to perform a calculation or even start to write code. You can import external modules and use literal data types and multiline input. Python environment variables take the same format as those for a normal shell environment, which is useful for doing programmatic evaluation, and you can use pipes too, just like with Bash. There's a configuration file you can populate with your own options, and the prompt can be customized just like other shell environments. If you spend most of your day programming in Python, using a shell environment where this can be extended to the way you interact with the operating system makes a lot of sense, especially as Python can be a lot more opinionated about what it permits and processes. Even if you're not (yet) a Python programmer, using xonsh might be a brilliant way to learn.
Project Website
MQTT client
MQTT Explorer
MQTT is one of those things that initially sounds complicated but is actually quite easy to understand – and profoundly powerful when you know how to use it. The project doesn't exactly do itself any favors, either, describing itself as "an OASIS standard messaging protocol for the Internet of Things (IoT)." Put simply, however, MQTT is an easy to understand protocol and architecture for sending messages, and one that can be easily used from almost any device to send updates to another. You might have a USB temperature sensor connected to a Raspberry Pi in your garage, for example, and you'd like to share its data with your Node-RED server in your home. This is where MQTT can help. A simple command-line client tool called mosquitto_pub
can transform the output from your sensor into an MQTT message and publish this to a local client, launched with another command called mosquitto_sub
. The result is the aggregation of all MQTT messages which can then be connected to an MQTT broker, such as Node-RED.
One interesting aspect to MQTT is that the receiving clients don't know what each receiving message contains, and this is where MQTT Explorer can help. MQTT messages themselves are structured and easily parsed thanks to their native JSON support, and MQTT is a beautifully designed client that can unfold these messages and help you explore their contents and track their changing values. You simply enter the details of the publishing server you wish to connect to, and the incoming messages are aggregated and listed in the main window. Unfolding these will show their values in the pane on the right, along with a histogram of changes and other viewing options. It's a great way to demystify MQTT and pull the parts you need into other software.
Project Website
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.