TermegaBlogAtBlogSpot TheHomePageOfPeterStory EveryDocumentYouCouldEverWant
KeepYourHandsOffMyAltText

Wanna Learn to be a Power User? Of course you do.


Power Tip #10: Terminology

WEDNESDAY, MAY 13, 2009

This tip isn't so much a tip as a run through of important words that every good computer user ought to know.

First off, what's a kernel? Well, most every operating system has one, and Mac OS X's is called Darwin. A computer's kernel is a sort of program which doles out memory (RAM) to applications, what writes data onto the disk, and other sorts of things like that. A kernel is an integral part of the Mac OS X operating system. When thinking of the makeup of an operating system, it is helpful to think in layers, with the things a user sees at the top, and other things at the bottom. A kernel would qualify as one of those 'other things,' residing out of sight, right near the bottom.

Secondly, what's a volume? I've mentioned these a few times, and may have unknowingly confused my loyal readers. Just so you know, a volume is the place where data is stored on any sort of medium, such as a hard disk, CD, etc. You may be thinking "Wait, doesn't my computer write directly on my hard disk?" Well, a computer has to conceptualize the physical world by imaging everything as software, and in the case of conceptualizing storage mediums, your mac has to image the disk as a virtual place, which it calls a volume.
Your computer has a volume that was initially called 'Macintosh HD,' and this is "mounted" at start-up. "Mounting" a volume is loading it so that data can be written to or retrieved from it. You also mount volumes when you open disk images that some apps are stored in, as well as when you plug in a flash-drive.

Thirdly, why am I telling you this; isn't this sort of thing what Wikipedia's for? Well, let's just say that I was feeling generous today. Speaking of looking stuff up, you can do such things quite simply in Leopard with Safari's dictionary dialog. All you've got to do is mouse over the mystery word, then press "Command" "Control" "D." Wah lah! Absolutely majestic!

And there we are, at the end of yet another post, brought to you by the illustrious Peter Story.

Power Tip #9: The Totally Rad Power of Hidden Folders

SUNDAY, FEBRUARY 1, 2009

Today's post is going to concern hidden files, and the two ways to create them on Mac OS X.
Two ways? Yes. Had I read this a week ago, I would have been deeply disturbed. But as I installed iWork yesterday and saw that the background picture file of the install disk had no dot appended to it's name, and was invisible nonetheless, I was compelled to investigate.
*Note* The second method requires Developer Tools. Go Get'um!
Apple's Developer Site

