If you want to edit a file that requires root access (for example, the Apache webserver config file), there are a few ways to do it. The most common is to use su in a terminal session, enter your root password, edit the file, then end the terminal session. You can also use sudo from the command line to launch the editor as root.
However, if you prefer GUI-based editors such as jEdit (my favorite), it's much more complicted to edit root-access-required files. You have to first logout as your current user, and then login as root. This is basically not practical, especially if you're using Classic and leave a bunch of apps open all the time (as I do).
Brian Hill has written a little program called Pseudo that does nothing more than launch the application dropped onto it as another user. So to use jEdit for my Apache config files, I simply drop the jEdit icon onto the Pseudo icon, and enter my root password. jEdit launches, and I can then open and edit the Apache config file as necessary. I don't have to quit any other apps, and when I'm done and quit jEdit, I don't need to worry about remembering to login as a normal user again.
The only rule I follow is to immediately quit the root-required application as soon as I'm done working on the file in question, so that I don't accidentally edit other files which I'd rather not work on as root by accident!
Last night, I installed the OS 9.1 update on my OS X box. This means that Classic no longer functions in OS X. However, you can use both if you like, as long as you can install a second OS 9 folder. If you have more than one partition (in particular, an OS X and an OS 9 partition), simply upgrade your "real" 9.04 to 9.1, and leave the OS X version alone at 9.04.
After the upgrade, I found that the Classic Preferences couldn't see my 9.04 folder; it just saw the 9.1 folder, which meant I couldn't use Classic.
I restarted into 9.1, and then used the System Disk utility to select the OS X partition's OS 9.04 folder as the boot drive, then rebooted into 9.04. Once there, I again used the System Disk app to select OS X, and booted into OS X. I was then able to specify the 9.04 folder as the Classic environment in the Classic prefs dialog.
It seems OS X 'remembers' the last OS 9 folder you used, and uses that one as the Classic environment. This can be a bit dangerous if you have two 9.04's on your machine, and you're trying to keep one 'clean' from OS X. I haven't tested it, but it appears that if you simply boot into your 'real' 9.04 and then launch OS X, you'll change the Classic environment to your real OS 9.04. It would appear the safest way to do this would involve running whatever you needed in your real environment, then booting into the OS X 9.04 system, and then booting into OS X.
Hopefully this will all be moot point when OS X 1.0 ships.
The default shell (the program that runs when you open a terminal window) is called tcsh. Bash is an alternative with a superset of features that many UNIX users prefer; you can read about it on the Bash information page. Jim Weisbin of savagetranscendental.com has written a great set of instructions for installing the Bash shell in OS X.
You can download Bash from Jim's site, and the installation instructions are included. It's quite simple; if you've used the terminal much at all, it should be fairly straightforward. You can also view the instructions online prior to downloading to get some idea of the process.
This thread over on the MacNN forums discusses how to mount your iDisk using a terminal session. Why might this be useful? You could SSH to your OS X machine from anywhere, mount your iDisk, and then use cp to copy files from your iDisk to one of your local drives ... with the new "Apple Software" folder on iDisk, this could prove to be very handy!
I've documented the "how-to" in the second part of this posting, but head over to MacNN to read the full details!
He gave a very exciting demo of the new OS X features, including (amongst other things) hierarchical capabilities in the dock, the return of the Apple menu at the left edge of the screen, customizable finder navigation features, and (amazingly cool!) QuickTime movies playing in the dock! Also, it looked very fast in general use (of course, he was probably on the fastest new machine).
In addition, he introduced some very cool new hardware and software. Go to MacCentral's notes live from the keynote for all the details. The most interesting things (to me, anyway) were DVD recording hardware in the new high-end G4's, iDVD, iTunes (for free!), built-in Finder-level CD burning in the new boxes, and (of course) the Titanium PowerBook!
In all, it was a very impressive show. The most relevant OS X items of interest were the price ($129) and the ship date (Saturday, March 24th).
On a related note, anyone interested in buying a slightly used G4/350 AGP? ;-) I'm thinking I really really want one of the new 733mhz machines ... and I wish I had some viable excuse to need a new G4 Titanium PowerBook!
Say you are sharing a computer with a number of people (say your family), and you want to be able to share a common mailbox. It turns out that with a little work, this can be done using MacOS X (PB) and Mail.app. But it does take a little work, some time with terminal.app, and the root password.
Read the rest of this article for detailed instructions on how to set up a mailbox that can be used by more than one user. [Editor's note: I have not tried this on my machine yet, but it looks fairly straightforward.]
Accessing your idisk (given to you when you sign up for itools) is quite easy under OS X.
When in the finder, select Connect to Server under the Go menu (or just press command-K). When the dialog box appears, make sure the drop-down menu says AFP Servers, and then type idisk.mac.com in the URL entry box.
A username/password dialog box should appear. Enter your mac.com username and password, and your idisk should mount on the desktop. Once it's mounted, you can make an alias to it, and simply double-click it in the future.
Apple has added a new "Software" folder to everyone's idisk which contains a selection of OS X software disk images. To use, simply drag the image you want onto a local volume and it will download. There's a large number of programs listed, and I imagine this folder will get much more active once OS X 1.0 ships. Quite cool, and this alone probably makes it worth getting a (free) itools account.
Thanks to 'James' for submitting the idisk question!
The tcsh shell (the one that launches when you start a terminal) has a prompt which looks like this:
You can modify the prompt with the set prompt = command (subtle, I know!). Over on the MacNN forums, this thread includes a great tutorial (written by blanalex) on how to generate some unique and useful prompt strings, including those with colored foregrounds and backgrounds.
I've reproduced the final how-to from the discussion in the remainder of this article, in case the MacNN posting goes away anytime soon.
[Editor's note: The following applies to the Public Beta only. The current release version of OS X does not contain SSH; search the site for articles on installing SSH if you'd like to use it. Rumor has it that the first OS X update will again include SSH]
If you access your OS X box remotely, you can do so through an incredibly simple-to-use Telnet server (simply click "Turn on remote Telnet access" on the Sharing System Preference panel). However, this is not the best way to connect to your OS X box - your passwords are transmitted in cleartext (non encrypted), meaning that they could be intercepted by those with malicious intents.
OS X includes a built-in secure remote access package known as SSH (Secure SHell). However, there is no GUI for enabling SSH, which is unfortunate (hopefully this will be changed prior to final release). It is not, however, overly difficult to enable SSH using a terminal session, if you're reasonably comfortable with editing files in the shell.
If you access your machine remotely, and you would like to do so more securely, read the rest of this article for information on how to enable and use SSH.