If Preview or Skim stops showing current fonts/ symbols in a PDF document on your Mac, you may need to kill ATSServer process to fix this problem:
$ killall -u <username> ATSServer
10 Saturday Apr 2010
13 Saturday Feb 2010
Safari (4.0.4) shows PDFs in the browser window by default when you click on a hyperlink to a PDF file. What is happening here is that when you click on the link, Safari downloads the file in the /tmp directory and opens it by itself. I don’t want that — I want to open it in a stand-alone PDF viewer, say Skim, which will allow me to do other PDF-related stuff (e.g. annotation). A command line trick will do the job (enter the following command after the prompt, indicated by $ here, in the terminal):
$ defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES
If you want to go back to the default behavior use the same command but change ‘YES’ to ‘NO’.
NOTE: You may run across a totally different issue which will force you to view a PDF file in the browser window if you have Adobe reader plugin installed. In that case just remove that plugin from the following directories:
/Library/"Internet Plug-Ins"
~/Library/"Internet Plug-Ins"
I have tested this on Mac OSX – Leopard (10.5.8).
Credit: Mac Rumors forum.
09 Tuesday Feb 2010
Posted in osx
In my Macbook (Lepard: OSX version 10.5.8), Safari (version 4.0.4) in general opens a new link in a new window instead of a new tab if the link has target="_blank" attribute. It just gets in my way of organizing things.
To force the link open in a new tab use the following command (without my favorite prompt sign “$”) in the terminal and restart Safari:
$ defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Notes: 1. This will open the link in the foreground. Command+click will however open the link the background (even without the above trick).
2. Change `true’ to `false’ to revert back to the default behavior.
Credit: MacOSX hints.
06 Friday Nov 2009
I am having some problem with the X11 lately on my Mac OSX (Leopard). I have not found a solution yet — when I do I’ll sure put it up here. But a stuck X11 window in the dock caused it to freeze up. Along with that all the fancy cover switch and other related stuff are also gone! Luckily the spotlight accepted the Command+spacebar combination and let me find terminal.app from there.
However, although I knew who the culprit was (using htop) but I cannot kill it (kill -9 kills it, but it revives!). But the following command did the trick:
$ killall DockIt’ll kill the Dock application and then restart it instantly. (Although it did not kill the culprit, x11).
I’m yet to find a solution for the x11 problem!
29 Saturday Aug 2009
Posted in osx
For a last few days my Macbook “assumed” a weird hostname: kousik-mac(2) — I don’t know what I did that caused it. Here are three ways to change it (I don’t know if these qualify to be “NIX tricks” :D):
1. Click at the Sharing option in System Preferences and then click at Edit. You may change the computer name as well.
2. Use the following commandline-fu:
$ sudo scutil --set HostName your-preferred-hostname
3. Edit the preference file
$ sudo vi /Library/Preferences/SystemConfiguration/preferences.plist
Search for LocalHostname and change the text within the <string>...</string> just under it. While you’re at it, you may want to change the string under ComputerName (need I say what it does?), as well — this key comes just after the previous one (HostName).