As I hinted in the intro, the first and most widely known way Finder (Apple's file manager, which displays file location, etc. to the user) recognizes hidden files is by appending a dot to the name of the file/folder in question. For example, below I will use "mv" to rename a folder on my desktop. The original "path" (location and name) is on the left, followed on the right by any location changes and name changes I might want.
mv ~/Desktop/MegaPower ~/Desktop/.MegaPower
And Bazam! It's vanished. If you run the applescripts I've got available on my downloads site, or if your run:
ls -A
In the command line, you'll be able to see them, but otherwise no.

The other way is a bit trickier, and doesn't apply in a traditional Unix setting. As I've been able to piece together, the information executed in the following command is recorded in the concerned file's metadata (extra info that the system uses for cataloguing, etc).
mkdir ~/Desktop/UltraLord
SetFile -a V ~/Desktop/UltraLord
And there we go. Same effect, but without adding an annoying dot to the name of the file/folder. To help you remember:
SetFile -attributes Vistability/visability Path
A lowercase 'V' will make the folder visible again. Fun, but scary, right?

Malware will have a ball on Mac OS X if it ever manages to find a hole in the Mac's impenetrable armor.

Power Tip #8: Another Powerful List of Unix Commands

SUNDAY, DECEMBER 21, 2008

It's been too long, hasn't it? Oh well, no use begging for forgiveness.
Today's post is an extension (and possibly completion) of my series of posts on navigating throughout the wonderful world of terminal. So sit back, relax, and enjoy yet another wonderful post courtesy of yours truly.

The first command I'll tell you about is the "mv" command, which in addition to moving files, can also be used to rename them. When using it to move files, the syntax (way you right it out correctly) looks like this:
mv ~/Desktop/"Flipp'inSweetDocument.txt" ~/Documents/Text/"Flipp'inSweetDocument.txt"
First we typed "mv," followed by the original location of the file, and then the location we wanted it moved to. I used quotes because "mv" doesn't like my flipp'in sweet apostrophe. The other usage can be used in combination with this; all that's required is to change the name of the document in the first location to another, as seen below:
cd ~/Documents/Text
mv "Flipp'inSweetDocument.txt" "TotallyRadFile.txt" And there you go, nice and simple.

The next command I'll get into is the command for making folders, "mkdir." To use it, type the following:
mkdir ~/Desktop/GnarlyDocumentReceptacle
You can also make folders without specify their location (path). Without telling "mkdir" where to put the new folder, it'll assume you want it in your current directory.

And now, the commands you've all been waiting for, the "sudo" and "su" commands. Here's a hint; they give you unlimited power. HAHAHA!!! "Sudo" can be used as a prefix to any other command. For instance:
sudo mkdir /System/TotallyRad
"Sudo" will ask you for your admin password, and after you've given it, you'll be free to do anything and everything on your system. But "su" (short for super-user) is even better. Whereas with "sudo" you must append it every time you issue a command, "su" only needs to be issued once (don't worry, it's not permanent; it goes away after closing your Terminal window).
To use "su" just type it by it's lonesome in the command line. However, in order to enable it, you must first enable the root user. In finder, go to /Applications/Utilities and open "Directory Utility." Next, authenticate by clicking the lock, and go to Edit>Enable Root User. Then make the password something cool. A clear distinction between "sudo" and "su" is that while "sudo" asks for your admin password, "su" is asking for the password you entered for the root account in "Directory Utility."

Pheew! Well, hopefully I'll get a few more posts up during vacation.

Power List #2: Top Five Preference Options

TUESDAY, NOVEMBER 11, 2008

This not a wimpy list. Don't even think of thinking that. This is a manly list.

Today's list is going to consist of the first five things I change whenever I'm starting fresh on a mac. For some you'll just have to find an obscure check box, but for others more terminal fun will be involved.

  1. Show Network Drives on the Desktop
    This fixes a change Apple made between Tiger (10.4) and Leopard (10.5). Previously, when you'd connect to a computer remotely the disks you'd mount would just pop up on the desktop. But with Leopard, they appear in the sidebar instead. All you've got to do is go under Finder -> Preferences in the menu bar. Under "Show these items on the Desktop" check "Connected Servers."
  2. Prevent Applications from opening when you insert a CD or plug in a camera
    Basically, I find it to be extremely annoying when programs start launching all over the place of their own accord. To prevent optical disks from opening iTunes, DVD Player, etc. open System Preferences, CDs & DVDs, then change all the options to ignore. As for cameras, memory cards, and those kinds of things, launch Image Capture from your applications folder. Now go under preferences, and make it so that when a camera is connected, no application opens.
  3. Get rid of that Shiny Dock.
    I like the dock, I really do. I just don't like it shiny. There's two ways to deal with this. The best way is to open Macintosh HD/Users/PeterStory/Library/Preferences/com.apple.dock.plist with one of the property list editors I mentioned in an earlier post. Then expose root, and change the no-glass value to 'yes.' Of if you're lazy, just type the following into Terminal.
    defaults write com.apple.dock no-glass Yes
    And there you are, nice and simple. To change it back, just change the 'Yes' back to a 'No' and you'll be good.
  4. Show Folder Information on the Desktop
    Again, a nice easy one. Click on your desktop, then go to View -> Show View Options. Once you're there, check "Show item info"
  5. Enable the debug and develop menus in Safari and make googlebot a choosable user agent.
    Wow all your friends! First, lets enable the debug and develop menus. To enable the debug menu, type:
    defaults write com.apple.safari IncludeInternalDebugMenu
    The develop menu should be in Safari's preferences under the 'Advanced' tab. As a reminder, make sure you're running a relatively recent version of safari (3.1 or higher, according to Apple).
    Before I tell you how to get "the googlebot," let me explain what a 'user agent' is. Every browser has a user agent, it tells websites which one you're using so it can optimize font size and other good things. Some websites, such as ones that also publish magazines, only let certain user agents access the page. This way, google can find the page, and it will turn up in your search engine, but you won't be able to read it without subscribing. Google has a special user agent that lets it do such things. Fortunately, it's no great secret.
    Now that you really want to be able to mask yourself as a bot, you've probably noticed that under the develop menu, you have to option to enter your own user agent. Problem is, it won't stay. So we're going to edit Safari! Here's where it gets tricky. Let's find safari with your mighty Finder, then right click and choose show package contents. In the folder that should appear, choose Contents/Resources and open UserAgents.plist. In the root directory, you'll notice a ton of numbers. Now for the confusing part; follow these directions exactly! Find the number at the bottom of the list, and press the button labeled "New Sibling" twice. If you don't see the 'New Sibling' button, then make sure the highlighted item isn't expanded. After that, change the class of your two siblings to "Dictionary." Expanding both, highlight the first and click "New Child" once, and do the same for the second, only a total of four times. For the first, rename it's child 'separator,' change its class to 'boolean,' and it's value to 'yes.' For the second, use another property list as your guide, changing the child names to 'name,' 'platform,' 'user-agent,' and 'version' respectively. Now change the values to "GoogleBot," "whateveryouwant," "Googlebot/2.1 (+http://www.googlebot.com/bot.html)" and "2.1" respectively. With that done, save and check your develop menu.

Wow that was a lot of work.

Power Tip #7: Troubleshooting Startup Problems

SATURDAY, OCTOBER 25, 2008

Although I've found macs to be notoriously reliable, every once in a while you're bound to run into trouble, and most of this trouble occurs at startup, or soon after.

Thankfully, Apple has provided a couple ways to deal with most problems.

If your computer can't get past startup, the first thing to do is reset the PRAM, or perimeter random access memory. This stores things like the current date and time, and the default boot disk. This can be done by holding down "Command" "Option" "P" and "R." You can also check which boot disk your computer is trying to startup from by holding "Option" as the computer turns on. I know I've had problems after booting from external drives, then trying to start up without the previous drive connected.

If your computer still won't get past the white startup screen, now would be the time to try booting from another source. If you have your install disks that came with your computer, you can put disk number one in and boot by holding "C" as the computer starts up. Assuming this works, you should be able to use disk utility to take a look at the condition of your computer's internal hard disk and fix it if need be. Another thing you can try booting from is another mac that doesn't appear to be broken. This can be done with a firewire cable, and target disk mode. Target Disk Mode turns your computer into a big external drive. With this method, you'll want to connect the two computers with a firewire cable (while both are off), then start up the working one while holding "T"; if you do it right, a big icon should start bouncing around the screen. Next, start up your 'dead' computer while holding "Option" and when you're given the choice, choose to start from the other computer you're connected to. If you manage to start up successfully, try running disk utility to fix up your broken hard drive.

But what if you don't have another boot disk? Well, you can start up from the firmware/EFI (or memory that has rules for controlling fan speeds, etc.). If you have an Intel mac, this can be accessed by starting up while holding "Command" and "S." And for all you PowerPC users out there, hold down "Command" "Option" "O" and "F." From the command line interface you should meet yourself at, type the following, very carefully:
/sbin/fsck -f
And after that, type exit. Running fsck should fix up your hard disk nice and good.

But if your computer won't even turn on, just try unplugging your it, and leaving it for 15 minutes to a half hour. Then try turning it on. This problem stems from not using a functional power surge protector; your mac's internal circuit breaker (as I understand it) was tripped to prevent the excess electricity from burning out your RAM, processor, etc. I can vouch for the effectiveness of this technique myself, and I can also vouch for the importance of a good surge protector.

And if none of these tips work, then head on down to your local Apple Store. Unless a part is physically broken, the people behind the Genius Bar will usually be happy to repair your mac for free.

New Site for Blog!!!

SATURDAY, OCTOBER 25, 2008

Check out the old site at:
termegablog.blogspot.com

In the future I'll be updating both blogs at roughly the same time, so feel free to bookmark the format you prefer. Eventually I'm hoping to move this site to another URL, but that's a job for another day.

Personally, I feel this new site has more character, to be honest. Nevertheless, I'll admit it can be a bit more difficult to read. A high five to my sister for teaching me all the CSS I needed to know to make the layout as good as it is.

Power List #1: Top 5 Utilities

MONDAY, OCTOBER 13, 2008

No, I haven't run out of ideas, don't worry :D Today I'll just be introducing an idea I've actually been thinking about for quite a while.

Today's list will be of the top 5 most useful (and shiny) utilities I've managed to get my hands on (for free!).

  1. TinkerTool, by Marcel Bresink Software: If you've heard of this one before, that's because it's good. Really good. TinkerTool does what it says; it enables hidden features normally accessible solely from the editing of preference list files (you'll find more out about those in number 3).
  2. WakeUp, by Coriolis Technologies: For the few people who need this, it's tremendously useful. What it lets you do is wake your computers remotely. This can be helpful if you, like me, have a server in another room and don't feel like getting up to switch it on.
  3. Property List Editor, by Apple: This one's part of Apple's developer tools suite (Xcode). Thankfully, your can create a free account at developer.apple.com and download it at your leisure. Just like TinkerTool, this is a way to unlock hidden features and tweak things to your liking. However, rather than giving you pre-set options to fool around with, Property List Editor lets you open any of the plist files on your computer. They can be found in ~/preferences (~/ stands for your home directory, or the folder with your username on it, much as / stands for the root directory).
  4. CLIX, by Rixstep: I know I've mentioned it before, but CLIX is a great application, and I'd just feel bad not getting it on here. For those who missed that post, CLIX has lists of command line commands nicely organized for your convenience. You can even, lo and behold, edit certain preference lists with it.
  5. ClamXav, by Somebody: Yeah, I honestly don't know who made this piece of software, but it's pretty good nonetheless. ClamXav is a virus scanner, and even though I don't use virus scanners all that much, it still doesn't hurt to keep one around just in case. Plus, you can use it to check your friend's infested PC, if you're feeling nice.
