<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Wojno: Tag mac</title>
    <link>http://christopher.wojno.com/articles/tag/mac</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Exploration through Code</description>
    <item>
      <title>Mac Latex-mk</title>
      <description>&lt;p&gt;I really like the LaTeX typesetting system. It makes nice looking documents. It&amp;#8217;s a bit of a pain to use, however. On FreeBSD, there is a &lt;span class="caps"&gt;LIFE&lt;/span&gt;-SAVING port called &amp;#8220;latex-mk,&amp;#8221; which is a set of &lt;em&gt;maintained&lt;/em&gt; make files that will do all the heavy-lifting for you. It&amp;#8217;s only released for FreeBSD and NetBSD, but I&amp;#8217;ll walk you through how to install it on Darwin (Mac). I make no warrantees here. You accept all responsibility for following these instructions or deviating from these instructions. I am not responsible for lost data or damaged property, etc.&lt;/p&gt;


	&lt;h1&gt;Installation&lt;/h1&gt;


	&lt;h2&gt;Getting LaTeX and latex-mk&lt;/h2&gt;


	&lt;p&gt;First, you need the latex package for Mac: &lt;a href="http://tug.org/mactex/"&gt;MacTex&lt;/a&gt;. Install that the usual way (or read their instructions if you get lost, no sense me repeating them). Once you have that installed, grab the &lt;a href="http://latex-mk.sourceforge.net/"&gt;latex-mk&lt;/a&gt; file. You&amp;#8217;ll have to dig around a big, look under &amp;#8220;Obtaining&amp;#8221; if that link still exists. You&amp;#8217;ll see a SourceForge download. Download this file:      latex-mk-1.9.1.tar.gz. I&amp;#8217;m sure these instructions will work for future versions too, though I make no guarantees.&lt;/p&gt;


	&lt;h2&gt;Uncompressing/Unarchiving&lt;/h2&gt;


	&lt;p&gt;Go ahead and unzip the latex-mk. Crack open a terminal (Finder &amp;gt; Applications &amp;gt; Utilities &amp;gt; Terminal.app). Change to the latex-mk directory:&lt;/p&gt;


&lt;pre&gt;cd ~/Downloads/latex-mk-1.9.1&lt;/pre&gt;

	&lt;p&gt;If the version has changed, cd to that. Remember, you must unzip it first. Apple&amp;#8217;s archiver should handle it. But you can always do a &amp;#8220;tar -xzf latex-mk-1.9.1.tar.gz&amp;#8221; if you&amp;#8217;re old fashioned like me.&lt;/p&gt;


	&lt;h2&gt;Configuration&lt;/h2&gt;


	&lt;p&gt;Like most packages, you need to run the configuration program. Do this from the latex-mk-1.9.1 directory (you should still be there).&lt;/p&gt;


&lt;pre&gt;sh ./configure&lt;/pre&gt;

	&lt;p&gt;You will see lots of text fly by. If you get errors, sorry, this tutorial is over. Drop me a line, maybe I&amp;#8217;ll be able to help or point you in the right direction. If you see it create lots of little files, then you&amp;#8217;re golden.&lt;/p&gt;


	&lt;h2&gt;Compile&lt;/h2&gt;


	&lt;p&gt;Type:&lt;/p&gt;


&lt;pre&gt;make&lt;/pre&gt;

	&lt;p&gt;And, after a very short time, it will complete.&lt;/p&gt;


	&lt;h2&gt;Install&lt;/h2&gt;


	&lt;p&gt;Type&lt;/p&gt;


&lt;pre&gt;sudo make install&lt;/pre&gt;

	&lt;p&gt;Sudo will ask for an administrator&amp;#8217;s password. Enter it. If you don&amp;#8217;t trust this package, you can always install by hand&amp;#8230; But I&amp;#8217;m not going over that. Once this is done, latex-mk is now installed and ready for use.&lt;/p&gt;


	&lt;h2&gt;Cleaning up&lt;/h2&gt;


	&lt;p&gt;Type:&lt;/p&gt;


&lt;pre&gt;make clean distclean&lt;/pre&gt;

	&lt;p&gt;That will remove any installation files. You may also simply delete the latex-mk-1.9.1 folder. You should delete the zip file from which you got the latex-mk-1.9.1 folder; you no longer need it.&lt;/p&gt;


	&lt;h3&gt;Testing&lt;/h3&gt;


	&lt;p&gt;Let&amp;#8217;s take it for a spin. Assuming you have MacTex installed already:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Create a new folder somewhere, I&amp;#8217;ll call it: &amp;#8220;Test&amp;#8221; &lt;/li&gt;
		&lt;li&gt;cd to &amp;#8220;Test&amp;#8221; &lt;/li&gt;
		&lt;li&gt;Create a new latex document, say, &amp;#8220;test.tex&amp;#8221; and type or copy in the following:&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;%test.tex:
