in8notes

This portion of my site is powered by Blosxom. Blosxom is a perl script whose functionality here is extended through several plugin scripts in order to dynamically assemble a multitude of separate plain text files stored in a directory tree on the server into a cohesive, dated and RSS enabled weblog. Now in daily (r)sync with the directories on Nate's Powerbook.


home / computers / mac



blosxom
categorytree plugin
blox plugin
find plugin
breadcrumbs plugin



       
Return to in8sworld.net


phpmyadmin won't run on osx

Attempting to login to my local installation of PHPMyAdmin on Mac OS X Leopard for the first time, I received this message:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Assuming the server is installed and running, these problems are almost always caused by incorrect path issues. A Google search brought up this solution.

Solution:

1. Open the terminal
2. sudo mkdir /var/mysql
3. sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
4. Reload the login page and login

Last saved: 12/17/2009
Links: /computers/mac / phpmyadmin-error.txt

Quitting Midnight Commander

My F10 key is grabbed by Expose for other nefarious purposes, so this little tidbit comes in handy when using mc over ssh on the Mac:

  1. Esc-1 = F1 ... Esc-0 = F10

Last saved: 03/21/2009
Links: /computers/mac / quittingmc.txt

International Characters in Mac OS X

from http://webct.pcc.edu/support/langmac.html

Some language classes at Portland Community College make use of WebCT to compliment their course. WebCT provides excellent tools for online communication. The mail tool, discussion tool, and chat tool can all be used by students and faculty to communicate using what they've learned in class.

One problem that these courses encounter is related to some of the characters in different languages that don't show up on our keyboards. Not to fear, there are ways around this using keyboard shortcuts and using tools built in to the Mac OS.
Keyboard Shortcuts

There are many keyboard shortcuts on the mac for inserting characters. To insert a character with an accent, type the key combination then the letter you want to insert.

For example, if you want to type á, you would press option-e (option and E at the same time), then press the A key.
For French

