Page 1 of 1

How to Customize Z-Shell Prompt (zsh – macOS, Linux)

How to Customize Z-Shell Prompt (zsh – macOS, Linux)
15

When using Terminal under a recent macOS version, you’ll most likely will be using Z-Shell (zsh) –  a quite common Shell found under Linux as well.
This used to be Bash, but Apple moved to Z-Shell early 2019 (some users may see a message when opening Terminal, requesting them to migrate to zsh).

I do tinker in Terminal quite often and always found the prompt kind-a boring.

In this article: how to customize the Z-Shell prompt.

Note: most of these tricks/settings may work the same way for different shells as well, like Bash and even Linux shell variants.

XTerm Color Cheat Sheet

XTerm Color Cheat Sheet
0

For those who need a cheat sheet on XTerm colors, here a quick and short reference overview.
These colors should work for anything that supports the XTerm color-scheme, so this includes several Terminal emulators and several Shell variants like Z-Shell.

I needed this while customizing my Z-Shell prompt, and I hope this is useful to others as well as a reference sheet.
I’ve split it up in the 16 basic colors, 24 greyscale “colors”, and 256 colors.

Bash Script – Press Any Key To Continue

Bash Script – Press Any Key To Continue
4

In this article I’ll describe what I have used to create a “Press Any Key to Continue” in a Bash script (Linux/MacOS X).

Working with scripts in Bash (Terminal or Shell) isn’t what I do daily. The day I had to create a script to help me do an SVN update followed by a massive recompile. I wanted to see the SVN result first before proceeding with recompile, so I had to add a “Press Any Key To Continue” option in the script.

Since it took me a little effort, I figured; let’s describe this in an article. After all, it may be good reference for myself and for others.
These methods work for Linux and MacOS.

miniWOL v2 – Quick and Easy Wake On LAN Utility

miniWOL v2 – Quick and Easy Wake On LAN Utility
109

Waking up devices that are network connected, can be done with the so called “Wake On LAN” feature provided by certain devices (like for example a NAS, FileServer, or even a PC). A while back I created a simple application for this – miniWOL – keeping in mind that the user may not be too familiar with all the configuration details (see: previous miniWOL versions).

I wanted just a simple menu in the System Tray (Windows: next to the clock, usually the lower-right corner of your screen) or Menubar (MacOS X – top of your screen, Linux often at the bottom of your screen). Well, after a bit of searching I could not find anything suitable or to my liking and I decided to just write something myself.

The old miniWOL has been good so far, and plenty folks seem to have a good use for it privately and professionally. However, Apple had to change a few things (moving to 64 bit, using Cocoa instead of Carbon, and the need to sign and notarize applications – I suspect Microsoft will probably follow soon) so while revamping the Mac version, I revamped the Windows version as well, and added a 64-bit Linux version as well (by request).

Rename My TV Series 2

Rename My TV Series 2
1465

Rename My TV Series, a tool to rename tv series episodes, has been around for a while now, and it’s time for an update (the “old one” can still be found here). So I proudly present: Rename My TV Series 2 (RMTV).

Two of the main reasons for this new version are the needed update of the user interface and support for the new API of TheTVDB.com. But there is more; macOS users wanted a 64 bit version to avoid the 32 bit complaining and having the application signed was on the wishlist for them as well. Support for SSL (since theTVDB.com API requires this), the use of notifications and the support for a dark theme, the merging of 2 episodes, caching results, are a few of other desired or needed items.

I’m still striving to do as much cross-platform development as possible, so macOS, Windows and Linux users can use my tools, which means that this new version will be available for all these 3 platforms.

Chmod Calculator – Set file permission with chmod

Chmod Calculator – Set file permission with chmod
1

For most of us, working in Linux or in a shell is not necessarily a daily activity, and that’s totally OK.
I’m not daily working with it either, but occasionally I use one of those funny commands to set the access rights to certain files and/or directories.

This command, chmod, is not super complicated to work with, and is commonly used when working in a shell or terminal on both the MacOS X and Linux platforms. But we need a “magic number” to set these rights. The “magic number” for chmod is also commonly used with FTP programs.

Whenever I use this command, I need to refresh my mind on how to calculate the “magic number”, and I find myself looking for a chmod calculator.
Since I’m lazy at times, I figured: why not have one on my own website?

So I started playing with JavaScript and created this chmod calculator.

Remotely Wake up your Computers with Wake On Lan

Remotely Wake up your Computers with Wake On Lan
9

Wake On Lan, the Ethernet standard for waking up (switching them ON) network enabled devices remotely, has (again) gained popularity, especially under NAS/Server users, who use their server or NAS only a few hours a day. Wether it’s to save on your Power bill, reduce your Carbon-Footprint, or to spare your equipment, Wake On Lan is here to stay …

Now come these question though,… how do I enable Wake On Lan on my network enabled device, and how do I send a “wake up” call to my device?

In this article, I’ll try to cover as much as I can – since it can be a pretty hairy process to setup Wake On Lan. It very strongly depends on the hardware and software capabilities of your device. Even though I cannot every device on the planet, I sure will try to help you get started with Wake On Lan.

Linux System Specifications from the Command Line

Linux System Specifications from the Command Line
4

In the past few weeks, I’ve ran into the need to find out what the hardware or system specifications are of one or the other Linux machine.

I use it every now and then, either on my QNAP, HTPC, Ubuntu machine or even my DD-WRT router.
Earlier this week I even needed it to checkout my old web-server specs versus the new web-server.

