Archive for ‘OSX’ Category

Taking Screenshots

datePosted on 15:12, May 27th, 2007 by Many Ayromlou

To take a screen shot, hold down the following keyboard shortcuts.

* shift + command (the Apple key) + 3 for a shot of the entire screen.
* shift + command + 4 for a way of clicking and dragging around the area you want a shot of.
* shift + command + 4 then press space to be able to click on a window or other interface element (menubar, dock, icons etc.) to take a screen shot of that.

Easy enough. Each of these saves a file to your desktop named “Picture 1.jpg” (or a higher number if the file already exists).

If you want to take a screenshot using the Terminal (Macintosh HD/Applications/Utilities) here is how. Just type the commands in (except the quotes).

* “screencapture ~/Desktop/screen.jpg” Takes a full screen shot and save it to screen.jpg on your Desktop.
* “screencapture -iW ~/Desktop/screen.jpg” Same thing as #3 above, just click a window to take a screenshot. If you push space it will go into mouse selection mode (same thing as #2 above).

Grab (Macintosh HD/Applications/Utilities) can also be used to take screenshots. It provides an easy user interface, as well as a way of doing timed screen shots and changing the mouse pointer style (option located in the preferences).

Folder Actions…..Whhaaattt?

datePosted on 15:06, May 27th, 2007 by Many Ayromlou

So I’ve been wondering about Folder Actions for a while now….they are actually quite neat, if you know what they do. This is a feature of the Finder that very few people use, yet it is so powerful. Folder actions allow you to perform an action to any file that is dropped into the folder. What you can do is only limited by what you can script, or what scripts you can find.

Start by creating a new folder and checking that folder actions are enabled by right-clicking (control-clicking) and selecting “Enable Folder Actions”. If it says “Disable Folder Actions” then you are all right, and don’t need to change anything.

Next, attach an action to the folder by again right-clicking (control-clicking) on the folder and choosing “Attach a Folder Action…”. A number of example scripts are located in Library/Scripts/Folder Action Scripts. The majority of these examples involve image manipulation and converting from one file format to another.

Selecting one of these format converting scripts will mean, for example, that all jpeg images dropped into the folder will be turned into tiff images.

However, as I mentioned at the start of this tip, this is only a taste of what you can do. Any applescript, automator workflow or shell script can be attached, and therefore the possibilities are endless!

Rectangular Selections

datePosted on 00:23, May 26th, 2007 by Many Ayromlou

Many Mac OS X applications allow rectangular selections. That is, selecting multiple lines of text, without having to select up to the end of each line. This can be useful if you have created a text formatted table, and want to select an entire column, or if you want to modify the same thing on every line in a document.

To do this type of selection, hold down the Option (alt) Key while the cursor is over a block of text in a cocoa application. Notice that the mouse arrow changes to a cross.

With the Option Key still held, click and drag to make a selection without the text up to the end of the line being automatically selected when you drag down over multiple lines.

If you want to do something particularly neat, once you have made a selection hold down the Command Key as well as the Option Key, which will allow you to make another selection somewhere else in the document, whilst keeping the first block of text still selected.

This works just about everywhere you are able to edit text, including Microsoft Word (although the cursor doesn’t change to a cross) and text boxes in Safari. As you would expect, it works in TextEdit, Mail, and all the other usual Cocoa Apps.

Only on a Mac

datePosted on 00:14, May 26th, 2007 by Many Ayromlou

So all you Mac freaks….here is something to show your PC friends. Set your system screen saver to something cool (RSS Visualizer) and run the Terminal. At the command line type the following command (make sure your Desktop’s background is not covered with windows):

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background

Neat or what? You can stop it using Ctrl-C.

Flock Rules…..

datePosted on 23:38, May 25th, 2007 by Many Ayromlou

This is my first post using a new Browser named Flock. Flock is a OSX native browser based on firefox code, but with lots of neat ideas integrated inside. One thing I really like is the blogging feature right in the browser, Browse, Find, Highlight, Blog…..It’s real easy. Try it for yourself http://www.flock.com

Resizing Mac Partitions on-the-fly

datePosted on 20:14, May 25th, 2007 by Many Ayromlou

As of OSX 10.4.6 you get a extra bonus if you use the terminal and run diskutil. The new addition is the function resizeVolume. Note that this command works only on Intel Macs with hard disks formatted using the GPT (GUID Partition Table) format with a journaled Hierarchical File System Plus (HFS+) file system. This is the default for Intel Macs’ hard disks.