* ê -- accent circumflex (option-i)
* ü -- accent tréma (option-u)
* á,é,í -- accent acute (option-e)
* à,è,ì -- accent grave (option-`)
* ç -- accent cedilla (option-c)

For German

* ü -- umlaut (option-u)
* ß -- esset (option-s)

For Spanish

* á,é,í -- accent (option-e)
* ñ -- accent tilde (option-n)
* ü -- umlaut (option-u)
* ¿ -- upside-down questionmark (option-shift-/ )
* ¡ -- upside-down exclamation (option-1)

For Other

* ø -- option-o
* è -- option-`
* ñ -- option-n
* å -- option-a
* ü -- option-u
* ç -- option-c

To apply an accent to a capital letter, also hold down the shift key.

Last saved: 03/15/2008
Links: /computers/mac / intl-char.txt

Screenshots in OSX

I feel like an idiot. I've been using an application (Freesnap) forever to take screen captures of things in OSX. The ability to capture the screen (or a portion thereof) is friggin built in. Yes, Printscreen or ALT+Printscreen in Windows captures the screen, but you have to paste the capture into a program to save it. In OSX you just Command+Shift+3 or Command+Shift+4 to capture the screen or portion thereof, and it saves the capture right to the desktop, handy!

Last saved: 02/16/2008
Links: /computers/mac / screencaptures.txt

Invert colors on Powerbook

High Res for outside viewing"
ctrl-cmd-option-8

or

Incremental shift to High Res invert color
command-control-option-. (repeatedly)
command-control-option-,

Last saved: 12/17/2007
Links: /computers/mac / highres.txt

Updating Darwinports

sudo port -d selfupdate

Last saved: 12/10/2007
Links: /computers/mac / darwinports.txt

Disable Dashboard

6/3/2005 in System Software Notes by face

Controlling the dashboard. Sometimes you just don’t want it around.
Note: This is a per user setting. I do not know how to disable it by default for every user.
Possibly if you make this change to /Library/Preferences/com.apple.dashboard -

Make Dashboard go away

defaults write com.apple.dashboard mcx-disabled -boolean YES

Make Dashboard come back

defaults write com.apple.dashboard mcx-disabled -boolean NO

You have to restart the Dock to have this take effect

killall Dock

The terminal is your friend.

Last saved: 10/20/2007
Links: /computers/mac / disabledashboard.txt

Configure php 4.4 on OS X with GD support

Never did bother to figure out why I couldn't get GD to work when I compiled it in 2005, and looks like I may have forgotten to add these libraries in Nov. 2006 when I apparently compiled 4.4 again, and now I need it to make Drupal function properly with images.

It relies on the following libraries, which I didn't have, so used fink to get them.
shell> sudo /sw/bin/fink install libjpeg
shell> sudo /sw/bin/fink install libtiff
shell> sudo /sw/bin/fink install libpng (this one it couldn't find)

Grabbed zlib source (it's not in fink either)
http://prdownloads.sourceforge.net/libpng/zlib-1.1.4.tar.gz
and make, make install

I still had php source in /source/php-4.4.0

./configure --with-zlib-dir=/usr/local --with-libjpeg=/sw --with-libtiff=/sw --with-gd --with-mysql=/usr/local/mysql --with-xml --with-apxs --enable-mbstring
(note: I get an error in phpMyAdmin if I don't use that last one)

sudo make
sudo make install

[in8spbook:/source/php-4.4.0] in8% sudo make install
Password:
Installing PHP SAPI module: apache
[activating module `php4' in /private/etc/httpd/httpd.conf]
cp libs/libphp4.so /usr/libexec/httpd/libphp4.so
chmod 755 /usr/libexec/httpd/libphp4.so
cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak
cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf
rm /private/etc/httpd/httpd.conf.new
Installing PHP CLI binary: usr/local/bin
Installing PHP CLI man page: usr/local/man/man1
Installing PEAR environment: usr/local/lib/php
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.3.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
[PEAR] XML_RPC - already installed: 1.3.1
Installing build environment: usr/local/lib/php/build
Installing header files: usr/local/include/php
Installing helper programs: usr/local/bin
program: phpize
program: php-config
Installing man pages: usr/local/man/man1
page: phpize.1
page: php-config.1

OK, so the install puts php in /usr/local/bin! That explains some stuff. To see which php is the default:

[in8spbook:/usr/local/bin] in8% which php, but it returns:
/usr/bin/php
So I rename the old one
in8spbook:/usr/bin root# mv -f php php.Nov06
and link to the new one
in8spbook:/usr/bin root# ln -s /usr/local/bin/php ./php

and check the version
in8spbook:/usr/bin root# php --version
PHP 4.4.0 (cli) (built: Jan 7 2007 17:39:02)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Checked and this line was already in /etc/httpd/httpd.conf:
AddType application/x-httpd-php .php
(that was already there)

but phpinfo still shows the build from Nov. 1, 2006!

Says to copy /apps/php-4.3.4/php.ini-dist to /usr/local/lib/php.ini
but my php.ini is not there!
File (php.ini) Path /private/etc/php.ini (and that one works OK)

OH! Forgot to restart apache (System Prefs | Web Sharing)

Last saved: 01/07/2007
Links: /computers/mac / php-configure-gd.txt

Print backgrounds in FF on Mac

In Firefox, go to File > Print > in the Print dialog, use the third popup menu from the top to set all your options the way you want, including Firefox > Appearance: check Print Background Images and check Print Background Colors.

Now, look at the second popup menu from the top of the Print Dialog box, marked Presets:. If you want to save this as the Preset that you are currently on, click that Presets popup and select Save. If you want to create a new Preset, click that Preset popup and select Save As, and give it a new name.

Last saved: 12/21/2006
Links: /computers/mac / printFF.txt

Where is that php.ini again?

I seem to forget this every time I need it. Today I needed it to increase the file size that phpmyadmin will accept (to import a backup file). I found I'm using the:
/private/etc/php.ini file (This is a Mac), and the line I had to change was:
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M
(it was originally on 2M)

Last saved: 12/19/2006
Links: /computers/mac / php-filesize.txt

Boot Camp for OS X

Boot Camp will please Microsoft enough to keep pimping their VirtualPC for a while for the Mac-fans, and they can sell legal copies of Winblows to that small group of folks that otherwise probably wouldn't have bought it. But besides some folks who want to boot up in Win to play a game, I think this is really not all that big a deal. You still can't run Windows apps under OSX, or share files across the installations (although it's not mentioned, Windows probably won't be able to see the HFS filesystem, though the Mac might be able to write to NTFS in some lame way). What to really watch out for: when Apple releases a $99 OSX to run on all the existing 32 bit PC hardware currently out there, allowing everyone in the world to trade in their previous administrative headaches for a real, beautiful, and civilized experience. Vista has been postponed (again) and Microsoft is suggesting that admins work up plans to wipe machines automatically when they become infected. Now there's a good solution to all the security holes in Windows! HAHA!

Since all the games I like run fine on my 1.5GHz Powerbook, I have no need to upgrade it. My next machine will likely be PC hardware though, but to run Linux or BSD, certainly not Windows.

Last saved: 04/09/2006
Links: /computers/mac / bootcamp.txt

Vi Word Count
from here

A better use of filters comes to mind, and that's to get a word count of the document (1752 words and counting!). To do this type:
:%!wc
This will display a group of three numbers like, "206 1765 9995" (and pretty much nothing else). These numbers indicate the number of lines, words and characters. To get the document text back press 'u'.

Last saved: 01/20/2006
Links: /computers/mac / vim-wordcount.txt

Powerbook won't wake from sleep?

I have been having the same problem (intermittently) that this blogger describes. This morning as I opened the case top, I noticed the sleep light was off and I knew what awaited me: the screen was black and no combination of key presses would bring it to life. However, the machine was definitely on and running hot, the fan was on which rarely ever comes on. The aluminum near the Esc key was hot to the touch. I looked in /var/log/system.log and found the following entries at about 4am even though I had put the machine to sleep at midnight and was fast asleep at 4am:

Jan 14 04:10:34 localhost kernel: handleAirPortChangesChannelWL fails because POWER IS OFF (the mask is correcty set however)
Jan 14 04:10:34 localhost kernel: System Sleep
Jan 14 04:10:34 localhost kernel: System Wake
Jan 14 04:10:34 localhost kernel: Wake event 0020

The blog entry I found pointing me to the Energy Saver Prefs is linked here:
http://www.n3wb.com/boolean/archives/2005/05/more-system-weirdness/
it's quoted below

"I was sitting in my room last night, playing a video game, I think, when I heard a ping from my PowerBook sitting on the shelf next to me. I looked over and saw that the sleep light was no longer on, so I opened it up and 'lo, it was awake and prompting me for a password. But not for long… The screen went black, despite the LCD and keyboard backlights still being on and responding to keyboard control. I was able to SSH in and shut it down from the command line.

On reboot, I checked the system log and found a line containing:

Wake event 0020

Searching around with Google didn't tell me much about it other than it's been around for awhile and affects some people fairly frequently.

I disabled "Wake for ethernet administrator access" and "Wake when the modem detects a ring" in Energy Safer prefs. I haven't had a "wakeup call" since last night."

Last saved: 01/14/2006
Links: /computers/mac / wake-from-sleep.txt

Starting nmap 3.26 ( www.insecure.org/nmap/ ) at 2006-01-12 19:34 EST

Interesting ports on localhost (127.0.0.1):
(The 982 ports scanned but not shown below are in state: closed)
Port State Service
17/tcp filtered qotd
18/tcp filtered msp
19/tcp filtered chargen
23/tcp filtered telnet
37/tcp filtered time
42/tcp filtered nameserver
43/tcp filtered whois
55/tcp filtered isi-gl
58/tcp filtered xns-mail
65/tcp filtered tacacs-ds
78/tcp filtered vettcp
80/tcp open http
81/tcp filtered hosts2-ns
88/tcp filtered kerberos-sec
90/tcp open dnsix
92/tcp filtered npp
96/tcp filtered dixie
105/tcp filtered csnet-ns
111/tcp filtered sunrpc
116/tcp filtered ansanotify
121/tcp filtered erpc
127/tcp filtered locus-con
140/tcp filtered emfis-data
150/tcp filtered sql-net
168/tcp filtered rsvd
169/tcp filtered send
171/tcp filtered multiplex
176/tcp filtered genrad-mux
177/tcp filtered xdmcp
183/tcp filtered ocbinder
184/tcp filtered ocserver
189/tcp filtered qft
191/tcp filtered prospero
195/tcp filtered dn6-nlm-aud
199/tcp filtered smux
204/tcp filtered at-echo
206/tcp filtered at-zis
222/tcp filtered rsh-spx
257/tcp filtered FW1-mc-fwmodule
264/tcp filtered bgmp
313/tcp filtered magenta-logic
315/tcp filtered dpsi
316/tcp filtered decauth
321/tcp filtered pip
350/tcp filtered matip-type-a
353/tcp filtered ndsauth
358/tcp filtered shrinkwrap
361/tcp filtered semantix
372/tcp filtered ulistserv
373/tcp filtered legent-1
378/tcp filtered dsETOS
381/tcp filtered hp-collector
389/tcp filtered ldap
390/tcp filtered uis
392/tcp filtered synotics-broker
418/tcp filtered hyper-g
419/tcp filtered ariel1
429/tcp filtered ocs_amu
438/tcp filtered dsfgw
448/tcp filtered ddm-ssl
452/tcp filtered sfs-config
466/tcp filtered digital-vrc
475/tcp filtered tcpnethaspsrv
483/tcp filtered ulpnet
486/tcp filtered sstats
492/tcp filtered ticf-1
503/tcp filtered intrinsa
509/tcp filtered snare
514/tcp filtered shell
522/tcp filtered ulp
524/tcp filtered ncp
528/tcp filtered custix
548/tcp filtered afpovertcp
549/tcp filtered idfp
551/tcp filtered cybercash
560/tcp filtered rmonitor
563/tcp filtered snews
564/tcp filtered 9pfs
572/tcp filtered sonar
573/tcp filtered banyan-vip
631/tcp open ipp
636/tcp filtered ldapssl
709/tcp filtered entrustmanager
740/tcp filtered netcp
748/tcp filtered ris-cm
769/tcp filtered vid
771/tcp filtered rtip
950/tcp filtered oftep-rpc
998/tcp filtered busboy
1024/tcp filtered kdm
1025/tcp filtered NFS-or-IIS
1033/tcp open netinfo
1080/tcp filtered socks
1084/tcp filtered ansoft-lm-2
1109/tcp filtered kpop
1112/tcp filtered msql
1127/tcp filtered supfiledbg
1241/tcp filtered msg
1346/tcp filtered alta-ana-lm
1350/tcp filtered editbench
1351/tcp filtered equationbuilder
1358/tcp filtered connlcli
1361/tcp filtered linx
1376/tcp filtered ibm-pps
1396/tcp filtered dvl-activemail
1399/tcp filtered cadkey-licman
1401/tcp filtered goldleaf-licman
1404/tcp filtered igi-lm
1408/tcp filtered sophia-lm
1410/tcp filtered hiq
1415/tcp filtered dbstar
1418/tcp filtered timbuktu-srv2
1420/tcp filtered timbuktu-srv4
1445/tcp filtered proxima-lm
1446/tcp filtered ora-lm
1449/tcp filtered peport
1451/tcp filtered infoman
1457/tcp filtered valisys-lm
1461/tcp filtered ibm_wrless_lan
1465/tcp filtered pipes
1467/tcp filtered csdmbase
1471/tcp filtered csdmbase
1475/tcp filtered taligent-lm
1478/tcp filtered ms-sna-base
1485/tcp filtered lansource
1487/tcp filtered localinfosrvr
1493/tcp filtered netmap_lm
1504/tcp filtered evb-elm
1507/tcp filtered symplex
1508/tcp filtered diagmond
1515/tcp filtered ifor-protocol
1526/tcp filtered pdap-np
1541/tcp filtered rds2
1546/tcp filtered abbaccuray
1600/tcp filtered issd
1652/tcp filtered xnmp
1671/tcp filtered netview-aix-11
1996/tcp filtered tr-rsrb-port
2001/tcp filtered dc
2010/tcp filtered search
2011/tcp filtered raid-cc
2013/tcp filtered raid-am
2014/tcp filtered troff
2027/tcp filtered shadowserver
2038/tcp filtered objectmanager
2044/tcp filtered rimsl
2241/tcp filtered ivsd
2307/tcp filtered pehelp
2401/tcp filtered cvspserver
2432/tcp filtered codasrv
2500/tcp filtered rtsserv
2766/tcp filtered listen
2998/tcp filtered iss-realsec
3306/tcp open mysql
3389/tcp filtered ms-term-serv
3462/tcp filtered track
3984/tcp filtered mapper-nodemgr
5100/tcp filtered admd
5190/tcp filtered aol
5193/tcp filtered aol-3
5236/tcp filtered padl2sim
5303/tcp filtered hacl-probe
5405/tcp filtered pcduo
5550/tcp filtered sdadmind
5713/tcp filtered proshareaudio
5800/tcp filtered vnc-http
5903/tcp filtered vnc-3
6004/tcp filtered X11:4
6105/tcp filtered isdninfo
6111/tcp filtered spc
6142/tcp filtered aspentec-lm
6502/tcp filtered netop-rc
6558/tcp filtered xdsxdm
7200/tcp filtered fodms
7201/tcp filtered dlip
8888/tcp filtered sun-answerbook
9090/tcp filtered zeus-admin
9535/tcp filtered man
13701/tcp filtered VeritasNetbackup
13708/tcp filtered VeritasNetbackup
17007/tcp filtered isode-dua
17300/tcp filtered kuang2
22273/tcp filtered wnn6
22289/tcp filtered wnn6_Cn
27374/tcp filtered subseven
31337/tcp filtered Elite
32770/tcp filtered sometimes-rpc3
32772/tcp filtered sometimes-rpc7
32775/tcp filtered sometimes-rpc13
32777/tcp filtered sometimes-rpc17
44442/tcp filtered coldfusion-auth
61439/tcp filtered netprowler-manager

Nmap run completed -- 1 IP address (1 host up) scanned in 5.881 seconds

Last saved: 01/12/2006
Links: /computers/mac / open-ports.txt

Powerbook won't wake from sleep

-from the apple forums

If your Mac happily goes to sleep but won't wake up--Hold down the power switch to force-reboot your machine and get it running again.
Don't worry-your Mac isn't narcoleptic. Its Open Firmware system or NVRAM (nonvolatile RAM) is likely corrupt, and your Mac can't remember how to wake up.
Restart your Mac and immediately hold down the Command-Option-O-F key combo until you see a somewhat intimidating command-line display that ends with the Open Fimware prompt. Type the following lines:
reset-nvram
press Return on keyboard
set-defaults
press Return
reset-all
press Return
Your Mac will reboot. Once it's running, put it back to sleep to test. If the problem recurs your Energy Saver preferences may be the culprit. Delete the com.apple.PowerManagement.plist file (go to Finder/Hard drive/Library/Preferences/SystemConfiguration)--don't worry, your Mac will regenerate a new one--and then restart to see if that rights the wrong.
Still did'nt work? Might be time to call AppleCare or see an Apple Genius or a technician.

Cheers!
DALE

Last saved: 12/18/2005
Links: /computers/mac / nvram-etc.txt

Disable character palette in OS X menu

Arrgh. This was really driving me insane. Somehow a little American flag had made itself home in my OS X menu bar along the top of the screen, and it was loading all the time. Clicking on it launched the otherwise friendly 'Character Palette' from which you can pick all sorts of different wierdo characters (like the 'Character Map' in Windows), but it had somehow turned gotten stuck in the menu bar and there was no (apparent) way to turn it off! There was no option for disabling it in the palette's window itself. Not wanting to clutter up my menu bar with needless icons, I googled for awhile until I finally found a site on the web that pointed me to the System Preferences | Personal | International | Input Menu where I could uncheck the Character Palette (yay).

Last saved: 11/27/2005
Links: /computers/mac / char-palette.txt

Upgrading php on my Powerbook

Thanks to this site:
http://developer.apple.com/internet/opensource/php.html
I was able to upgrade my installation of php (4.3.11) to 4.4.0 and add several modules that I wanted to use without a hitch. The basic process was to download the libjpeg, libpng and zlib modules, compile and install them, then download php and compile it with a configure line that included all the modules I wanted (mysql, gd, apxs, etc.) and restart apache.

I used the following configure line
'./configure' '--with-zlib-dir=/usr/local' '--with-libjpeg=/sw' '--with-libtiff=/sw' '--with-gd' '--with-mysql=/usr/local/mysql' '--with-apxs'

Running php from the command line still runs 4.3.11, yet apache + phpinfo.php reports 4.4.0 and has my modules (I was looking for the GD library), so I'm clearly missing something here.

Last saved: 10/01/2005
Links: /computers/mac / php-upgrade.txt

Notes on Vim (the editor)

Since I do a lot of web development at work (on a WinXP box), I was looking for
something that I could use there that had the kind of features I was used to
having at home (once on Linux, now a Mac). I still use and love vi for it's
syntax highlighting, ability to use anywhere - and over ssh, and near immediate
load time. At work I was using FirstPage2000 (No, not MS FrontPage), and
it's only downside was the how slow it loaded up. At home I was using TacoHTML
which was a lot closer to what I was looking for, with built in project view
mode, and it's awareness of php syntax (FirstPage is php stupid). I want to
double click a file and have it open instantly - is that too much to ask? With
a Pentium4-2GHz machine there is just no excuse to force me to wait for more
than a split second to edit a text file! Honestly, it's almost slower to edit
text than when I used to write papers on an IBM 286 (with math co-processor).

One day at work I was just so plain frustrated that I said to myself, "what I
really want is 'vi' for windows"! A quick google search turned up the VIM
project, and it's exactly what I was looking for. VIM is vi on steroids, if
you already know vi, then VIM is not a strech - if you're totally new to
vi/vim/gvim, then I can only say that the learning curve is not really that
steep, and you can configure vi on windows to be a mega-powerful notepad.

Getting my preferences set up in Windows was really easy, though I admit that
on the Mac it was a little more painful. Not difficult, just frustrating when
simple things like the backspace key don't work and need to be set up.
Preferences are set by editing a _vimrc text file (.vimrc in unix variants) and
putting in the things you like. Some of my current preferences file for OSX
includes:

syntax on
set gfn=Monaco:h15:a
set backspace=indent,eol,start
set nu
set nocompatible
win 60 25
colo darkblue
set linebreak
set display+=lastline

Absolutely critical was the gfn line to set the font up - it's nearly
impossible to read on the 12" PB. linebreak makes vi break on words and not
just the last character which is the default and makes it really hard to read.
nu displays numbers for each line which is really handy when you're working on
any kind of code. colo is short for colorscheme and I had a heck of a time
until I realized that colo worked and colorscheme did not.

Another mportant thing is the ability to use 'plugins' to extend the
functionality of the program. An awesome example of this is the cvscommand
plugin which allows me to work in Vim and commit my work to the local
repository (at home) and hopefully do the same at work (though I haven't tested
it there yet).

Realizing that vi is not a word processor, but a text editor may be difficult
for some folks. To format text according to the rules you set up, you have to
process the text through gq for nicer on screen results. To do so, use :normal
gq}

Last saved: 09/24/2005
Links: /computers/mac / vim2.txt

Make Pith helmet work again after Safari upgrade

Temporary solution while (I'm sure) the developer updates it:

  • Find the "PithHelmet.bundle" file -- probably in /Library/Application Support/SIMBL/Plugins
  • ctrl-click on the "PithHelmet.bundle" file, and select "Show Package Contents"
  • Inside the "Contents" folder, double-click the "Info.plist" file. It should launch the "Property List Editor" app.
  • Expand "Root", then expand "SIMBLTargetApplications", then expand "0".
  • Double-click the number ABOVE 125 (MaxBundleVersion) and change it to 312.
  • Save and quit the editor.
  • Relaunch Safari -- done!

NOTE: Backup "PithHelmet.bundle" before doing this hack. (4/15/2005, Version: 2.2)

Or Uninstall it

It's in the Pith Helmet readme. And online at
http://culater.net/software/Pi thHelmet/PithHelmet.php
In short, Pith Helmet works through SIMBL (Smart Input Manger
Bundle Loader). SIMBL lives in /Library/InputManagers

Pith Helmet itself is a bundle for SIMBL and lives in
/Library/Application Supports/SIMBL/Plugins

Remove them.

Last saved: 05/21/2005
Links: /computers/mac / make-pithhelmet-work.txt

Vim in Mac OSX hint

Arrgh. This was driving me absolutely crazy. I am so used to the syntax highlighting in my vim install on my Mandrake box that I wanted it enabled on the pbook too. I was convinced after searching the internet that this was something having to do with a faulty termcap install or something dire like that. As it turns out, you just have to issue

:syntax on

and it works fine. (I put it in .vimrc though)

Last saved: 05/07/2005
Links: /computers/mac / vim.txt

Changing the default shell in OS X (if you upgraded, its still tcsh)

(found on slashdot)

chsh(1) worked just fine to change my shell. HTH.

[ Reply to This | Parent ]

Re:Infidel! (Score:5, Informative)
by OECD (639690) on Tuesday March 22, @03:52PM (#12015701)

it is a simple change in the NetInfo Manager to go from tsch to bash.

Yes, and you'll have to change it yourself if you've upgrade to Panther from a previous version of OS X. (Unless you prefer tcsh, of course.)

Launch NetInfo Manager (in Applications/Utilities)
Click on "Users"
Click on your username (it'll be the short username)
Click the lock (to be able to make changes)
Double-click on the "shell" item in the bottom pane
Change the value to "/bin/bash"
Quit NetInfo (to set new values)

You can also change it via the terminal, as someone else has pointed out

Last saved: 03/25/2005
Links: /computers/mac / change-default-shell.txt

Change ^M to Unix line endings so Perl scripts work

you can use vi too Authored by: iMike on Thu, Jan 4 '01 at 06:10AM You can also use vi to replace the Mac line breaks using the following command:

:%s/^M/^M/g

NOTE: You will need to type shift+: to get to the colon prompt
in vi you can then enter the command starting with the % symbol.
The ^M actually maps to control+shift+v followed by control+shift+m
(+'s are not included), so in actuality the command looks like this:

:%s/control V control M/control V control M/g

Many thanks to my former Perl teacher for this one--
I used it a whole lot of times in my Perl class. 8^)

Mike

[ Reply to This ]

  • A way to do it with SED - Authored by: Excalibur on Wed, May 30 '01 at 10:48AM

Command line / shell variant Authored by: osolemirnix on Mon, Jun 24 '02 at 11:33AM Use the following shell command:

tr -d 'r' < file.txt > file.txt

This will remove the carriage returns (^M) and leave only the unix linefeeds.

Alternatively:

tr 'r' 'n' < file.txt > file.txt

This will replace the carriage returns (^M) with unix linefeeds.

Last saved: 03/21/2005
Links: /computers/mac / remove-hatM.txt

Restarting services in Mac OSX

sudo kill -HUP `cat /var/run/xinetd.pid`
will restart the xinetd service

Last saved: 02/27/2005
Links: /computers/mac / restart-services.txt