As usual, I'll give my loyal readers a link to a page that'll keep them going till my next post (whenever that may be). freemacware.com That's where I've found more than a few of my handiest applications, so the site's worth a look.

Power Tip #6: Applescript

SATURDAY, OCTOBER 4, 2008

Ah well, at least it hasn't been a full week.

Today I'll talk about Applescript, Apple's awesome programming language that can save you a lot of time. But thankfully, you don't have to know how to program to use it.

First off, you'll want to enable the Applescript menu bar icon. So navigate to Applications/AppleScript/"AppleScript Utility.app" and open it up. Now you'll want to check the boxes next to "Show Script menu in menu bar" and "Show Computer scripts." You should see a little curled piece of paper appear in the upper right-hand corner of your screen.

If you click on the icon you should get a drop down list; this will contain all the scripts that came with your computer. They're stored in /Library/Scripts if you're interested in editing them. If you want to add your own to the list, you can either put them in there, or go to /Users/PeterStory/Library/Scripts (replacing PeterStory with your name). If there is no scripts folder there, you can make your own (just so long as you name it "Scripts").
A few scripts you should look into are any of the Finder Scripts, which can help you rename a bunch of files at once, and one of my personal favorites, "Download Weather Map" in the URLs folder.

But if you are a person who does want to learn to program AppleScript, I recommend:
AppleScript: The Missing Manual

