Sunday, December 4, 2011

OS X Stocking Stuffers

Since it's coming up one Christmas, Hanukkah and whatnot season, I thought I'd toss out some little OS X nuggets I've discovered over the years. These aren't full-fledged features per se, more like little stocking stuffers that not everyone is aware of:

Control-Click any text in cocoa apps for a quick dictionary/thesaurus definition. Just choose "Look Up in Dictionary" from the resulting menu and you get a mini popup dictionary. Very handy for when I want to look up a quick synonym.

Command-Click filename in window title bar to get the full path. This is useful if you have more than one partition or you're just disorganized in general.

Command-Click and drag menubar items to change their order. For the proper feng shui.

Shift-Click the Force Quit menu item to force quit current application. This is a nice easy way to relaunch the Finder.

Command-Option-Control-8 reverses or inverts screen colors. This is great if you're reading a black-background web page with white text and it's killing your eyes. Just hit the above key combo and you have black text on a white background. Also this can be good for dimming your screen since most of your screen is usually white or light colors. Like if you want to use your laptop in bed but you don't want to wake your partner after a particularly rigorous lovemaking session, just hit the keys and you have a nice dark screen that still retains contrast.

Also, dragging your home folder into the dock makes the Finder much more usable.

Now if only I could find a way to remove the existential taunting from a blinking cursor.

Sunday, November 20, 2011

Compile mplayer on OS X

Finally, success. My tears of frustration did not short out my kkkkkkeyboard and I ca finally type ut thi simple howto (well, simle for me ayway).

So why compile mplayer? There's a relatively recent binary for Tiger and up available here inside an application wrapper that you can extract if you want to use it from the command line. It's from September 2009, recent enough for pretty much anything now, but it's almost 2012 and 2014 or 2015 are just around the corner, and by then it'll be six years old. So what if nobody steps up and provides a distributable binary for Tiger or PowerPC users? What if it's 2015 and users clinging to Classic and using TenFourFox 147 need an updated binary? Well, you're gonna have to roll your own and here are the basic steps to do it.

First, in order to compile anything, you need to install Xcode. In fact, for this compile specifically, you'll need SVN and Git, too. Specific instructions about this are in two posts back here. Also, you'll need to install Make 3.82 available here.

If you haven't added /usr/local/bin to your path, do it now by editing or creating ~/.bash_profile and adding the line:

