CLIX is a graphics-based command line interface for OS X (macOS) that harnesses the power of Unix - a great way for beginners to get acquainted with Unix and an indispensable work of reference for the IT professional.
Unix is what runs your computer since the 'merger' between Apple and NeXT. Unix is an essentially secure OS - unlike the old 'MacOS' and Windows - but its use requires new skills. CLIX will help you attain those skills.
Startup & Operation
CLIX starter files are included in this package. They will clue you in to how CLIX works.
An array of further CLIX command files, assembled, collated, and contributed over the years, is accessible from within these documents.
Commands in the files are divided into categories such as Clean, Disk, Dock, Finder, Global, Log, Network, Purge, Safari, and System; you're free to change these or make new categories yourself.
Commands have fields for title, category, and description, often taken directly from the command's 'manpage'.
Browse through the commands until you find something of interest, then double-click to bring up the command console. Commands are run 'as is' and their output can be copied to the clipboard.
The command lines are exactly as they would appear at a Unix console such as Terminal.app; all you do is hit the Run button. If you want to stop execution of a command, hit Stop.
[The one exception: 'sudo' must be suffixed with '-S' in this context.]
Sudo Passphrase
Some commands are prefixed with the sudo command. For these to work, you need to first submit your sudo passphrase to CLIX (⌥⌘P). You need to submit your passphrase only once, and its duration is by default five minutes after the last submission, like the real command line. CLIX will submit your passphrase whenever it's needed, so you won't be bothered by that prompt ever again.
If you've never run sudo before, you'll be given the usual warning from the built-in system administrator, and CLIX will see you get it.
Your passphrase is neither typed in the clear nor ever saved to disk, so it's gone with the rest of the program when you exit.
Note the accent on 'passphrase' rather than 'password': to the extent you can get your version of OS X to accept longer passwords and passphrases, use it. Make your password or passphrase as easy as possible to remember and as difficult as possible to guess. Use phrases if at all possible. No password or passphrase is ever completely secure - they're 'speed bumps' - but ideally they reduce the likelihood of your being compromised.
Sudo Passphrase Prompt
By default your system should prohibit set ID scripts. Set ID scripts are scripts that can esclate to root when run. (Yes, they're dangerous.)
Run the following command to see what your system allows. (You want to get a '0'.)
$ sysctl kern.sugid_scripts
You should never run sudo in an external script, and you should guard your external scripts by making them read only and owned by root (0550). Another good tip is to include a line to reset ownership and mode on every run, and check regularly for signs of malfeasance.
But CLIX can go you one better by alerting you when you're being prompted for your sudo passphrase. You can then choose to allow once, allow all, or deny.
Run the following command from within CLIX and it will immediately take effect.
defaults write com.rixstep.CLIX SudoAlert 1
[Note this isn't foolproof: a malfeasant sufficiently acquainted with your computing habits can delete your preferences. The safest way is to manually check external scripts before running, or better yet, not run them at all.]
Safety First
CLIX clears your passphrase if your computer goes to sleep, and also clears your system sudo timestamp. Whoever next accesses your computer through either CLIX or Terminal will have to submit a passphrase again.
So you needn't worry anymore about interlopers accessing and taking advantage of your unattended machine: if you need to leave in a hurry, just put it to sleep.
How It Works
CLIX command entries contain a title, a category, a description, and finally a command line. The first three fields are arbitrary but left for your convenience so you can sort things better and find them faster.
It is the command line, however, which will be run, the output of which will appear in the dedicated field in CLIX's command console.
The starter CLIX files already come with a plethora of useful system commands; you are encouraged to add your own, in new files or the same file, to copy and paste and drag and drop between files, and so forth.
Check the left margin in this page for a link to additional CLIX commands.
Whatever way you find best to order things is OK by CLIX.
Manpage Help
Click in the lower left corner of the CLIX command sheet to summon the manpage help control. Once it appears, type in your keyword, perhaps prefix a specific manpage number or '-a' for all pages, and hit Enter.
You can also use the '-k' switch to get an 'apropos' listing.
[Note: you don't need 'openman' from the ManOpen package for this interface to work.]
Context Sensitive Help
You can also ⌥ (option) double-click a word in the command field to invoke the default help system. ⌘ (cmd) double-click will give you 'apropos' information.
Output Colours
The command sheet output view can be coloured both for ordinary output and for manpage output. The configuration for these colours (both background and text) are normally set in the application's Info.plist.
<key>OutputRGB</key>
<array>
<string>0 0 0 255</string>
<string>255 153 0 255</string>
<string>0 0 0 255</string>
<string>64 255 64 255</string>
</array>
The array of colours represents background and text colours for ordinary output and for manpage output in that order. They're standard RGBA from 0 to 255.
The array may or may not be initialised in your downloaded copy of CLIX; to disable its use simply place an 'x' in front of the key name.
<key>xOutputRGB</key>
To enable it simply remove the 'x' again.
Note: these values are nested inside the key 'RxDefaults' which is read on startup; exit and restart CLIX to see your changes.
Caution & Wisdom
Maybe you remember the prompt you got the first time you tried sudo.
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:
#1) Respect the privacy of others.
#2) Think before you type.
It's cute and it has a point or two - and not just to keep your nose out of other people's files, but to remember how powerful this operating system is.
Outside the cosy confines of your GUI there are no forgiveness principles, cancel buttons, progress indicators, or lifelines if you do something wrong.
So yes, Unix is a lot of fun, it's raw power at your fingertips like never before, and that's cool, but do be careful. Think before you type.
Learn To Fish
Selling a man a fish when it's easy to learn how to fish oneself is a rip-off. Still, there are times when one needs to throw that man a line. And as things get more complicated, keeping all those commands in mind becomes a bit of a burden. It's far easier to have a work of reference to find the command you're looking for than to struggle with manpages all through the night. Keep your mind free for what's really important.
The starter CLIX files are just that and no more - starters, a starting point. You're encouraged to place these CLIX files wherever you wish, and divide the commands up into different categories in different files, and so forth. By organising things your own way you're bound to win in the long run.
Learn to fish. You'll have fish to eat, have a diploma in advanced fishing, and always have a line at the ready in case you (or somebody else) should need it.
|