This isn't a revolutionary tip -- it just puts together several well-known tricks into something useful. Today I was downstairs with my iBook, and I wanted to play some music. Thanks to iTunes4, I can play all the songs in my desktop G4's library via the wireless network. That's great, because now I can keep everything in one place, and the G4 can be the music server for the entire house.
But two problems: The G4 is upstairs in my home office, and iTunes wasn't running. he easy solution is, of course, for me to get off my ass, trudge up the stairs, call up the dock, and start iTunes. Then go back downstairs and enjoy my music on the iBook. But, like any good computer geek, I'm lazy. So instead I did this:
Use ssh to log on remotely to the G4.
Give this command: open -a iTunes
Upstairs, the G4 starts up iTunes.
Log off the G4, and enjoy the music on the iBook.
In step one, I could have used telnet instead of ssh, if the G4 were set to allow it, but ssh is more secure, of course. And of course, the library will only be available if I've previously set the G4 to share its music library. Hopefully this tip will be a useful reminder to anyone as lazy as I am: You can log on remotely and use the open command to start up any app you might need.
[robg adds: Yes, it's basic, but useful and not (near as I can tell) published here before in this general form. I do a similar thing to launch VNC (a remote control client), as described in this hint.]
I have all my iTunes data on a linux NFS server, which I had previously used with a Windows box via Samba. The new iMac uses NFS to access the same data store. I found changing ID3 tags to be very, very slow compared to the Windows box. It turns out that write performance seriously lagged. smb_fs mounts performed well, but could not be automounted, so I ended up tuning the NFS settings.
The critical factor that affected performance was the number of nfsiod threads. Adding more threads means that more simultaneous NFS operations can occur at once (including read-ahead and write-behind operations). To increase this value, simply edit the file /System -> Library -> StartupItems -> NFS -> NFS, and change the line that reads:
nfsiod -n 4
Replace the 4 with 8 or more, followed by rebooting or manually killing and re-running nfsiod. You will notice an increase in throughput when writing large files. To test the speed, run the following command before and after the change:
time dd if=/dev/zero of=/mnt/home/testfile bs=16k count=16384
Going from 4 to 8 nfsiod threads resulted in write speeds going from 700k/sec to over 3.2mb/sec! Further tuning can be found by reading the Linux NFS How-To Performance Section.
Ever find it annoying that you can't rename your iDisk mounted on your desktop? Well here's a solution. In Finder click Go -> iDisk to mount the iDisk. Then open Applications -> Utilities -> Terminal. In the Terminal, type:
mv idisk_user_name new_idisk_name
Your iDisk will now disappear from the desktop. Now go to the Finder and click Go -> iDisk to re-mount your iDisk. Voila! You have just renamed your iDisk!
[robg adds: Amazingly enough, this seemed to work just fine. I haven't tested it extensively, but the disk did re-mount with the new name, and a quick copy to/from the disk worked fine. I have no idea if this will survive a logout or a restart, but I wouldn't think it would (anyone care to find out?).]
iTunes 4 lets you see how many users are connected to your shared stream, but not what they're listening to. Terminal to the rescue! Use lsof to figure out who's listening to what:
% lsof | grep mp3
% lsof | grep m4a
Etcetera, etcetera. This only works if you use filename suffixes, though. Or, if you'd just like to see everything at once, and all your music is in a central music folder, for example, "Music", do this:
% lsof | grep Music
Woot! Perhaps this will make its way into iTunes as an update at some point.
[robg adds: I chose to run this hint and the next hint separately, as they are two unique methods, and comments on both could go either direction...]
With the release of iTunes 4, interest in library sharing is growing. The iTunes Sharing preference pane tells you how many people are connected to your library, but not who they are. Here's a one-line terminal command (shown on two with the "" continuation character, so cut and paste should work) to show who is browsing your iTunes library:
If you want to kick off a specific user, all I can think to do is to add a rule to your firewall:
sudo ipfw add deny tcp from (user) to any 3689
This blocks connections from that user to your iTunes sharing port. If anyone has further ideas or wants to wrap this into a pretty app, I'd love to see it!
PS: Note that sharing your library with strangers may violate the iTunes EULA; it may or may not fall under the "personal use" that you "click agree" to when you turn on the sharing feature. Share at your own risk.
I keep all my MP3 files on a Windows machine that houses a 120GB drive. With the release of iTunes4, I wanted to try out the Rendezvous sharing. So I added them to the library (with iTunes NOT copying locally), and all was good. The biq question was what would happen when I didn't have the PC drive mounted?
The iTunes mounts it automatically! That's right. I go to play a song in the library and I get prompted to authenticate. I imagine if I stored this in my keychain I wouldn't even get that. Neat little trick. May have been in iTunes3 and older, but I never tried. Just thought I'd share my experience.
[robg adds: I believe this is a feature of the file manager more than iTunes itself, but I may be wrong...]
I have never had a problem with Samba and networking. The only thing that irritated me was when in Windows, my laptop would be seen as "Samba 2.2.3a (build 26) iBook (IBOOK)." This is long and silly. I wanted for it to just say the name of the computer. After reading a few other hints on Samba, I got started. I figured the clue would be in the /etc/smb.conf file (which it is). The first step is to back up the conf file. In terminal type:
% sudo cp /etc/smb.conf /etc/smb.conf.bak
Second Step. Edit it. Open it up and you'll find there are a few categories each in [brackets]. The first one is called "global." This contains all the settings for Samba in general. The default is this:
Note that there maybe an extra line if you have changed the name of the workgroup. After encrypt passwords = yes, simply add another line which says server string = %h - this will mean (after saving and restarting Samba) that Windows will just see your Samba server by the name of the computer. Alternativley, replace the %h with any text you like and that will be the name of the server.
By the way, Windows XP lists the computers by the name, and then the address in brackets afterwards. So now my iBook in windows looks like iBook (Ibook). Still, it doesn't confuse the people on my network that doesn't know who Samba is anymore!
Although not advertised, it is possible to connect your Mac to the Internet through a Bluetooth Access Point. I suppose here the access Point provides PPP LAN access.
0n 10.2.5, use the Bluetooth Serial utility (installed in Utilities folder) to create a new port. Give it a name like "BTAccessPoint" (name is one word). Hit "Outgoing," and pick the desired Bluetooth access point by clicking on the "Select Device" button. Discovering your access point services, select "LAN access using PPP." Note: to be able to discover the access point, make sure the access point is properly set up, and that, in particular, it does not filter out your MAC address...
Select the "Show in Network Preference" option, and eventually other encryption or authentification settings your Access Point may require (not tested with that option on on my setup).
Select RS232 on Port type. Close the setup window. Now the newly created port should show up in the port list (with BT AP name) and be selected. Quit BT serial port utility.
Go into Network preferences. On opening, it should show a newly detected port (BTAccessPoint). The TCP-IP tab should be set to "Using PPP." On the PPP tab, leave the phone number blank. Eventually fill in username and password info if your Access Point PPP settings require them. On the Modem tab, select "Null Modem 115200" modem profile.
You are done! Make sure this nework port is *before* other eventual network interfaces, since this order is the load order. Select the port in Internet access app (or menu), hit connect, and there you go! Good luck.
[robg adds: I haven't tested this one, as I have no Bluetooth enabled phones.]
Finally I can print from Acrobat to my PostScript printer connected to my Linux file server. I was always wondering why certain applications could, and yet others could not, print. Among those that couldn't were Photoshop and Acrobat - very annoying!
This nice page resolved all trouble by exchanging a small part of CUPS 1.15 with the latest 1.2 updates (yes, an uninstaller is included!). Thanks a lot to the author!
[robg adds: There was a previous hint that discussed other issues related to Linux printers...]
I just created a tutorial on setting up Mac OS X to print to the "Windows only" print server attached to the D-Link 713P home router/access point. The D-Link contains a parallel port and serial port which can be used for a printer and a modem, respectively.
I tell ya, there is nothing like being able to create a print job from the living room and picking it up in the computer room.