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

Install a command-line MP3 player UNIX
I just installed mpg123, a command line MP3 player. It's not as comfortable to use as iTunes, but it works fine. A benefit of the command line interface is that it uses very little memory and less than half the CPU as compared to iTunes - a big plus if you are on an older G3. The binary is available on macosx.forked.net.

[Editor's note: In case you'd like to install this yourself from source, it's not that difficult. You'll need the Dev Tools installed, of course, but after that, just download the 0.59r source from the mpg123 homepage linked above, then visit the mpg123 OS X port page on SourceForge and download the patch files. Expand the archive, then read and follow the directions in README.MACOSX (basically rename a file, then 'make macosx' and 'sudo make install'). Once installed, typing 'mpg123 /path/to/mp3_file' will play the specified MP3 file. Type 'mpg123' without any parameters to see a command list.]
  Post a comment  •  Comments (20)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[16,208 views] Email Article To a Friend View Printable Version
Take an online UNIX education course UNIX
The Central Institute of Technology offers Learning UNIX, a free, self-paced self-study guide on UNIX. The course covers:
  • Module 1: Introduction to Unix
  • Module 2: vi editor
  • Module 2a: mail
  • Module 3: Shell scripts
  • Module 4: Terminals, devices and csh
  • Module 5: awk
[Editor's note: I browsed through this course, and althought it's targeted at Linux systems, much of what you read will be applicable to OS X. There are other online UNIX tutorials, of course; a few of them are linked from the Links page.]
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[2,543 views] Email Article To a Friend View Printable Version
Customize welcome messages based on time of day UNIX
I saw your earlier tip regarding changing the motd file, but this takes things a little further. I created a shell script that is run periodically via cron (run as root, so it has write permission to /etc/motd) that changes the message of the day based on the time. I stored the script in /usr/local/bin, set the execute flag and changed the owner to root and group to wheel.

Read the rest of the article for the script and an explanation as to how it works.
read more (250 words)   Post a comment  •  Comments (6)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[5,985 views] Email Article To a Friend View Printable Version
User creation warning with dselect and fink UNIX
When first using dselect, the package manager with Fink, be very careful about letting it create users.

I wasn't paying careful enough attention and allowed Fink to create five or six new users, one of which was called "mysql". I already had a mysql user in order to run a MySQL server, but the new user Fink created overwrote that user, breaking my MySQL installation.

It is easy enough to remove that user, and recreate a mysql user, change the ownership of the correct files, and restore your MySQL installation, however, DO NOT use the Users preference pane in System Preferences to remove any of the users!

When Fink creates the users, if you check NetInfo, you'll see that each user's home folder is "/". Not good. Mac OS X assumes that when you remove a user, you, the admin, should take over the ownership of the former user's files. However, its not too smart about how it changes the ownership. Starting at the mysql user's home folder, /, OSX chowned EVERY SINGLE FILE stemming from the root directory to now be owned by me, nelsonj. To delete the user, you gave OSX root access, so it was able to change the ownership of all files, even those owned by "root". Things immediately ceased to work. I had to log out and log in as root (su and sudo don't work without the proper file ownerships). Tehn I had to change the ownership of everything back to root, then specify certain directories and change them back to my own. It's still not working 100%.

The lesson is either don't let Fink create new users, and/or don't use System Preferences to delete the users!

[Editor's note: I can't confirm this situation, as fink has never created a user on my system, but I thought a warning may be in order given the description of the situation! If you have further information, please post what you know about fink and user creation.]
  Post a comment  •  Comments (12)  
  • Currently 3.50 / 5
  You rated: 4 / 5 (2 votes cast)
 
[3,231 views] Email Article To a Friend View Printable Version
Update to PHP version 4.2 UNIX
Leave it to Mark Liyanage to keep us up to date with all that "just won't compile on OS X" software. This time - he's got the latest PHP 4.2.0 ready to go for us, either on his site, or through a simple shell script.

Read the rest of the article if you'd like to use the shell script update method...
read more (179 words)   Post a comment  •  Comments (11)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[3,866 views] Email Article To a Friend View Printable Version
Questions answered by RTFM UNIX
Ever wonder what someone ment when they told you to RTFM? Well the answer isn't what you may think it is; it means they wanted you to go to the RTFM ftp server at MIT! They have a HUGE (as in really really big) archive of documents, records, and faqs of usenet resources, etc. One in particular people here might find useful is the Unix FAQ archive.

And have a look around, you'll find a lot more useful stuff there, too. In fact, I dare you not to get lost!
  Post a comment  •  Comments (2)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,064 views] Email Article To a Friend View Printable Version