Power Tip #5: Ejecting Flash Drives

SUNDAY, SEPTEMBER 28, 2008

Oh well. I guess I can't post everyday, can I?

Today's tip might at first sound a little dull, and probably more than a little obvious, but don't worry. It's not. Today I'll tell you how to eject a flash drive properly, no matter what.

Every once in a while everybody gets a volume (any sort of media; hard disk, zip disk, thumb drive, etc.) that refuses to unmount (be ejected). And instead of telling you what's wrong, Finder just tells you to "Try quitting applications and try again." And naturally, some of the times, even once you've done all that, you still can't get the thing ejected.

The first thing you'll need to do is fire up your trusty old terminal and type in "sudo lsof." It should ask you for your admin password, which is perfectly normal. The "sudo" command takes your admin password, and grants you superuser privileges for a limited amount of time (superuser meaning you can do whatever you want). "lsof" is an abbreviation for "list open files." Now in a couple seconds, your entire terminal window should be filled with a list of every open file on the entire computer. With that list in hand, all we need to do next is search for whichever process is accessing your drive, and kill it. In case you haven't noticed yet, in the command line all mounted volumes other than your start-up on are in the folder "volumes" in your root directory. So to search ("Command" "F") for any files being accessed on your flash drive, search "/volumes/"name of volume"". And on the same line as those words, you should find the name of the offending process. Usually "mds." And lastly, just run the "killall" command I taught you earlier.

