Friday, September 18, 2009

How (not) to Wreck Your Shiny New Laptop

Ok, I'm not at that point yet, actually. But the next time I login, I will be nervous. Make that extremely nervous.

I'm trying to install a program; the installer is a tar-ed binary (first reaction: what, it's not dmg?). Fortunately, it came with instructions. Unfortunately, the instructions assumed that you knew what you were doing.

For example, there are many files and folders fundamental to the computer that aren't listed explicitly in one's home directory. Anything starting with . (for which there exists the command "ls -a"), or things like /etc, for example. But they are there, and one can get to them in the usual ways if one knows that they exist. Of course, seeing them is not the same as writing on them - many of these files require root privileges. That alone makes me nervous. (I haven't enabled root on my computer yet, and I don't really want to. Nor do I feel like using the all-powerful "sudo" command.)

Another problem I had was mounting. It's trivial to mount a CD, usually: put it in, and the computer will know it's there. Question: where is the CD mounted? It should be at "/mnt/cdrom", but I had no such directory. I still don't know where the mounted image is, actually. In the end I gave up and copied the entire zipped installer into my computer, and went from there, but that's because I was lucky enough to have a fairly small zipped file. If it's huge, I can't do that.

The third thing is, I need to create and change .login in my home directory (I'm not touching the one in /etc). This is apparently what the computer reads when I log in to an account. So now I'm afraid of logging off, because the changes come into effect the next time I login.

Fourth, I have a serial number. What I don't have is a prompt for the serial number. Huh?

Lastly, where is the application, anyway? (I am seeing alot of .exe's, but I thought a program usually has an actual, clearly labelled icon with which one can open to start said program. Or am I supposed to run the program in Terminal, too? Grumble.

Oh, and please, please, please let this program be compatible with Snow Leopard. I don't have Leopard.

(The program has a Windows version, which I know how to use - at least it has an icon - but I need the full power of the computer to run the thing and this means a Mac installer - I don't want to run Boot Camp.)

Assuming that I can login at all, the worst case scenario is using Time Machine. If I can't, then I might have to re-install everything. Exciting, isn't it?

In short, I need a crash course in Unix. The problem is, these things usually come up on an ad-hoc basis, and there's no course that teaches every random thing that comes up.

Anyway, if the next post or edit comes from a PC, you'll know what happened. Gulp.

[Edited]
Well. I can still log in. And apparently I do have to run the program from Terminal (sigh). Whether the thing will work remains to be seen.

[Edited again]
It's finicky, but it works! It works!

2 comments:

Unknown said...

Hey and congrats on getting it going! :-) I can definitely sympathize with the feeling of not wanting to mess up your shiny new install with incorrect "stuff".

A couple of notes:

* Mounted volumes show up under the /Volumes directory under OSX.

* FIlenames and volume names containing spaces or other "special" characters can be troublesome. You can use backslash or a pair of quotes to help out with that. For example, changing your current directory to the USB-stick named "NO NAME". Two ways to do that:

a. cd /Volumes/NO\ NAME
b. cd "/Volumes/NO NAME"
c. enter the first part of the name (ex. cd /Volumes/NO) and then press tab for tab-completion. This may or may not work depending on what else is in the same directory. Try it.

* You can drag-and-drop an icon from the Finder to a terminal window. This will paste the correct path of the file into the terminal.

* The default shell on OSX (bash) does not read .login as far as I know. It uses .bash_login.

* After editing these "login-files", you should be able to try out the changes by either opening a new terminal window or starting a new shell using the -l switch (as in "bash -l"). So you don't need to logout before trying it out. Another option could be to use a separate user account for trying things out.

* .exe-files are Windows executables, I believe none of them are the program you are looking for.

* Finally, since it seems you will be doing quite a bit of terminal based work, I strongly recommend you install MacPorts from macports.org. This will provide you with much of the UNIX/Linux world of programs, easily installable with commands such as "port install jmol".

* Finally, you do not need to use BootCamp if you need to run Windows programs. I recommend you check out VirtualBox (virtualbox.org). It's free and does about the same things as VMWare and Parallells.

Cheers and best of luck!

Echiral said...

Hi Mika, thank you so much for your comments! Good to know, good to know.