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

Start file sharing from the terminal UNIX
This may be useful for some people. To start file sharing from the terminal do the following:
cd /usr/sbin
./AppleFileServer
  Post a comment  •  Comments (2)  
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[8,105 views] Email Article To a Friend View Printable Version
FTP access and non-standard shells UNIX
OS X uses the tcsh shell for the terminal. There are a number of others you can install, including bash, which is probably the most popular. If you've installed one of these alternate shells, however, you may find that your FTP access has been disabled.

There's a file called shells that lives in /etc, and it contains a list of paths to known shells. The FTP server uses this file to limit the types of shells remote users will be allowed to connect with. The problem is that if you install a shell, it may or may not go where the shells file says it will go. For example, shells lists 'bash' as installed at /bin/bash, but it would more than likely be installed in /usr/local/bin/bash). If you try to connect and have a non-authorized shell, you'll see a message that says User username access denied.

The fix is simple - edit the /etc/shells file and make sure that the proper path to your alternate shell saved in the file. This tip was seen today on the X4U mailing list...
  Post a comment  •  Comments (3)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[4,867 views] Email Article To a Friend View Printable Version
Navigating the Finder old-school style... Desktop
Anyone remember the good ole way of navigating from the current open window with the arrow keys? If not, don't worry I will explain. If you do remember, OS X allows the same navigation, no need to read on.. just happy arrowing.

[Editor's note - read the rest of the article for one take on browsing the new finder using arrow keys and modifiers to great effect; there's some stuff in here that I'd never even thought to try before!]
read more (290 words)   Post a comment  •  Comments (3)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,175 views] Email Article To a Friend View Printable Version
Grab text with Stickies service Apps
At times you'll want to grab a selection of text different apps for any number of purposes. For example, you may be viewing a post in this "Tips" forum and want to keep a particular paragraph within a particular post.

Previously, you would have selected the text and dragged it to the desktop as a "clipping." This still works, but it clutters up your desktop.

Here's a better way:

Select the desired text -- in any Cocoa application -- and choose "Services" and then "Make Sticky" under the menu with your applications title in it (the menu just to the right of the Apple menu; it will have the same name as the application you're in). Stickies will launch if it's not already running, and create a new note with your selected text.

[Editor's addendum: In my opinion, system-wide services are one of the coolest and probably least publicized features of OS X. Take a look at the Services menu (under the application's name in the menu bar) for examples of what you can do.

Most services seem to be available even if the service app is not running; the application will launch when the service is selected. "Grab" services appear broken, at least in my 10.0.3 - it doesn't work with or without Grab running.

At present, only Cocoa apps can take advantage of services; hopefully, Carbon apps will gain the ability at some point in the future. I personally think services could turn into one of the most useful features of X]
  Post a comment  •  Comments (7)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[4,786 views] Email Article To a Friend View Printable Version
Remote activation of auto-login System
If you want to enable automatic login on Mac OS X remotely you can to this by using ssh and the niutil command. This requires that you have enabled "Allow remote login" in the System Preferences, of course.

1) Open an ssh session to your Mac.

2) type su to become root.

3) To enable the automatic login, the property "username" must be found by loginwindow in the local netinfo database. Here is how you do it:
niutil -createprop -t localhost/local /localconfig/autologin[space]
username user_to_log_in
(NOTE: shown on two lines; replace [space] with an actual space character and enter on one line)

Replace "user_to_log_in" with the username of the user who will be automatically logged in on restart.

4) Type "reboot" to restart you mac and see if it worked.
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[4,349 views] Email Article To a Friend View Printable Version
Option-click window widgets Apps
Thanks to macosxhints' user 'louisdeboer' for pointing this one out. If you option-click on any of the window widgets at the top left of an application window (most Carbon or Cocoa apps, it seems), it behaves just as though you option-clicked a widget in the old Finder - the action is passed to all open windows. Want to minimize all of OmniWeb's open windows? Just option-click the minimize button. Similarly, option-click the close button, and they all close.
  Post a comment  •  Comments (2)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[3,305 views] Email Article To a Friend View Printable Version
10.0.3 update is out... System
Check your software update panel ... I just installed it, and I'll post back details after I restart!

OK, here are the details. The modified files list seems to indicate that there have been changes to the BSD kernel, ADB I/O, CD storage, DVD storage, graphics I/O, networking, PCI, and a number of other areas. I've posted the whole list in the remainder of the article, in case you'd like to see it (it's not too long).

As for the operational changes, I can't say that it feels much different, but I'll have more to say after I get a chance to re-run my benchmark suite this evening. Apparently it squelches one bug in the Finder dealing with folders with large numbers of items. If you had over some relatively small number (600ish) in one folder, all the Finder would show was 539. They'd be there (you could see them in FTP or the terminal), but the Finder wouldn't work with them.
read more (62 words)   Post a comment  •  Comments (15)  
  • Currently 1.75 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[5,559 views] Email Article To a Friend View Printable Version
One-line batch file renamer UNIX
This one was posted to the X4U mailing list by Dierdre M., and I think it's an incredibly useful tip, so I'm posting it here!

If you want to batch rename a bunch of files (say "foo*.jpg" to "bar*.jpg"), you might think you could just do "mv foo*.jpg bar*.jpg" in the Terminal. However, this doesn't work right since the shell expands each argument before the execution occurs. However, there's a cool way to accomplish the same result with a (more complex) command line argument.

Open a terminal, and "cd" your way to the directory of interest (or just drag the folder you want to work with onto the terminal icon in the dock; it will open in that directory). Once there, we'll run a 'test' before actually change any names. This first version of the command is "proof of concept"; it will output what will happen, without actually doing it. So to rename all those "foo*.jpg" files into "bar*.jpg" files, type:
ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2'
This should output a series of "mv" (the unix "move" command, which is used to rename files) lines, each one showing the old and new name for each file affected. If it all looks right, then just pipe the output to the shell to execute:
ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2' | /bin/sh
That should do the trick. Dierdre points out that this is an especially nice way to do it, since you get to see what will happen before you commit to it! I happen to agree with that logic completely!

To use this on your own files, you'll need to replace the references to filenames and items to be replaced in both the "ls" and "sed" portions of the script.
  Post a comment  •  Comments (21)  
  • Currently 4.38 / 5
  You rated: 5 / 5 (13 votes cast)
 
[95,225 views] Email Article To a Friend View Printable Version
Improving FTP access security Network
With the release of 10.0.2, Apple has included an upgraded FTP server that makes it easier to control which directories FTP users can utilize. This is done using an 'ftpchroot' file, which makes each listed user's home directory appear as the root of the system via FTP, so there's no way they can move "up" out of their directories.

Implementing 'ftpchroot' is quite simple, but it does require a bit of editing work as root. If you'd like to restrict your FTP users to their own directory, read the rest of this tip.
read more (271 words)   Post a comment  •  Comments (25)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[22,394 views] Email Article To a Friend View Printable Version
Clear the terminal screen from the keyboard UNIX
Here is another shortcut (undocumented I believe) I found accidentally for use in a terminal window. Hitting Option-A will clear the screen as would the command 'clear'.

[Editor: You can also use Control-L, which is more standard]
  Post a comment  •  Comments (5)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[49,198 views] Email Article To a Friend View Printable Version