Even if you rarely have to go through all that, the wow factor you'll get when you do will more than make up for reading this whole entry. Trust me, I've done it.

Power Tip #4: A Powerful List of Unix Commands

THURSDAY, SEPTEMBER 25, 2008

No post yesterday? No post! Hopefully I won't get into that habit...

Today I'll be sharing my favorite unix commands with you. I'd write a bulleted list, but I don't think that'd be substantial enough. Just as a note, yesterday's lesson really wasn't terribly applicable to any one certain task. It was just something that every hardcore mac user should know. Today's commands are going to be a lot more useful for everyday situations.

The first command you should learn is probably "killall." Usually to quit an frozen application all you'd do is press "Command" "Option" "Escape." But there are times when that won't work.
To run the "killall" command in Terminal, type "killall Activity\ Monitor," filling in "Activity Monitor" with the name of the application you need to quit. However, just like most unix commands, each command has a few different derivatives that can be used by appending "-X," replacing "X" with another letter or number. For the variation I have in mind, you need to append "-9" to "killall." With this, it'll terminate pretty much any process you have the rights to. And as a note, unlike yesterday's "cd," "killall" is case sensitive, meaning that it won't work if you put a capital letter where a lowercase should be, and vice versa.

And the second command is "emacs." Plain and simple. What that'll do is open the command line word processor aptly named "emacs." Normally that'd be pretty boring, but besides being a pretty awesome text editor, emacs also plays games. Press "control" and "X" then type tetris and you'll see what I mean. You also may want to try "dunnet," an RPG. To quit emacs, press "control" and "X" followed by "control" and "C."

And last, but most certainly not least, is the "man" command. Rather than having anything to do with men, this command launches a manual program. To use it, type "man killall," replacing "killall" with the name of any other command you want to learn more about. You can even try "man man" if you want. To quit, just press "q."

And there's the post. If this sort of thing is something you're interested in, try downloading the application CLIX from:
rixstep.com/clix/
I highly recommend. Just try not to mess up your computer with all that power, OK?

Power Tip #3: A Beginner's Guide to Terminal

TUESDAY, SEPTEMBER 23, 2008

Hooray, a new post! Get ready for some reading!

But before I get into any actual instructions, it's important to realize that Mac OS X is fundamentally different from OS 9 and all previous revisions of the macintosh operating system. The key difference being that OS X is based on BSD Unix.

But what exactly does that mean for us? Well whereas before OS X the command line was completely absent, in Apple's new OS it makes its proud debut. The "Terminal" application is an application for typing in the command line. So instead of clicking buttons with our mouse, we'll be typing text, or commands. There are innumerable things that can be done in Terminal, but today I'll stick to the basics.

One of the most simple, yet probably most important commands you'll ever learn is the "Change Directory" command, abbreviated "cd." "Change Directory" is just a fancy way of saying "move from one folder to the next." Thankfully, navigating in the command line is very reminiscent of column view in Finder.
So fire up Terminal and type the following: "cd desktop" What that'll do is move you from your starting folder (by default your home folder: the folder that has your name on it) to your desktop. To go back, just type: "cd .." and you'll be moved back up one directory. Just like pressing the left arrow in column view.

