Archive
Mac OSX

You access https sites. Chrome, in its secu­rity genius, warns you. Every. Sin­gle. Time.

No more. You can make it remem­ber that you trust a certificate.

When on a secure site, click the warn­ing icon on the loca­tion bar. The pre­cise icon may change, but at the time of writ­ing, it's a red cross.

Google Chrome - remember SSL certificate and trust site

Then click on the "Cer­tifi­cate Infor­ma­tion". This will bring up a small popup win­dow like this:

Google Chrome - remember SSL certificate and trust site 2

The cer­tifi­cate icon there. Just drag it to your desktop.

Double-click the .crt file on the desktop.

Then click on "Accept Certificate".

This may ask for your admin pass­word. Enter it, and you're done. Revis­it­ing this site will never show you the omi­nous red page again.

Very use­ful for work­ing with our own CPanel/WHM sites, for instance.

Read More

Sud­denly, after the upgrade from Snow Leop­ard to the much vaunted OSX Lion, my wire­less trans­fers over a home LAN net­work became slug­gish. It was tak­ing a few *min­utes* to trans­fer a sim­ple file.

Appar­ently I am not the only one with these issues.

I tried a few fixes gleaned from a bunch of sep­a­rate threads on the Apple forum, and off the web. Not every­thing is a smart sug­ges­tion. Here's what finally works, so hope this saves some peo­ple with sim­i­lar prob­lems the time:

[You need root access for the "sudo" bits of the fol­low­ing code to work, of course.]

1
2
3
sudo bash -c "echo 'net.inet.tcp.delayed_ack=0' >> /etc/sysctl.conf"
sudo bash -c "echo 'net.inet.tcp.recvspace=40960' >> /etc/sysctl.conf"
sudo bash -c "echo 'net.inet.tcp.rfc1323=0' >> /etc/sysctl.conf"

Make sure the sin­gle quotes remain sin­gle quotes in the above code share. These new sysctl set­tings will take effect after a reboot.

Another use­ful sug­ges­tion is to dis­able the IPV6 stuff. Not needed for now. Done using:


System Preferences ->
Network ->
Airport (or your WiFi listing) ->
Advanced (button) ->
TCP/IP (tab)

Change the IPV6 to "Link — Local".

Read More

So I updated to OSX Lion 10.7. Very cool, espe­cially with the easy gestures.

Biggest prob­lem: my bank web­site, which uses Java applets for secure logins, stopped work­ing. In the area where the login form should have been I saw a mes­sage that said: "Inac­tive Plug-in". Same prob­lem across Fire­fox, Safari, Chrome — all updated to their lat­est versions.

I installed the lat­est Java for OSX Lion from the Apple web­site. In hind­sight, this was not nec­es­sary as the "Soft­ware Update" from the Apple menu, as usual, takes care of every­thing includ­ing updat­ing the lat­est Java.

So the prob­lem was clearly not with the browsers. The list­ing of plu­g­ins in Fire­fox showed me that "Java Applet Plu­gin" is in fact active.

The prob­lem was annoy­ingly sim­ple: the update to OSX Lion 10.7 and above often (not always, appar­ently) dis­ables Java inside browsers for some odd secu­rity reason.

All I had to do was go into "Java Pref­er­ences" and enable this back again. Apple hasn't made it easy, but it's a sim­ple com­mand in Terminal:

/Applications/Utilities/Java\ Preferences.app/Contents/MacOS/Java\ Preferences

This will bring up a win­dow as in the screen­shot below. Just enable the bit that says to allow applets in browsers, and you're all set. (It will work when you restart your browser.)

Java Preferences on Mac OSX Lion

(Edit: You can also search in Spot­light for "Java Preferences".)

Read More

When you start up Ter­mi­nal, does it take over 10 sec­onds or so before the prompt appears?

Turns out the Terminal.app stores logs of pre­vi­ous ses­sions and over time this grows. Even apps like Main­Menu, that delete the "User Cache", do not delete these files.

These files are stored in an eso­teric loca­tion, hid­den from the reg­u­lar user. The files have the .asl file extension.

Here's the command.