Well, with Operating Systems like Mac OS X and Windows, it’s relatively easy to find the specification with the help of system build-in tools that come with a proper user interface. Under Linux this can be more challenging though, especially when there is no graphical user interface – ie. you only have shell access.

In this article I’ll try to go through a few relatively standard commands to checkout your system specs like memory, CPU, video card, disks, etc.

Remove Ubuntu from Ubuntu/Windows Dual boot (UEFI)

Remove Ubuntu from Ubuntu/Windows Dual boot (UEFI)
30

Some of you may have read my article on how to Dual Boot Windows 8.x and Ubuntu 14.x … which works great, but what if you want to undo this; remove Ubuntu Dual Boot and remove the boot manager?

For example when you’ve decided that running Ubuntu from a USB stick is sufficient, or maybe run Ubuntu in a virtual machine with VMWare, Parallels, or VirtualBox. Or maybe you’re selling your computer and the new owner has no desire to have a Dual Boot on their “new” PC?

In this article I’ll show you how to remove the Dual Boot. I’m doing this based on the way I have installed Dual Boot, but it will very likely work for installations that have not followed my article. No additional tools are needed, like special applications, a repair or recovery CD or a live USB stick.

Do keep in mind though that this article is based on a computer that has a UEFIBIOS” and not an old regular BIOS.

UEFI – Dual boot Windows 8.x and Ubuntu 14.x …

UEFI – Dual boot Windows 8.x and Ubuntu 14.x …
180

I usually work on a Mac, and when working under Linux or Windows, I resort to Virtual Machines (VMWare Fusion / Parallels Desktop).

Sometimes however, a virtual machine is not up to the task. For this purpose, I have a cheap Acer laptop that came with Windows 8.1. But that is just Windows. So how do I make this laptop dual boot Windows 8 and Ubuntu using Ubuntu 14.x and Windows 8.1?

These are the few easy steps I took to make my laptop dual boot Windows 8.1 and Ubuntu 14.x.

The described method can also be used to run Ubuntu from a USB stick, which works very well when using USB 3.0.

How to use xRDP for remote access to Ubuntu 14.04

How to use xRDP for remote access to Ubuntu 14.04
318

To remotely control my Windows machines, I always prefer to use RDP (Remote Desktop Protocol) as it performs much nicer than VNC (Virtual Network Computing). VNC has this streak of “JPEG” quality and slow behavior, whereas RDP is fast and crystal clear.

RDP is however a proprietary protocol from Microsoft. So how can we use RDP to control our Ubuntu box remotely?

This is where xRDP comes in play, an open source remote desktop protocol (RDP) server. It actually runs VNC protocol over RDP as far as I understand, yet if behaves much better than VNC by itself (possibly because of the used desktop manager). Since Ubuntu 12.10 (if I’m not mistaken), xRDP doesn’t seem to work with the Ubuntu desktop anymore … unless you use an alternative desktop manager. This seems related to 3D acceleration and nobody seems to care (since 2011, according to bug reports).

Note : if you really need Copy/Paste functionality between the two machines, then please use Ubuntu’s default installed “Desktop Sharing” instead (MacOS X users read this forum post).

How to convert PDF to ePUB documents

How to convert PDF to ePUB documents
2

Most mobile devices can display PDF documents just fine. Some mobile devices, or at least the apps on these devices, show things just tad nicer when the document is formatted in the ePUB format.

In this article, for Windows, MacOS X and Linux, we will show you how to easily convert a PDF document to a ePUB document for use with your mobile device (Android, iPhone, iPad, etc) or computer.

Note : The tools used in this article also support other formats (Kindle, Doc, TXT, HTML, MOBI, etc.).

How to put your signature on PDF documents …

How to put your signature on PDF documents …
12

In this article I will demonstrate how to put your signature on computer documents (PDF) without the need to print the document first, sign it with a pen, and scan it back to a PDF file.

Most modern PDF readers actually allow you to add a digitized image of your signature and common PDF readers even assist you with the scanning, either through a scanner or webcam.

For this purpose we will use Apple’s Preview (MacOS X), Adobe Acrobat Reader (MacOS X, Windows) or Xournal (Linux). All these applications are of course available for free.

How to edit Crontab under Linux, MacOS X, QNAP, etc.

How to edit Crontab under Linux, MacOS X, QNAP, etc.
5

In this article I’ll show you how you to edit the schedule of the job scheduler (Cron) on of your Linux/Unix based computer or NAS, for running certain tasks unattended.

Cron is a job scheduler and uses crontab, a relatively simple plain text file, as it’s configuration file.
In this file you can add, remove, or edit tasks you’d like to have run at particular dates, times, or intervals.

Please be aware that you’re doing this at your own risk …

Rename your TV Series Files

Rename your TV Series Files
611

For those of you who use their computer for watching TV-Series, the following problem must sound familiar:

Filenames are inconsistent, odd characters in the filenames, missing titles, weird numbering, etc… Finding the correct names and renaming them all manually can be quite labor intense.

Thats is one of the reasons why I wrote: “Name My TV Series”.
It’s available for free for Windows, Linux, and MacOS X.

The main information source it uses is TheTVDB.com which offers the data for free. The only thing they ask, is that, if you’re up for it, you help in maintaining the database with TV Series information.

Note: Name My TV Series can now also be found on AlternativeTo.net, AddictiveTips.com and the Lazarus Application Gallery …