Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Enabling sendmail in OS X final UNIX
'gdif,' who posted the Airport base station emulator page, has put together a little how-to on enabling 'sendmail' in OS X v10.0. You can find the article here:

http://homepage.mac.com/gdif/tipstricks.html

In addition, there are some other great UNIX tips on that page, including a "renice" command for the Window Manager that may potentially speed up your window redraw. I've added the site to the links section as well.
  Post a comment  •  Comments (3)  
  • Currently 3.25 / 5
  You rated: 2 / 5 (4 votes cast)
 
[6,601 views]  View Printable Version
Vim editor with syntax highlighting UNIX
I have managed to compile on Mac OS X final the "vim" editor from www.vim.org - version 5.7, but syntax highlighting is working WITHOUT COLORS - syntax elements are highlighted only by "underline" attribute, not by colors. Does anybody know:

a. how to activate colors in vim in Mac OS X?
b. how to run vim as gvim, i.e. in graphical mode?

--
jpzr.
  Post a comment  •  Comments (4)  
  • Currently 3.50 / 5
  You rated: 4 / 5 (4 votes cast)
 
[12,942 views]  View Printable Version
Path statements when using the Bash shell UNIX
[Editor's note: See the comments for a good discussion and solution to this question]

I just managed to get bash compiled and running but I have a problem whenever I switch the shell in Terminal.app's preferences.

If I set it to bash, zsh or anything besides tcsh, it seems that I can only use commands from /bin. I mean, I'm missing basic stuff like ping and traceroute. I can su root and copy commands from /sbin or /usr/bin, but this doesn't seem like the right way to go about using my spiffy new shell.

Oddly enough, I can start Terminal with tcsh and then temporarily switch to bash, and everything works perfectly. Tried using chsh, but it launches vi, and vi and I are not on speaking terms.

Need help from someone who knows what the heck I'm doing wrong.

Thanks,
-Jeff K.
  Post a comment  •  Comments (10)  
  • Currently 4.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[6,103 views]  View Printable Version
Installing SSH on OS X release version UNIX
I've purchased and installed Mac OS X on my Blue & White G3. Now I'm looking for ssh. Is it missing from this release? It was present in the Public Beta and I need secure telnet to be able to work from home.

Typing 'ssh' in a terminal session results in the shell trying to resolve my unknown command to 'sh' instead.

I have installed everything available on both the Mac OS X Installation CD and the Developer Tools CD. Any help would be greatly appreciated.

Steven M. Fish

[Editor's Note: See the comments for a couple of methods for installing SSH. The URL for the Stepwise how-to is:

http://www.stepwise.com/Articles/Workbench/2001-03-21.01.html

I haven't done this yet, but it's on today's project list!]
  Post a comment  •  Comments (10)  
  • Currently 2.00 / 5
  You rated: 2 / 5 (4 votes cast)
 
[7,618 views]  View Printable Version
Relocating the 'Users' directory UNIX
[Editor's note: See the comments for a walk-through on how to successfully move your 'Users' folder to another hard drive.]

I'm interested in relocating my Users directory to seperate partition on my hard drive, to make sure there's plenty of room for all my users files. Knowing that Unix requires certain folders/files to be in certain locations, is this possible? If so, what other files/prefs will I have to change in order to make sure the system understands this? (BTW, I'm a total unix newbie, but very keen to learn!)
  Post a comment  •  Comments (31)  
  • Currently 3.00 / 5
  You rated: 4 / 5 (4 votes cast)
 
[26,942 views]  View Printable Version
Edit the Apache web server config file UNIX
In the Public Beta, the Apache web server's configuration file lived in:
/Library/WebServer/Configuration/apache.conf
With the final, Apple has (for some reason) returned to a more standard (I believe) structure. You can now find the config file here:
/etc/httpd/httpd.conf
Sneaky devils, those Apple engineers! I tested it by changing the port assignment, and it worked, so this is indeed the active configuration file.
  Post a comment  •  Comments (4)  
  • Currently 2.75 / 5
  You rated: 5 / 5 (4 votes cast)
 
[11,512 views]  View Printable Version
Enabling the root password (three ways) UNIX
Strong Warning: You should only enable root if you really really need it, really know what it's for, and realize the security implications of enabling root! You can do everything you need to do with "su do", so root is really not needed ... with that said, here's how to enable it - please understand what you're doing and why before you do this!

The "root" user (also known as the superuser) is the most powerful UNIX account. The root account can do anything to any file or folder, anywhere on the system. For that reason, it's considered quite dangerous, and only needs to be used (occasionally) by advanced users.

Because of the dangers of operating as root, Apple has chosen to hide the root account in OS X Final. However, there are a number of ways to enable it. The easiest is to boot off the install CD, and look under the Install menu for the "Password Reset" option. You can use this to change your own password if you forget it, and to enable the root account. This utility will not run if you copy it to your hard drive! It only works when booting from the CD.

Read the rest if you'd like to know how to do this from within OS X, and skip the CD-based reboot.
read more (155 words)   Post a comment  •  Comments (24)  
  • Currently 2.80 / 5
  You rated: 2 / 5 (10 votes cast)
 
[258,760 views]  View Printable Version
Using the terminal to quit a GUI program UNIX
[Editor's note: See the comments for the answer to the question.]

Does anybody know how to quit a GUI program through a telnet session? I can open GUI programs through telnet but can't figure out how to then quit that same program. PS won't show GUI programs so I can't KlLL them. Any help is appreciated.
  Post a comment  •  Comments (10)  
  • Currently 3.00 / 5
  You rated: 3 / 5 (5 votes cast)
 
[16,391 views]  View Printable Version
Better disk usage information UNIX
The UNIX environment has two common commands for looking at disk usage - 'df' and 'du'. 'df' returns information about all mounted disks, and 'du' returns information about a given file or set of files. As installed in OS X, though, the 'df' and 'du' commands do not return easy to use information. For example, here's the 'df' output for one drive on my system:
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/disk0s9 3121344 1314624 1806720 42% /osxfiles
Wouldn't it be much nicer if you could have it output like this:
Filesystem            Size  Used Avail Use% Mounted on
/dev/disk0s9 3.0G 1.3G 1.7G 42% /osxfiles
Read the rest of this article if you'd like to learn how to create a more usable "df" (and other!) commands.

NOTE: I have packaged four of the more useful of these utilities (ls, dircolors (sets the colors for the new ls), df, and du) into one downloadable archive. These are pre-compiled, and you'll just need to expand the archive with OpenUp or the command line (or the new StuffIt Expander). Move the files into /usr/localbin, and they should be ready to go. I have NOT included the 'man' pages, since I wasn't sure how to do that - read the GNU online help for info on each command, or compile the whole package.
read more (514 words)   Post a comment  •  Comments (4)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (4 votes cast)
 
[9,399 views]  View Printable Version
Setting file permissions on multiple files UNIX
Last night, as I began experimenting with possible successors to geeklog, one package (phpnuke) had an instruction step that read:

"Set all files to 666 permission; set all directories to 777." Although this is relatively trivial for multiple identical items (chmod 777 *), it's a bit trickier when files and directories are mixed in the structure, with sub-directories and sub-files, and different settings for directories and files. The phpnuke package installs literally hundreds of files, and probably 25-50 subdirectories. I was reduced to mass changing everything in a folder (chmod 666 *), and then setting the directories by hand. It took a while!

I was sure there was an easier way, but had no idea what that way might be. A post to the MacNN forums provided the answer, courtesy of "Icampbell":
find . -type f | xargs chmod 666
find . -type d | xargs chmod 777
This does exactly what I needed it to do. 'xargs' is an interesting command, and well worth reading up on ('man xargs'). It basically executes the command specified (chmod in this case) for each item passed to it (the results of the 'find' command, routed via the pipe '|' symbol). It's fairly easy to see how powerful xargs can be, given its ability to act on a series of things passed to it. One note of caution in this example - the 'find' command will search down through the directory structure from where you start, so make sure you want to effect EVERYTHING in that path if you try something along these lines!
  Post a comment  •  Comments (5)  
  • Currently 4.17 / 5
  You rated: 5 / 5 (6 votes cast)
 
[20,357 views]  View Printable Version