\documentclass[]{article}
\begin{document}
\LaTeX
\end{document}
&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Now create a new file called &amp;#8220;Makefile&amp;#8221; and put the following into it:&lt;/li&gt;&lt;/ul&gt;

&lt;pre&gt;#Makefile
NAME = test
TEXSRCS = test.tex
BIBTEXSRCS = 
TGIFDIRS = tgif_figs

include /usr/local/share/latex-mk/latex.gmk
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;At the command prompt, type: &amp;#8220;make pdf&amp;#8221;&lt;/li&gt;
&lt;li&gt;You&amp;#8217;ll see it build the file. When it finishes, open finder and go to your &amp;#8220;Test&amp;#8221; folder. You&amp;#8217;ll see a shiny new &amp;#8220;Test.pdf&amp;#8221; so go ahead, click it! You&amp;#8217;ll see the strangely formatted LaTeX logo.&lt;/li&gt;
&lt;/ul&gt;

	&lt;p&gt;Congratulations. You just &amp;#8220;ported&amp;#8221; a FreeBSD application to Mac. Aren&amp;#8217;t command line applications grand?&lt;/p&gt;


	&lt;h1&gt;Why Latex-mk?&lt;/h1&gt;


	&lt;p&gt;Latex-mk takes care of lots of details when creating LaTeX documents. It keeps your bibliography up to date automatically and will re-run the latex processor to ensure all your citations and cross references are up to date and shiny. Otherwise, you have to run latex 2-3 time every change to ensure your references will be linked. Your new friend is &amp;#8220;make pdf&amp;#8221; as it enables one-stop generation shopping.&lt;/p&gt;


	&lt;h2&gt;More Information&lt;/h2&gt;


	&lt;p&gt;The make file can do much more. You should see what it can do by going to the &lt;a href="http://latex-mk.sourceforge.net"&gt;latex-mk site&lt;/a&gt; for instructions.&lt;/p&gt;</description>
      <pubDate>Sun, 30 Dec 2007 11:27:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:4edcce25-e0eb-4085-9e32-59bc7c43b6d0</guid>
      <author>Christopher Wojno</author>
      <link>http://christopher.wojno.com/articles/2007/12/30/mac-latex-mk</link>
      <category>How-Tos</category>
      <category>freebsd</category>
      <category>port</category>
      <category>mac</category>
      <category>latex</category>
      <category>makefile</category>
      <category>mk</category>
    </item>
    <item>
      <title>Mac Applications Not (Force) Quitting</title>
      <description>&lt;p&gt;I&amp;#8217;ve just recently (a few hours ago) run into applications not loading or quitting (even with Forced quits) on Mac &lt;span class="caps"&gt;OSX10&lt;/span&gt;.5 Leopard on a brand-new machine. Here&amp;#8217;s the grueling story:&lt;/p&gt;


	&lt;p&gt;I tried to read a .doc and I declined to try Office 2004 for Mac. Nothing appears wrong at this point. I then tried to launch iTunes, it had the launched icon (blue circle) under it, leading me to believe it was running, but there was no window. I could not interact with iTunes at this point. I attempted repeatedly to launch iTunes to no avail. So, I did what any self-respecting &lt;span class="caps"&gt;GUI&lt;/span&gt; user did: Quit. After ignoring the problem report, I attempted the last straw, the Force Quit. After trying that several times, also to no avail, I turned to the Internet for help. Most forums suggested unplugging your iPod when this happens. I do not have an iPod attached to the computer. So I tried a little Unix magic. But &amp;#8220;kill -9&amp;#8221; from the command line was ineffective. Trevor suggested &amp;#8220;killall Dock,&amp;#8221; (the &lt;a href="http://docs.info.apple.com/article.html?artnum=304728"&gt;Dock&lt;/a&gt; is the application &amp;#8220;Task Bar&amp;#8221; for you Windows users) but that was also ineffective. iTunes appeared thusly in ps xau:&lt;/p&gt;


