Bookmark this site!

Showing posts with label fink. Show all posts
Showing posts with label fink. Show all posts

2008-12-27

Starting over (again)

Lovely new MacBook Air — light as a feather pillow.

Power up.
Switch on.
My Air arrived with zero charge. I had a nervous few minutes with no response from the power button. I had time to read the FAQ, try again, and panic briefly before it eventually had enough charge to start up.
Setup admin account
Setup wireless
Software update
This may take some time (for me this was an 870MB download). While waiting you can Install Firefox
Software update again
Repeat until there are no further updates
Migrate user data from your TimeCapsule backup
Do this over ethernet, unless you want a long wait (I had 40GB to migrate. I get 2-3GB/h over a wire connected to my remote Express — 1.5GB/h with two wireless hops, and 7-8GB/h when wired directly to the Time Capsule.)
Setup user accounts
Include a working account for yourself
Configure Time Machine Backup for your new machine.
Start the initial backup.
This will take even more time (my initial backup is requires transfer of 55GB of data).
You can carry on with other tasks meanwhile. You can interrupt the process ("Stop Backing Up" in the Time Machine Menu), and resume later. Again, do as much of this as possible over a wired connection, to speed things up.
Use Calaboration to sync your Google calendars with iCal
Install Fink and Fink Commander
This allows you to install and manage various Unix utilities. I start with emacs-carbon.
Install MacPorts and Porticus
This also allows you to install and manage various Unix utilities and for many has more up-to-date versions. It also has a port of polyml. I start with polyml, tetex, bibtex2html and hevea. Porticus doesn't have carbon-emacs.
Install Kerberos Extras
Our "staffmail" imap server supports Kerberos authentication - just use the realm EASE.ED.AC.UK and your EASE user name and password. Unfortunately Apple haven't yet implemented this fundtionality on the iPhone — so syncing broke my email on the iPhone.
Change back to password authentication; sync again, so mail on the iPhone is back to normal; turn off sync; turn on Kerberos authentication on the Mac.
Install Developer Tools
Apart from anything else, this is probably the easiest way to get CVS installed.
Download iPhone SDK
Useful for the iPhone emulator which lets you see how your web pages will look on the iPhone. Maybe someday I'll write some code too!
Turn on the Safari Develop menu
To display the Develop menu in Safari 3.1 or higher, select the checkbox labeled "Show Develop menu in menu bar" in Safari's Advanced Preferences panel.

2008-04-30

Starting over: MacPorts

As a long-term Fink user, I've found it hard to summon up the energy to move to Macports (previously known as Darwin Ports), until now. A dead disk provided the necessary impetus to overcome this energy barrier.

MacPorts—so I am told by friends I trust—is closer to the Mac zeitgeist, and has more packages available in fresher versions.

My first experience was not good. I tried the standard install from .dmg with two fresh, fully updated installs of Leopard + x11 + XCode Tools—one on my ageing MBP; one on a sparking new MacBook Air. Neither succeeded in creating the code>.profile that is supposed to adjust the PATH environment variable.

You should start with a standard install as it does almost everything—and may even do it all, for some it succeeds.

In the environment of a shell accessing packages installed by MacPorts, PATH should include /opt/local/bin:/opt/local/sbin and MANPATH should include /opt/local/share/man. The standard install is meant to create a .profile to achieve this. It didn't.

Googling macports leopard profile led to various suggestions (as usual, others have encountered this problem before me). One of these works—others don't.

Do not add the new paths to /etc/paths and /etc/manpaths.

Do not add new files named macports or MacPorts, containing the new paths, to /etc/paths.d/ and /etc/manpaths.d/.

Do create a file ~/.profile containing the following code:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH

Then you can type sudo port -d update in a fresh terminal window, to update your MacPorts installation, and sudo port install emacs-app, for example, to install a Cocoa version of emacs.

You'll find the Emacs installed as a regular application in /Applications/MacPorts/.

Note: If you already have a .bash_profile or .bash_login, you can and should append the commands above to that file, and optionally rename rename that file as .profile, instead of creating a new .profile.

Explanation: (for the full story try man bash)

When bash is invoked as an interactive login shell, or as a non-inter-active shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

2007-01-28

LATEX Equation Editor

La TeX Equation Editor
LaTeXit
In an earlier post I mentioned LATEXiT, by Pierre Chatelier. The LATEX Equation Editor is similar in function—and not entirely dissimilar in appearance.
I'm not sure yet which I prefer. Both are free—try both. If you already downloaded LATEXiT last year, make sure you try the latest version.
If you have a Fink tetex installation, you must set the preferences for LATEX Equation Editor to specify that LATEX is in /sw/bin/ and ghostscript in /sw/share.
LaTeX Equation Editor prefences See also mimetex and LATEX render.

2006-06-04

texmf.local for Fink-installed latex

This note assumes you have a working Fink installation of tetex on your Mac.

To install the local latex classes, such as infletr, which produces letters on informatics letterheads (School, Institutes, Graduate School, ITO, etc.):

In a terminal window on your mac, do (don't type the % that is supposed to represent the shell prompt)
% cd /sw/etc/texmf.local/tex/
then the following
% sudo scp -r user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex .
Here user is your UUN, host is any dice machine you have access to. You will get asked for your mac password (for the sudo) and then, unless you have a valid Kerberos ticket, your dice password (for the scp access to your dice machine).
Then let the latex installation cache information about the classes you've installed.
% sudo texhash

Fink doesn't interfere with texmf.local, so you can use Fink to update your latex installation without destroying your copy of the informatics classes — but you should use rsync from time-to time to keep your copy up-to-date.

% sudo rsync -az --delete user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex /sw/etc/texmf.local/tex/latex
% sudo texhash

2006-04-30

Fink on Intel Macs

Summary: It works for me!

The newsflash is discouraging:

A preliminary version of Fink for the Intel architecture is now ready. No binary packages are available, and things are still rough around the edges, but it should be usable if you are patient!

but gives the following instructions:

To install it, you need to install the XCode compiler and SDK packages (at minimum). Then you need to get the file fink-0.24.14.tar.gz from the Sourceforge file release page for Fink, expand the file, and run the command
./bootstrap.sh
At the end of the bootstrap process, run
fink selfupdate
and you'll get the currently available packages.

I tried it and it works! The Intel Mac is fast enough that installing everything from source doesn't take forever.

I then downloaded the 0.5.4 version of the Fink Commander binary from SourceForge - this works.

You can also download the source using CVS:

First login anonymously (this is a single instruction, and should be given on a single line, just copy the whole instruction, and paste into the terminal - when challenged for password, hit return):
cvs -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander login
Then checkout the whole tree (another single instruction - this will create a directory namd FinkCommander):
cvs -z3 -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander co -P .
open FinkCommander/FinkCommander.xcodeproj - this should launch XCode.

In the Project menu, Set Active Build Configuration to Deployment; in the Build menu select Build. Wait a short while and voila - your own universal 0.5.4 binary! Find FinkCommander.app and move it into your Applications folder. Make sure you tick use unstable packages under the Fink tab of FinkCommander preferences.

I use Fink primarily to install the latest emacs (emacs21) and LATEX (tetex), but also for other goodies such as unison (which now does doesn't yet build on Intel) and bibtex2html.