sudo rm -f /private/var/log/asl/*.asl

Exe­cute that in a Ter­mi­nal win­dow. Then quit and restart Ter­mi­nal. No more delays or lags. Much faster Ter­mi­nal. The lack of logs to seek really speeds up Terminal.

This has been tried and tested in Snow Leop­ard, Leop­ard and OSX Lion. Won­der why Macs don't come with this already!

Read More

A sim­ple app ought to do it.

iRinger - Free app

Down­load iRinger. It used to be a Win­dows app, but is now avail­able for Mac OSX!

A very intu­itive appli­ca­tion. Select a song (mp3 for exam­ple), it clips it and shows you the ringtone-worthy seg­ment of it, you basi­cally export it as a ".m4r" file.

When done, just open the file and iTunes will auto­mat­i­cally open it. Done.

Read More

So you've been vis­ited by the much dreaded CRC — Cycli­cal Redun­dancy Check error, most likely encoun­tered while copy­ing files between hard disks. On Mac OSX, this will usu­ally appear as some cryp­tic per­mis­sions mes­sage with an Error –36.

To cut the geek-speak, this sim­ply means that you hard disk may have cer­tain files that may have "bad sec­tors", or are cor­rupted in other words.

For­tu­nately, this is a com­mon enough prob­lem in our tech­ni­cally advanced world of exter­nal stor­age. I rec­om­mend solv­ing this on Win­dows (I use both XP and OSX Leop­ard at the time of this writing).

Step 1: CHKDSK

Use what Win­dows offers you by default. The chkdsk com­mand. Just open an MS-DOS com­mand prompt win­dow and go to the drive you wish to check (I'm hop­ing you already know your way around a com­mand prompt; if you don't please con­sider Step 2 below). With the com­mand prompt show­ing the drive let­ter of the disk you wish to check, enter this command:

e:> chkdsk /R

Here, "e:" is my drive to be checked. The "/R" attribute asks the chkdsk com­mand to "recover" what­ever bad sec­tors it finds dur­ing its scan. In most cases, and if you're lucky, this ought to do it.

Step 2: CDCheck (Free)

Only if the prob­lem you were fac­ing still remains after you have run the chkdsk com­mand, should you con­sider doing this. This is a free­ware pro­gram that makes it super-easy to check/recover your disk. It can be any disk – your cur­rent hard disk, a CD or a DVD, or even an exter­nal hard disk. The inter­face is pretty sim­ple as you can see in the screen­shots here.

Step 3: Spin­Rite (US$ 90)

If all else has failed, just save your­self some heart­burn and go straight to Spin­Rite. This is hands-down the best soft­ware for this pur­pose, as any­one in a dire need of data recov­ery will con­firm. I would trust any piece of soft­ware from GRC. Only catch: it's not free, but when you use it you know why it's worth every last cent. It gives you a sim­ple option to save an ISO file, which you can then eas­ily burn on to a CD using any CD writer tool (includ­ing Win­dows' own right-click). Then reboot your machine so it starts from the CD. Spin­Rite will auto­mat­i­cally report and recover what­ever is recoverable.

Next Steps

Basi­cally, a CRC error is the begin­ning of the end. If this is on an exter­nal hard disk, I highly rec­om­mend that you con­sider back­ing up the data immediately.

Read More

As it says on the tin:

Update: Here's a great list of things to do.

  1. Main­Menu. Free. Superla­tive. Cre­ates a neat lit­tle menu item on the top bar. Bet­ter than most other tools I have tried for this pur­pose, espe­cially in its clean inter­face. Some­times, if you have the plea­sure of expe­ri­enc­ing a sit­u­a­tion when the Trash won't clean because OSX says that the "Appli­ca­tion is still in use" but you're sure you quit it and it's not live any­way, MainMenu's "Force Empty Trash" is a fab­u­lous tool to have at your fin­ger­tips.
  2. Lit­tle Snitch: Tells you every­time some pro­gram on your machine wants to "call home" and con­nect to some server. Great flex­i­bil­ity in allow­ing the pro­gram to con­nect to a server, a port, or in gen­eral. Allow (or Deny) it to con­nect only once, or until the appli­ca­tion quits, or For­ever.
  3. RCDe­fault­App: Just as it is on any OS from Win­dows to Ubuntu, it often hap­pens that you would like to asso­ciate cer­tain file types with cer­tain appli­ca­tions. On Mac OSX, we do have the same right-click con­tex­tual menu as Win­dows that allows "Open with [Appli­ca­tion]" and "Make this the default appli­ca­tion", but for some rea­son this doesn't always work, and occa­sion­ally doesn't even show up as an option. No mat­ter. RCDe­fault­App is the appli­ca­tion that allows you to do that superbly, and then some.
  4. But­ler: Another small util­ity with a neg­li­gi­ble foot­print that allows for some nifty short­cuts to stuff already on your machine.
  5. Per­ian: No Mac should be with­out this. This pretty much explains itself. There's a nice video tuto­r­ial here that shows how easy it is to install and then for­get it. Sud­denly your Quick­time (and iTunes) will be able to play a whole raft of video for­mats. If you want to be really equipped, get the Divx codec, the 3ivx, and Flip4Mac which plays wmv (Win­dows Media Player) files on your Mac. Of course if you get really frus­trated there's always the tried and tested VLC Player.
  6. CleanApp: The best appli­ca­tion unin­staller out there, hands down. Don't believe for a minute when the OSX man­u­als tell you that on a Mac all you need to do is drag the appli­ca­tion into the Trash and you're done. BS. Many appli­ca­tions (think Adobe) install sev­eral things in sev­eral loca­tions. CleanApp 3 tells you all the asso­ci­ated trap­pings of these appli­ca­tions and allows you to unin­stall them all together.CleanApp is not free, alas (there is always a poor man's App­Cleaner, which does some basic stuff) but it allows for much more gran­u­lar con­trol. The best part: CleanApp has a "Log­ging" ser­vice that keeps track of what­ever you install, and then knows in gran­u­lar detail every­thing that you need to unin­stall later; you can enable and dis­able this log­ging ser­vice at will, so it is use­ful to keep it gen­er­ally off and only switch it on before you are under­tak­ing a seri­ous install of soft­ware, such as Final Cut Pro from Apple for example.
  7. Tin­ker­Tools: To mod­ify the many sys­tem pref­er­ences in your OSX that should have been made tinker-able but are not. Us Win­dows switch­ers are used to mod­ding every­thing, so this is a fab­u­lous tool.
  8. Trans­mis­sion: The best tor­rent client for OSX. Very sim­ple, no-nonsense, and yet pretty inter­face. BitRocket is all google-juiced as it has been around longer, but it went down more often than Paris Hilton's pants.  Limewire now has an OSX ver­sion too, but I am done with crash­ing and slow down­load speeds unless you cough up a few dol­lars.
  9. Candy Bar: If you really, really want to mod­ify your icons. Panic is one of the bet­ter soft­ware devel­op­ers for the OSX plat­form. Their Uni­son tool, a native OSX Usenet client is pure code poetry. There's a lot of iconog­ra­phy avail­able at their part­ner web­site Icon­Fac­tory. Can­dy­Bar is not free though. If you are short on cash, you can always try the some­what bare­bones Lite­Icon.
  10. Vienna: The best and most ele­gant RSS reader client for OSX at the moment. Now if only they could sync it with Google Reader, Bob might be my uncle. How long has the Google API been out now!?
  11. Chicken of the VNC: The best VNC client out there, con­nects with­out prob­lems to Win­dows VNC servers too.

  12. Omni­DiskSweeper: As you start using your OSX, and installing appli­ca­tions and such, your hard disk usage keeps mount­ing (no pun intended). The fast, small foot­print Omni­DiskSweeper does this job faster than any­thing else on the mar­ket, includ­ing the some­what visu­ally pret­tier What­Size.
  13. Mono­lin­gual: Like Win­dows, OSX also comes with about a gazil­lion lan­guages pre­in­stalled, which take sev­eral giga­bytes on your hard disk. Like­wise, OSX the oper­at­ing sys­tem also comes with a num­ber of archi­tec­tures such as Pow­erPC even if you have an Intel sys­tem, because the same OS needs to sup­port older Apple hard­ware. Any­one who has bought a new sys­tem with Intel's archi­tec­tures (the lat­est Mac­books or iMacs) can safely get rid of the other archi­tec­tures. Mono­lin­gual is a sim­ple, free util­ity that does exactly that.
  14. Tech Tools Pro: Expla­na­tion com­ing soon.
Read More

Any­one who runs hosted remote servers and has to log into remote ter­mi­nals for reg­u­lar use, it is vital to have short­cuts that allow for quick login. SSH2 is the rec­om­mended way.

On Win­dows, there is the fan­tas­tic SSH2 tool Secure­CRT. Or if you're cash crunched, a com­bi­na­tion of Putty and Putty Con­nec­tion Man­ager works for many.

On Mac OSX and Unix/Linux sys­tems, one doesn't truly need an SSH client at all, because the "Ter­mi­nal" appli­ca­tion is inbuilt. Peo­ple talk of iTerm and such, but I have still to see a value add for such tools.

But one does miss the con­ve­nience of Secure­CRT on OSX, because I have still to find a true Secure­CRT alter­na­tive for the Mac plat­form. Some­thing that allows me to make pre-determined con­nec­tions so I can just click on them to con­nect (which tools like Jel­ly­fiSSH do) and then logs me in directly with­out prompt­ing for a pass­word (which Jel­ly­fiSHH does not do).

So I have sim­ply made aliases in my [code].profile[/code] file, which gets exe­cuted every­time you start your Ter­mi­nal win­dow (so it's a good place to put your short­cuts and any code you wish to exe­cute when the ter­mi­nal starts, such as paths).

  1. Start the Terminal.
  2. Open the pro­file file for the cur­rent user (you).
  3. pico .profile
  4. Enter a new line for our shortcut.
  5. alias s='ssh -2 -p 22 user@host.com'

Quick expla­na­tion for that com­mand in step 3. The let­ter "s" is the short­cut I make for con­nect­ing to the sniptools.com server. Change it to what you wish. This will mean that when I start Ter­mi­nal, all I need to do is type "s" and it con­nects me via SSH to the sniptools.com server. The "-p" switch is an impor­tant one because some of us with para­noid secu­rity set­tings might have a dif­fer­ent port num­ber than the default port 22 for secure SSH. The rest user/host stuff is self-explanatory. The "-2" is to force SSH2 con­nec­tions instead of older vanilla SSH.

Now. Save the pro­file file and source it to try it out:

source .profile

Sourc­ing is only for this one time, for your cur­rent Ter­mi­nal win­dow, which had already exe­cuted the pro­file file *before* we added this alias. When you start a new Ter­mi­nal ses­sion, these aliases et al will be auto­mat­i­cally set for you.

Done. Now your pro­file has the alias for "s". From now when you type "s" in your Ter­mi­nal, it will con­nect, but it will ask you for a pass­word. To get rid of the nag­ging pass­word, we need to cre­ate pub­lic authen­ti­ca­tion key for the domain. This, in fact is what Secure­CRT does behind the scenes on Win­dows too.

Here are the steps to accom­plish this. Run these one-time com­mands in order from the Ter­mi­nal window.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# generate pub and priv keys, leave the passphrase empty
# (simply press ENTER when asked for it)
ssh-keygen
 
#copy the pub key to the remote computer
#(change port number if different from the usual 22)
#change "user" to your user name
#change "host" to your domain name
scp -P 22 ~/.ssh/id_rsa.pub user@host:~/
 
#log on to the remote computer
ssh -p 22 user@host
 
#create the .ssh directory in the root login directory, if it doesn't already exist
mkdir .ssh
 
#append key to file
cat id_rsa.pub >> ~/.ssh/authorized_keys
 
#delete the public key file, no longer needed
rm -f id_rsa.pub
 
#log off the remote server
exit
 
#logon to the remote server, without password prompt
ssh -2 -p 22 user@host

That's it. This is a huge time­saver. Now all I need to do to login to the sniptools.com server is type one let­ter, "s" in the Ter­mi­nal, and I'm on! Fol­low these instruc­tions for each host you con­nect to on a reg­u­lar basis and you'll love the con­ve­nience henceforth.

Read More

Quite sim­ple. As it says on the tin. OSX will often try to "intel­li­gently" asso­ciate your files with the soft­ware most likely to be able to open it. But this is not what you always want.

For instance, I do not want *.png files open­ing up with Adobe Fire­works just because I use the soft­ware to cre­ate new ones.

Here's a mighty use­ful app that allows you to set the default appli­ca­tions for file exten­sions, or mime type, or most com­mon uses (such as "Email", "Brows­ing") etc. It sits snugly within the "Sys­tem Pref­er­ences" and is quite easy to access.

How it looks:

Default Apps in OSX

Click on the image to go to the developer's website.

Read More

I used the excel­lent "Mono­lin­gual" on OSX to delete unnec­es­sary lan­guages from my iMac. I could have sworn I did not delete the Japan­ese input sys­tem, Koto­eri. But turns out I had.

To rein­stall it, I vis­ited the usual forums and searched Google. No solu­tion. No down­load­able file.

Well, the solu­tion is simple.

  1. Insert DVD 1 of your orig­i­nal Mac OSX software.
  2. Click into the folder "Optional Install".
  3. Click on "OptionalInstalls.mpkg".
  4. Expand the menu item "Lan­guage Translations".
  5. Choose "Japan­ese".

That's it. It should install the input menu in about 2 min­utes. When you're done, eject the DVD and click on the "Inter­na­tional" option in your Sys­tem Preferences.

If the option does not show as Eng­lish (romaji) "Koto­eri", it should show up as orig­i­nal Japan­ese as in the screen­shot below:

Read More