&lt;pre&gt;% ps xau | grep iTunes
6432   0.0  0.0        0      0   ??   E    6:45PM   0:00.00 (iTunes)&lt;/pre&gt;

	&lt;p&gt;I&amp;#8217;ve never seen an &amp;#8220;E&amp;#8221; state before, nor a process enclosed in parenthesis. According to the man pages for ps, the &amp;#8220;E&amp;#8221; means &amp;#8220;the process is trying to exit.&amp;#8221; The man pages, however, are silent as to what (PROCESS &lt;span class="caps"&gt;NAME&lt;/span&gt;) means.&lt;/p&gt;


	&lt;h1&gt;Can&amp;#8217;t Quit, Can&amp;#8217;t Delete&lt;/h1&gt;


	&lt;p&gt;&lt;a href="http://www.apple.com/macosx/features/timemachine.html"&gt;Time Machine&lt;/a&gt; is running and was backing files up at that time to  an external &lt;span class="caps"&gt;USB&lt;/span&gt; disk. It also refused to load or force quit (like iTunes) after stopping the back up. I could also not view the trash as it claimed that items were &amp;#8220;being deleted.&amp;#8221; The system was still responsive (I could browse the Internet to look for forums with this problem, but found nothing completely applicable). I attempted to restart: &lt;span class="caps"&gt;APPLE MENU&lt;/span&gt; &amp;gt; Restart. All windows quit, but the system would not complete the restart. After trying to restart &lt;span class="caps"&gt;AGAIN&lt;/span&gt; (the dock was still visible, so I opened up a Terminal and the menu reappeared), iTunes, System Preferences (Time Machine) and trash were still inaccessible. I then forced a restart by holding down the power button.&lt;/p&gt;


	&lt;h2&gt;Office 2004 for Mac not the problem&lt;/h2&gt;


	&lt;p&gt;Now, convinced Office was the problem, to avoid this problem again I attempted to deinstall the Office 2000 Test Drive application(s). That began to run, it claimed to have progressed 1/10th of the way through (as seen by the progress bar) at which point, the application was hung. Force quit was ineffective. I submitted a problem report about Remove Office crashing. But the application persists! Force quitting that does not shut it down either. Things are getting serious.&lt;/p&gt;


	&lt;h1&gt;Time machine&lt;/h1&gt;


	&lt;p&gt;Time Machine was not actively backing up at this time. I decided to unmount the back up drive &amp;#8220;Time Machine Backups&amp;#8221; (what Time Machine calls its backup drive). This did nothing as well. The drive refused to unmount, even though backups were stopped (this was done via System Preferences &amp;gt; Time Machine and then click the circled X near &amp;#8220;Backing up&amp;#8221; or &amp;#8220;Next Backup&amp;#8221;. Since that didn&amp;#8217;t work, I decided to go for the gusto. I yanked the &lt;span class="caps"&gt;USB&lt;/span&gt; cable to the backup drive. This caused the trash to immediately empty. Remove Office quit. It appears that Time Machine is causing these hangs.&lt;/p&gt;


	&lt;h2&gt;The External Drive&lt;/h2&gt;


	&lt;p&gt;The external hard drive is a Smart Disk, 60GB FireLite XPress.&lt;/p&gt;


	&lt;p&gt;I then decided to check the disk. I launched the disk utility (Applications&amp;gt;Utilities&amp;gt;Disk Utility.app) and ran &amp;#8220;Verify Disk&amp;#8221;. It claims that the drive appears to be OK. I repaired it anyway and after a vigorous re-indexing (thank you Spotlight (AKA &amp;#8220;mdworker&amp;#8221; to ps)) the volume, again, appears to be OK. Things appear to be working again. I&amp;#8217;ll try yanking the cable if it misbehaves again.&lt;/p&gt;


	&lt;h1&gt;Problem&lt;/h1&gt;


	&lt;p&gt;Applications not quitting, even after forced quit&lt;/p&gt;


	&lt;h1&gt;Solution&lt;/h1&gt;


	&lt;p&gt;Unplug external hard drives/iPods connected via &lt;span class="caps"&gt;USB&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Although it appears that Time Machine may be responsible, it may apply to all external &lt;span class="caps"&gt;USB&lt;/span&gt; hard drive devices.&lt;/p&gt;</description>
      <pubDate>Fri, 28 Dec 2007 21:24:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:c60ca314-725b-49ee-808e-5d43198fc135</guid>
      <author>Christopher Wojno</author>
      <link>http://christopher.wojno.com/articles/2007/12/28/mac-applications-not-force-quitting</link>
      <category>How-Tos</category>
      <category>time</category>
      <category>problem</category>
      <category>mac</category>
      <category>force</category>
      <category>usb</category>
      <category>quit</category>
      <category>application</category>
      <category>machine</category>
      <category>hard</category>
      <category>drive</category>
    </item>
    <item>
      <title>The Switch</title>
      <description>&lt;p&gt;Thanks to my parents over the holidays, I am now a proud owner of an Apple Product: a MacBook. Anyone who has read other articles on &lt;a href="http://christopher.wojno.com"&gt;my blog&lt;/a&gt; knows I&amp;#8217;ve been around the &lt;a href="/pages/operating_system_experiences"&gt;operating system block&lt;/a&gt; (I&amp;#8217;ve used many different operating systems). I am very impressed with the initial start up process. It was up and running in minutes. I am physically unable to express my happiness about not having to re-install Windows to get rid of all the pre-loaded bloat that accompanies just about any other computer you buy from someone. That&amp;#8217;s not a problem with Windows, but rather the vendors. Never-the-less nothing is perfect.&lt;/p&gt;


	&lt;h1&gt;Learning Curve&lt;/h1&gt;


	&lt;p&gt;They keys do different things. No big deal. There is a small learning curve about when the Apple key is used and when the control is used.&lt;/p&gt;


	&lt;p&gt;The application layout also takes some getting used to. I&amp;#8217;m familiar with the Windows policy of C:/Program Files and the battle of installing things to D:/Program Files (they really should stop partitioning things and then not changing the default location). I am also familiar with the Linux/Unix policy of /usr/local/bin and /usr/bin. However, Mac, in what may be quite possibly the world&amp;#8217;s greatest move ever (though I may speak prematurely here) has created a very very organized way of arranging applications. Each application is stored as a folder with the executable, resources, and configuration files contained in it. It makes getting applications off the &amp;#8216;net very easy. It&amp;#8217;s strange thinking of an application this way. I also thought that many things would be command-line driven. There are many command line counter-parts to most of the utilities (Mac is based on FreeBSD after all), but most things are &lt;span class="caps"&gt;GUI&lt;/span&gt;-based.&lt;/p&gt;


	&lt;h1&gt;Good Stuff&lt;/h1&gt;


	&lt;p&gt;There&amp;#8217;s a dashboard application that dims the screen and runs widgets that can do just about everything I care to do with a computer. I really like the sticky notes. They let you put up written notes anywhere on the dashboard.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s nice to have a good default music player. Windows Media player is just aweful. It takes me a long time to figure out how to add songs into it when I don&amp;#8217;t do it for a few months at a time. I found how to do it in iTunes (without reading a help file) in less than 20 seconds. 2.4GB of music transferred later, I was listening to my songs from my old computer.&lt;/p&gt;


	&lt;p&gt;The Apple Remote is neat too. No longer must I get up to change the options of a currently playing movie. And using the web camera to pick up the IR, genius. It has a few, but powerful set of buttons: Menu, Fast Forward, Rewind, Volume control, Play and Pause. I was really getting sick of using the XBox for &lt;span class="caps"&gt;DVD&lt;/span&gt;&amp;#8217;s. I can actually hear the audio now without the roar of the XBox&amp;#8217;s cooling fans. Not having to wait for the wireless controllers to boot is a plus as well. After 10 minutes, they shut down automatically to conserve power. I usually pull the batteries when I&amp;#8217;m done starting a movie, however.&lt;/p&gt;


	&lt;p&gt;I really like that the keyboard lights up. I&amp;#8217;ve wanted an illuminated keyboard for a while. Just to prove they&amp;#8217;re green, it uses two light detectors embedded in the speaker grill to determine the amount of ambient light. So it shuts off the lights when you can see them, but illuminates when you can&amp;#8217;t. The only problem: when you&amp;#8217;re logging in, they keyboard will not light up until you&amp;#8217;ve actually logged into the computer. Makes it hard to see your keys when you&amp;#8217;re entering your password. The screen also dims itself according to the ambient light, so you don&amp;#8217;t go blind working in the dark.&lt;/p&gt;


	&lt;p&gt;I was also impressed that ruby and rails comes with the operating system right out of the box. Good move!&lt;/p&gt;


	&lt;p&gt;The saga will continue&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Thu, 27 Dec 2007 14:38:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:58751751-202c-4476-91b2-4fc363a1d8a6</guid>
      <author>Christopher Wojno</author>
      <link>http://christopher.wojno.com/articles/2007/12/27/the-switch</link>
      <category>Operating Systems</category>
      <category>apple</category>
      <category>mac</category>
      <category>OSX10.5</category>
      <category>Leopard</category>
      <category>holiday</category>
    </item>
  </channel>
</rss>