Now that's great, but what if you don't have every folder in your computer memorized; what if you need to see the names of all the folders in your current directory? That's where the "ls" command comes into play. Type "ls" and you'll get the name of every folder or file in your current directory.

After you've played around a bit, and you're feeling a bit more comfortable, try launching or opening something through the command line. For our purposes, let's try opening "Activity Monitor." Type "cd .." until you're at what's called the "root directory" (you can be sure you are if after running "ls" you can see the applications folder). The "root directory" is commonly abbreviated "/" so keep that in mind. It's the folder where you can't back up anymore. Now, type "cd applications" and after that "cd utilities." You can use the command "open" followed by your target file to open it. Having trouble? You should be! There are two problems. The first is that spaces aren't commonly recognized in the command line. There are two ways to get around this. One is by typing a backslash (\) before the space, and the other is by putting quotations around the two words separated by the space. The second problem is that when opening a file or application, you have to add the extension. For applications, ".app" will do the trick.
So to open "Activity Monitor," type either "open "activity monitor.app"" or "open activity\ monitor.app"
Success! If you did that, you have every right to be very proud of yourself.

Now that you've hopefully got the basics of moving through folders and opening files via the command line, next I'll teach you a few specialized commands.

Just as a note, you'll often see the paths (locations) of files referred to as "/application/utilities/activity\ monitor.app." That's a major thing to remember, especially for future posts.

Power Tip #2: Window Management

MONDAY, SEPTEMBER 22, 2008

Hoo hum. Time for another blog post.

Keeping with the subject of windows, today I'll teach you a couple ways to make yours a bit more manageable. First, let's talk about hiding windows. Many users are well aware of using "Command" plus "H" in order to hide all the windows in the current application. However, there's also "Command" "Option" "H," which will make the windows of all other applications disappear instead. Also be sure to note that "Command" "H" can be done in the Application Switcher referred to yesterday.

Wait, there's more! What happens when it just isn't enough to hide all your windows; what if you want them all closed? Well, it just so happens that "Option" clicking the 'X' bubble, or any of the other bubbles (the buttons in the upper left hand corner of all windows) applies that action to all the windows in a given application. So if, for instance, you had 200 Finder windows open, "Option" clicking the 'X' bubble would close them all. Or if you're a keyboard guy like me, "Command" "Option" "W" will get you the same result.

That's it for windows, tomorrow I'll discuss the Terminal, and how to make at least some sense of it.

Power Tip #1: Navigating Through Windows

SUNDAY, SEPTEMBER 21, 2008

Alright! A blog probably really isn't much good without any cool stuff on it, huh?

You simply cannot consider yourself a real power-user if you can't navigate through windows with ease. And nope, I'm not talking about Microsoft's sorry excuse for an operating system. I'm talking about moving between those little boxes on your screen. Without a mouse.

How, you ask? That's where the Application Switcher comes into play. Press and hold the "Command" key, then press "Tab." You should see a row containing all the applications you've got open (in 10.2 or older your dock should highlight an application instead). From here, you can now either press "Tab" again to move your selection right, or press the key above it (actually called an "Acute") to move it back left. This is a real easy way to change applications.

But what if you don't want to switch applications? That's easy! For flicking through the windows of a single app, press "Command" and "Acute" (look earlier if you didn't catch what that is). If you accidentally pass the window you were meaning to find, then try "Command" + "Shift" + "Acute." Pretty amazing, right?

If that strikes you as a bit basic, don't worry, things'll get better. More extreme, if you'll pardon the expression.

Remember, if you like my blog, add a comment, bookmark my page, or even send me an email. Check back tomorrow for more!

The Power-User's Guide to Macintosh

SUNDAY, SEPTEMBER 21, 2008

Greetings.

This is a blog for all those who consider themselves, or hope to become, power-users. Of the Mac. I've been using a Mac for 15 years, and I'd certainly consider myself as such. So now I feel it's my job to pass on that knowledge to all of you.

Every week I'll try to add a few tips which'll help you make the most of your Macintosh experience, as well as just make you more productive in general.

ABetterFlapjack Figmint Valid HTML 4.01 Transitional