Display verbose-mode startup messages UNIX
Ever wish the startup messages went by just a bit slower so you could read them? Especially in verbose mode? Then dmesg is for you. dmesg displays the contents of the system message buffer, including the startup messages seen in verbose mode. Just open the Terminal, type dmesg | more and see what went flying by on the screen during your verbose-mode boot. Try man dmesg for a bit more information on how it works.
  Post a comment  •  Comments (3)  
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,971 views] Email Article To a Friend View Printable Version
Extract MPEG movies from .bin files in the Terminal UNIX
There's a great program called GNU VCDtools that lets you do many things to VCD's. Buried inside the app is a program called vcdxrip. To get everything right you need a few arguements to have it put out a simple .mpg:
alias vcdrip '/Applications/GNU vcdtoolsX 1.0b.app/
Contents/Resources/vcdxrip --no-ext-psd -o ~/.Trash/blah -b'
[NOTE: Enter on one line with no extra spaces; shown on two for narrower display purposes]

Now whereever I am, I can rip a VCD into a mpg. It tosses the XML information into the trash and it doesn't drop out any other input. Nice clean MPEG result.

[Editor's note: I have not tried this myself...]
  Post a comment  •  Comments (0)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,090 views] Email Article To a Friend View Printable Version
Upgrade a non-fink XFree86 installation UNIX
Last October, I wrote a beginner's guide to installing XFree86, fink and The Gimp on OS X (see this hint). At that time, it was easier to get the 'rootless' XFree86 installation outside of fink. Since October, the situation has changed and fink can now install the latest version of rootless XFree86. After stalling for quite a while, I decided it was time to upgrade my installed version.

Since I had originally installed XFree86 without the help of fink, I had to remove it that way as well. I intended, however, to use fink to install the newest version. Here's all I did to upgrade to the newest XFree86 release:
  1. Remove the two existing X11 directories with sudo rm -r /usr/X11R6 and sudo rm -r /etc/X11
  2. Remove the XDarwin application with sudo rm -r /Applications/XDarwin.app
  3. Install the base Xfree86 installation with sudo apt-get install xfree86-base (41mb download)
  4. Install the rootless patch with sudo apt-get install xfree86-rootless (5mb download)
While the guide was useful at the time it was written, the advances in fink and XFree86 have made it much easier to install a rootless XFree86 server. If I were starting from scratch today, I'd simply install fink then XFree86 as shown above; there is no longer any need to install XFree86 separately (unless you wish to do it that way, of course).

[Site administrative aside: Due to a very early morning commitment at work on Wednesday, updates will be published in the evening, Pacific USA time.]
  Post a comment  •  Comments (8)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,876 views] Email Article To a Friend View Printable Version
Subscribe to a daily UNIX tip email list UNIX
Don't know if you guys know about this mailing list called UNIX Guru - but it is a very nice "Tip a day" sort of list. No BS, ads, etc. I have receivedd it for the past two weeks, and already I have learned a lot I did not know. These are just the sort of tips us macosxhints.com readers love. The kind of stuff you grab and throw in your goodie bag for the day you might need it. You can view the tips and sign-up for the newlsetter here:

http://www.ugu.com/sui/ugu/show?tip.today

PS - I am in no way associated with the list, just a happy subscriber.

[Editor's note: This was mentioned in passing in another hint, but I felt it worth mentioning on its own merits.]
  Post a comment  •  Comments (5)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,836 views] Email Article To a Friend View Printable Version