. ~/.bashrc
(don't forget both dots).

Then edit or create the file ~/.bashrc with the line:

PATH="$PATH:/usr/local/bin"

With this you can call anything installed in /usr/local/bin simply by typing the application name in the command line.

Onto compiling:

On the surface it's just a simple process of downloading the source, running ./configure, make, and sudo make install, but I came across a few hurdles that I'll show you how to get over.

First, create a new folder to download the source into, set that folder to the current directory, and then download the source with these three commands:

mkdir ~/Development

cd ~/Development

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer (on one line)

Then you want to run the configuration script like this:

cd mplayer

./configure --enable-menu --with-freetype-config=/usr/X11R6/bin/freetype-config (on one line, the two arguments are for OSD support and require X11 to be installed)

At this point I got a message I wasn't prepared for: No FFmpeg checkout, press enter to download one with git or CTRL+C to abort

When I didn't have Git installed, that was a problem. But after I installed Git and reran the script, I simply pressed enter and continued on. At this point you may get a longer error message that ends with:

git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling

The solution is to remove "mp_auto_pull" from ~/Development/mplayer/ffmpeg. Then when the ./configure script ends, run make. But there's a bug here. Make 3.80 won't work. You'll get an error, make: *** virtual memory exhausted. Stop. You have to upgrade to Make 3.82.

After installing 3.82, you'll notice the default Make is still 3.80 in /usr/bin. Since I didn't know how to make the new version the default and wasn't sure of the implications of mixing an updated Make with other dev tools, I just invoked it by typing its full path. So after the ./configure script completes, type:

/usr/local/bin/make (this will take awhile)

Then at the conclusion, run:

sudo /usr/local/bin/make install

And that's it! You should have a working binary. To get Truetype subtitles working, you can copy any fontname.ttf file from your /Library/Fonts directory to ~/.mplayer/subfont.ttf like:

cp /Library/Fonts/fontname.ttf ~/.mplayer/subfont.ttf (one line)

The file in your ~/.mplayer folder must be called subfont.ttf.

When I first started this whole mess, I couldn't get it to compile with OSD support. I tried using Macports to install some of the dependencies as described here, and man what a nightmare. Finally I went back to look for a simple explanation and found the ./configure arguments for OSD support here.

And with that I'm gonna watch a movie.

Tuesday, November 15, 2011

Linux MintPPC 11 is Out!

I just installed the new MintPPC 11 and have been playing around with it, so this is more a quick look than a comprehensive review but I like what I see.

First, the authors announce this is based on Debian Wheezy (testing) so there are likely to be some bugs. This is roughly equivalent to what Ubuntu does, basing their releases on the "testing" branch rather than "stable". The advantage is you get newer versions of software like Iceweasel 7.

I can report to you that Iceweasel 7 is fast. Like super-fast. Another very cool piece of software installed by default is Minitube, a youtube viewer for PPC users lacking flash.

The install was hassle free. The only head scratcher was when confronted with a screen asking you to choose which kernel. I chose version 3 since it was highlighted by default. I thought, "Well, I'll probably break sleep with this, but what the hell? Latest and greatest, right?" And predictably, sleep doesn't work. Other users report sleep works fine, so maybe they went with the safer 2.6 kernel.

Setting up wireless was pretty painless. Sound began muted, but I just had to untick the mute box and had sound working. The LXDE desktop was slick and its memory usage was low. Everything runs comfortably in this iBook with 256 MB of RAM. MintPPC installs by default a variety of of useful software, so everything's there pretty much set up for the average user.

One last thing, unlike the stable branch, mplayer from testing now works on G3's. The stable version was compiled it appears for G4's only. However, VLC still breaks when playing video. I got the stable version working by compiling my own, but I haven't gotten to that here yet.

So give MintPPC a shot. If you're new to it, just register for free at their website and you'll find install instructions and a responsive forum area. Good luck.

UPDATE: If you have a dual boot system, beware that the Debian installer MintPPC uses can corrupt your OS 9 drivers making your OS 9 partition unbootable. The solution is to run Drive Setup from a Mac OS 9 install CD and update drivers. I wrote about this earlier here.

Wednesday, November 9, 2011

SVN, Git and Xcode for Tiger

So I'm having this nightmare trying to compile the latest development version of mplayer on Tiger, and I plan on writing about it if my tears don't short out my keyboard before then, but I thought I'd drop by with a quick post in the meantime about some tools you'll need in the process.

These are basic development tools that are getting hard to find for Tiger, and they're also not just for compiling mplayer. If you want to do any compiling or developing, these are the tools you want.

First one's the big one. Xcode from Apple. You can get this either from your install DVD or by downloading it from Apple's website. It's better to download it as you can get the latest version. You have to sign up for a free developer's account and then do a little hunting around on the site, but if you click Resources at the top, then find a Mac OS X Downloads link, you'll eventually come to the Downloads section. Tiger users want to download Xcode 2.5 Developer Tools. Leopard users, your latest version is I believe 3.1.4. The whole install will end up taking a couple of gigabytes, but on the plus side you now start developing all those awesome apps for Tiger you always wanted to.

Another tool you'll need to retrieve source code is SVN, a version control system that supplanted CVS as the popular choice. The Tiger version can be found by going to svnbinaries: Home, then clicking on "Need to download older binaries?", clicking the OS X folder, then choosing Subversion 1.4.6 Universal.

The last tool I have for you is Git, a version control system that supplanted SVN as the popular choice. Honestly, world, I wish you'd make up your mind. Both Tiger and Leopard universal binaries can be found here.

One thing going for Git, it has the funniest install ReadMe I've seen. It says, well, I'll just quote it:

GIT - the stupid content tracker

"git" can mean anything, depending on your mood.

• random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of "get" may or may not be relevant.
• stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
• "global information tracker": you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
• "goddamn idiotic truckload of sh*t": when it breaks
I vote the latter.

UPDATE: Oh, look. Somebody made Homebrew for Tiger and Leopard PowerPC.

Monday, October 31, 2011

Editra - The Text Editor Written in Python for Tiger

Open source software projects make me feel useless. Reading through their forums and blogs brings me to posts about code and requests for code, and I don't know how to write code! So I decided this would change, that I'd learn a computer language hopefully enough to where I could contribute something in the not-too-faraway future. Since the consensus is that Python is the best language to learn first, I'm gonna take a crack at that.

Now I just need a text editor.

And, no, TextEdit isn't what I'm talking about. I want a full-featured text editor that's extensible and can come with all the bells and whistles if I want them. Also, current development for Tiger would be nice.

Lo and behold, there is such a text editor, and it's called Editra. It's cross-platform and appropriately enough written in Python. It has a tabbed interface and all the basic features of a real text editor, like syntax highlighting, etc., and it also comes with a plug-in system for extending the features further. And did I mention it still supports Tiger?

For another text editor that's cross platform, you could also try the java written jEdit. And though TextWrangler and Smultron dropped Tiger development, you can still download old versions (here for TextWrangler, here for Smultron).

At this point, though, I'm going with the Python app. And if you want to test the waters in learn a computer language yourself, check out this Youtube playlist - http://www.youtube.com/playlist?list=PLEA1FEF17E1E5C0DA. A lot of great instructional videos.

Monday, October 10, 2011

SSD Performance on Various 'Books

Check out these videos showing SSDs in action on iBooks and Powerbooks of yore.

First one is MintPPC Linux booting on an iBook G3 800Mhz:



Next one shows web browsing performance on a clamshell iBook:



Also, boot time comparison between a clamshell 466 MHz SSD vs. a Powerbook 1.67 GHz HDD:



Word:

Tuesday, October 4, 2011

Spaces Alternatives for Tiger

I've never been a big fan of virtual desktops. They've been a longtime feature on Linux, though not on Tiger, so when Leopard came out with Spaces, I was indifferent. However, I stumbled across a couple of virtual desktop applications for Tiger and decided to take a look at all the fun I was missing.

The first I tried was VirtueDesktops:



Development was halted with the arrival of Leopard, but it still works on Panther and Tiger systems. On my Tiger install it seemed stable but incomplete. The preferences weren't as intuitive as I'm used to, and there appeared to be a pager feature that I couldn't get working. But for simple desktop switching (with hotkey support) it worked well.

The second Spaces alternative is Desktop Manager:



Development seems also to have halted, but it's very polished. Transitions are the same as VirtueDesktops, slide and cube, etc. However, Desktop Manager has a pager in the menubar for quick switching with the mouse, hotkey support, and also has an optional pager for the desktop.

All in all, I liked these little apps, but it's not enough to convince me to switch to multiple desktops. My word processing / browsing / email are so wrapped up in each other I like having the whole mess of them all on one screen. But if you want a little more organization in your life, go for it.