Wednesday, September 22, 2010

A Couple of Linux Speed Tweaks

Here are a couple of quick things you can do to speed up your Linux system. First, add "noatime" to your fstab file by typing sudo nano /etc/fstab and in your root directory line (and home directory if you have them separate), under options add the noatime option with a comma like this (from my Debian fstab file):


And no spaces between the commas. This will greatly reduce the writes to your hard drive as your system will no longer write file access times to disk (not needed for the typical user).

Another quick change is to switch your display's color depth from 24 to 16 (millions of colors to thousands). To my eyes I could never tell the difference on a laptop, so I just opened my /etc/X11/xorg.conf file as root and under Section "Screen" I added a tab space followed by DefaultDepth 16 or if you already have a line for it, just change the 24 to 16.

Using glxgears, the frames per second on my Mom's iBook went from 340 to 550 after the change. Not bad for a few seconds work (and a few hours research).

Friday, September 10, 2010

Right Clicking on a Debian iBook

The mystery of right clicking has been solved. The iBooks only came with one trackpad button (obviously), so to right click and middle click, both essential in the Linux environment, you either need to plug a three button mouse into the USB port or map the functions to the keyboard.

Debian already installs with middle and right click mapped to F11 and F12 respectively, but on the iBook F12 is taken up by the eject key, so........

Time to remap. I'd simply find the keycodes to fn + ctrl and fn + option and map the clicks there instead of F11 and F12, and I'd be on my way. The terminal command showkey conveniently does this for you, except when I do it. Then it gives back Couldnt get a file descriptor referring to the console. Crap. Instead of investigating and finding out what the hell is going on, I was feeling lazy so I just cribbed off what other people on the web did.

So here's the solution: Edit the file /etc/sysctl.conf by adding the following lines (notice there's no "/" before the dev)--

dev/mac_hid/mouse_button_emulation = 1
dev/mac_hid/mouse_button2_keycode = 97
dev/mac_hid/mouse_button3_keycode = 100

then save. This will make fn + ctl and fn + alt your middle and right click keys. Or if you prefer the command and enter key (next to the spacebar) to be middle and right click, replace 97 with 125 and 100 with 96. Desktop users will want f11 and f12, so replace 97 with 87 and 100 with 88 (desktop users only because f12 may conflict with a laptop's eject key).

To initiate changes either restart or run sudo sysctl -p /etc/sysctl.conf

Now I have middle and right click working on the iBook as fn + ctrl and fn + option. I'm starting modestly.

UPDATE: On a new install, I noticed mouseemu conflicts with this, so to fix it I just did a sudo aptitude purge mouseemu. Or if you prefer to use mouseemu to emulate middle and right click, you can stick with that. Also, the showkey command works as showkey --keycodes.

Monday, September 6, 2010

Debian on a G3 iBook

To make my mom's old G3 700MHz iBook usable again, and to satisfy my masochistic predilections, I went ahead and installed Debian Lenny on it. OS X on 256 MB of RAM was just too slow, and I thought, hey, I'll put a lightweight Linux desktop on there and squeeze a few more years out of it yet. So how did it go? Was it everything I ever dreamed of?

Sort of. A lot of things worked out of the box, but fortunately my previously mentioned masochistic predilections will get a proper workout trying to solve right click issues, sound problems and WPA access. Also, suspend works perfectly until it's time to wake up. Then, death. I don't think it's supposed to work that way, although maybe the Debian PPC maintainers have more of a sense of humor than their documentation would indicate.

The install off the network install CD went well, oh, except for one thing I forgot to mention. Something in the install rendered my Mac OS partition with 9.2.2 unbootable, so I don't know what that's about. The partition won't even mount anymore when I start up with a Mac OS install CD, so I know I'll have fun figuring that out.

After the installer automatically detected my ethernet connection to the internet and finished downloading all the packages, it took me straight to the Gnome desktop. From this point I installed xfce and LXDE, and LXDE is quite a bit lighter. Performance was good, snappier than Tiger, and I can open a browser and go through a few web pages without the swap file churning and crunching the hard drive. I've had partial success dealing with the right click issue, though I only know how to map it to one key (F11). I need to look deeper into keymaps.

Some useful links for my fellow masochists are here: right click, suspend and WPA issues solved here, more information on WPA, sound issues discussed here, and here for Linux on Laptops.

I'll try to get these issues solved and report back to you my stunning success. Hopefully before my hair falls out in clumps.

Wednesday, September 1, 2010

Top Ten OS X Apps

Since everybody else seems to do one of these, I thought I'd put together my own OS X top apps list with an exclusively PPC bent. Hopefully some of these are obscure enough that this will be new information to you, because as this blog attests, obscurity equals quality. So on to the apps:

1) The Unarchiver -- Simply install this when you first get your Mac and never worry about unpacking zipped or stuffed files again. An essential download.

2) Burn -- Getting errors burning discs? Have an uncomfortable number of coasters decorating your coffee table? Burn will write your discs more efficiently and with more options than OS X's built-in burning software.

3) Transmission 0.8.2 -- Ever wonder why there are so many updates for Transmission? Because each new release breaks something. 0.8.2 is the last version that just works.

4) Seashore 0.1.9 -- Does all the photo editing I've ever needed. There's a new beta out, but it's a single window interface, so let's you and me stick with the old multi-window floating toolbar look:).

5) avidemux -- A cross platform GTK app for editing and filtering video. I use it to splice avi's of old movies and post the clips on Youtube.

6) mplayer -- The best media player out there. Go with the command line version and play 720p HD video on something as low end as a 1.25 GHz G4 Mac Mini, with the right presets of course.

7) iText Express -- Like Bean except it remembers window positions.

8) SABnzbd -- Effortless Usenet downloader, written about here.

9) Camino -- Same rendering engine as Firefox with a faster Cocoa-native GUI.

10) CocoViewX -- A lightweight variant to iPhoto.

11) MacTubes -- Okay, I couldn't leave MacTubes off this list. Plays Youtube content stutter-free by using Quicktime for playback and lets you secretly laugh at all the people on the internets complaining how flash is grinding their computers to a halt.

Honorable mentions go to Celestia, ffmpegX, Max, and Pref Setter. But a top ten list going to fifteen would be ridiculous.