To use the resizeVolume command, you need to get some information: you must be able to specify which partition you want to resize. You also need to know the partition’s size limitations, since it must be big enough to hold data already on the disk. To find the partition’s name, type diskutil list in Terminal. Press return and you’ll see a list of all the disks on your Mac. The one labeled /dev/disk0 is your boot disk. If you have other disks, they’re named disk1, disk2, and so on. Look under the Identifier header for the names of the disk’s partitions; for example, disk2s2. (Ignore any partitions labeled GUID_partition_scheme or EFI.)

Now you need to find out what size your new partition can be. Run this command: diskutil resizeVolume disk_identifier limits , replacing disk_identifier with your partition’s identifier. This will return the current size of the partition, as well as the minimum and maximum sizes you can use. For example:

For device disk2s2 Untitled:
Current size: 215822106624 bytes
Minimum size: 6691028992 bytes
Maximum size: 215822106624 bytes

Now that you know the disk’s name and size limits, prepare your command. It should follow this basic model:

diskutil resizeVolume disk_identifier partition_size second_partition_format second_partition_name second_partition_size

The first part of the command is, of course, the command itself: diskutil resizeVolume. Follow that with the identifier and size of the partition you’d like to split. Type in the size you want this partition to be, not what it currently is. So, for example, if you want the first partition to be 100GB, specify 100G . Finally, specify the format, name of your choosing, and size for the partition you want to create. Want more than two partitions? Just add additional arguments to your command.

Although you can resize the first partition, you can’t change its format—that’s why you don’t need to specify one for it. For each additional partition you wish to create, you must specify the format you want it to adopt. For example, type JHFS+ for journaled HFS+, HFS+ for unjournaled HFS+, MS-DOS for FAT32, UFS for Unix File System, and so on. You must specify the size for each partition. For example, to create a 100GB partition in journaled HFS+, you’d type JHFS+ new_partition_name 100G.

Here’s an example at work:

diskutil resizeVolume disk2s2 100G JHFS+ Part2 100G

This command splits a single partition in two. It specifies a size of 100GB for the first partition. Then it creates a new, second partition, named Part2, using the journaled HFS+ format, with a minimum size of 100GB. If there’s more empty space in the partition, the command will use it all. So if you split a 232GB partition, the above command would give you a first partition of 100GB and a second partition of 132GB.

The resizeVolume command occasionally fails. If it encounters any disk problems, it will stop, and you’ll need to run Disk Utility or another disk-maintenance program. If you have any system or special metadata files—which can’t be moved—in the section of your partition that you wish to reallocate, the command will also fail.

Speed up Sheets…

datePosted on 13:14, May 25th, 2007 by Many Ayromlou

Open Terminal, and then type this command, followed by the Return key:

defaults write NSGlobalDomain NSWindowResizeTime time

where time is a time in seconds from, say, .001 to 2.

Set/Change the default Umask…

datePosted on 13:14, May 25th, 2007 by Many Ayromlou

Open Terminal, and then type this command, followed by the Return key:

defaults write /Library/Preferences/.GlobalPreferences NSUmask #

defaults write -g NSUmask -int #

The first sets the system default, the second sets the per-user default. The NSUmask may not be honored by software that has not been adapted for OS X. # is the umask (per umask(2)). It may, however, be in decimal instead of octal.

Turn off Dashboard…

datePosted on 13:13, May 25th, 2007 by Many Ayromlou

Open Terminal, and then type this command, followed by the Return key:

defaults write com.apple.dashboard mcx-disabled -boolean YES

This tells the system that you no longer wish to have Dashboard available. However, the Dashboard task is actually “owned” by the Dock, so to make your changes take effect, you need to restart the Dock. The easiest way to do that is to type this command into the Terminal (and press Return when done):

killall Dock

After the Dock restarts, hit F12 and you’ll see…nothing at all. If you run Activity Monitor, you also won’t find any Dashboard widgets in the list of tasks, even if you had several open when you ran the above command. Dashboard has been eliminated from your system, and won’t return until you tell it to do so. You can do just that by opening Terminal again, and typing this command:

defaults write com.apple.dashboard mcx-disabled -boolean NO

Once again, you’ll have to use the killall Dock command to make the changes take effect. Once you do, though, you’ll find that Dashboard is back as usual—and any widgets you had opened on the Dashboard will still be open.

Disable Guest login in AFS…

datePosted on 13:13, May 25th, 2007 by Many Ayromlou

Open Terminal, and then type this command, followed by the Return key:

defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false

123... 14151617PreviousNext