Archive for ‘osx Server’ Category

Sniff the Air on you Mac….

datePosted on 18:51, July 18th, 2008 by Many Ayromlou

If you ever need to scan the airwaves for wireless accesspoints, you might want to try the new AirRadar. Yes, there are other programs out there that do similar things (AirStatz or iStumbler), but AirRadar also supports GROWL which is kinda nice

What’s Keeping You?

datePosted on 18:39, July 18th, 2008 by Many Ayromlou

Have you ever had problems ejecting a disk or emptying your trash under OSX. Did you waste time trying to find the offending program. Well “What’s Keeping Me?” is for you. Just run it the next time you get one of these errors, tell it the name of the file that’s giving you grief and it will return a list of processes that have locked that file. Then you have the option of killing those processes. Nice little free util to add to your collection.

One of the things I don’t really like about OSX Leopard is the fact that everytime you take a screen shot of a window (Command-Shift-4 followed by Spacebar), it put’s a — for us bloggers — not so good looking shadow around the capture. Well not anymore, use the following command to disable the effect:defaults write com.apple.screencapture disable-shadow -bool trueOnce you issue the command, either logout and back in or kill the SystemUIServer using this command:killall SystemUIServerIf later on you decide to add it back in, delete the preference by issuing the following command:defaults delete com.apple.screencapture disable-shadowFollowed by Logout/Login or the killall command from above. Below you can see the before and after.Have fun and happy capturing :-).

Some CLI tunes…..

datePosted on 20:52, June 28th, 2008 by Many Ayromlou

Just when you thought your command line life was getting boring, we discover these happy tunes for your cut/paste pleasure. Just select the entire line, copy it, open a terminal window, paste it followed by Enter and marvel at your Mac. Yeah it’s a OSX thing and works best under 10.5, so if you’ve got Vista/XP/Linux, this might be a good enough reason to do the switcheroo :-).say -v Good oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosay -v Bad oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosascript -e 'say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"'osascript -e 'say "Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm" using "Pipe Organ"'osascript -e 'say "oh This is a silly song silly song silly song this is the silliest song ive ever ever heard So why keep you listening listening listening while you are supposed to work to work to work to work its because i hate my job hate my job hate my job its because i hate my job more than anything else No its because youve no life youve no life youve no life and you better go get one after forwarding this crap" using "cellos"'Who said you can’t have fun on the commandline?

Custom Date Display for OSX

datePosted on 15:55, May 17th, 2008 by Many Ayromlou

Came across this tip today and I thought it might be useful to some of you out there. OSX, as great as it is, has always had this (atleast) one shortcoming for me. The stupid date display in the menubar. Why did they decide to hide the actual date/day of the week is beyond me. Yes, you can go and grab Magical, I know…..But that’s yet another program that needs to be loaded. There is a simpler solution. Follow the steps below and you can prettify your date display too :-).

  1. In System Preferences, open International and go to the Formats tab.
  2. Next to Dates, click the Customize button. Arrange your date in the format you want to appear on your menubar. I just simply grabbed the full format. Select the entire date format and copy it to your clipboard (Cmd+A, Cmd+C). Hit OK.
  3. Now back in the formats screen, hit the Customize button next to Times. Choose the “Medium” format. Make sure you do this to the Medium format, I tried the other ones (Short and Long) and it did not work (at least under Leopard 10.5.2). Paste the date format on your clipboard next to the time format, and hit OK. I pasted mine inside a set of square brackets in front, you can customize the extra characters to your liking.
  4. You should see the changes on your menubar immediately. If you end up with double day of the week display, in System Preferences, go to Date and Time, and uncheck “Show the day of the week.”

Enjoy :-).

One million paid Final Cut Users…..

datePosted on 20:53, May 2nd, 2008 by Many Ayromlou

Wow, Apple must be doing something right. According to research specialist SCRI, in 2007 Apple took 49% of the US professional editing marketing with Avid trailing on just 22%. There were a lot of rumors during NAB this year that Apple was gonna sell of it’s pro-video division to [your-favourite-video-company] (I heard Thomson/GV). At the time, I thought that would be a dumb thing to do and I said so. It turns out Richard Townhill, Apple’s director of marketing for professional video applications agrees with me. In this TVBEurope report Mr. Townhill says:

I can categorically state, on the record, that is not the case,

referring to the FCP unloading rumors. He then went on to say — about the recently released Final Cut Server:

There are a million Final Cut Pro users out there who need good asset management

Clearly Apple sees Final Cut Server as another mass market product, and why not, when you own 49% of the market, the only way to go is UP afterall.

Meet your new Production Assistant…..

datePosted on 11:08, April 8th, 2008 by Many Ayromlou

The long awaited Apple Final Cut Server was released today, ahead of this years NAB show. It’s been a long time coming (more than two years almost), but you can finally have your cake and eat it too. From Apple’s FCS page:

Whether you work in a production boutique or a global news network, you can use Final Cut Server to free up more time for creative work. Final Cut Server can automatically manage thousands of assets, execute dozens of routine production tasks, and keep every member of your team in sync.

The scalable client/server software makes it easy to work the way you want to work, using as many or as few features as you need — whether you’re producing a 30-second spot, the nightly news, a documentary film, or a major motion picture.

Turn on/off remote desktop service remotely….

datePosted on 19:21, March 27th, 2008 by Many Ayromlou

Apples remote desktop service is great and it comes in handy, but what happens when you’re 5000 miles away from your desktop, only to find that remote desktop is turned off. Dooohhhh. Well here is a quick tip to turn the damn thing on and off in a second through a remote ssh connection. To turn on the service, ssh to your machine and issue the following commands:$ cd /Library/Preferences
$ echo -n enabled > com.apple.ScreenSharing.launchd
And once you’re done, you can turn it off by issuing the following through an ssh session:$ cd /Library/Preferences
$ rm com.apple.ScreenSharing.launchd
I’m pretty sure that this only works under Leopard (10.5+), so if you’ve got Tiger you need to look for an alternate way. I don’t have access to a Tiger machine so I can not guarantee that it works or not.

OSX 10.5 Server oddities

datePosted on 12:16, March 26th, 2008 by Many Ayromlou

So after pulling out my (non-existent) hair for the past two days I think I’ve finally figured out how Apple deals with Virtual Web Servers under Leopard. If you go to the Server Admin and look under the Web Service you’ll notice the Sites icon and if you’re like me you assume that since Apple obviously has gone to great lengths to design a unified interface for Admins, that they would give you access to all the basic/intermediate options. NOPE!!!!! Read on and see if you’ve run into any of these problems.

1) First of all, I don’t understand why apple’s webserver (apache) is configured to automagically reroute you to http://www.mysite.com/groups/workgroup when you really just want to get to the index.html in the (so called) document root. Apple assumes that when you type http://www.mysite.com that you really want to go to http://www.mysite.com/groups/workgroup. That is plain dumb. And to make it worst there is no place in the interface to disable (or modify) this. So get out your terminals, we’re gonna do some surgery:

  • Go to /etc/apache2/sites folder and find the appropriate .conf file for your main site. If you only have one site configured, it will most likely be “0000_any_80_.conf” or something similar.
  • Edit the file using your favourite editor (make sure you sudo, so you can modify the file).
  • look for this line toward the end of the file:RedirectMatch temp ^/$ "/groups/workgroup/"
  • Comment the line if you want to get back to regular apache behaviour (ie: no redirect), or modify the part in quotes to Redirect you to the groups page for example.
  • Save the file and restart apache from server manager….DONE!!!!!

2) And while we are on the subject of obscurity, If you want to have multiple virtual hosts with their own blogs/wikis hosted under their individual virtual hostnames, Apple strikes again by hiding the options and only enabling the workgroup services under the “main” webserver address. Here is how you fix that:

  • Make sure your Virtual hosts are working (ie: sitea.domain.com and siteb.domain.com go to two different webpages on the same server). You’ll notice that if you have multiple groups (a and b) then you can not have groupa’s wiki under sitea.domain.com and groupb’s wiki under siteb.domain.com. By default (until you go and manually do the next step described below), all wiki/blog/calendar stuff pretaining to groups is available on the default site (sitea.domain.com in this case).
  • So stop web services from Server Admin
  • Bring up Directory utility and click on groups and choose your specific group (groupb in our case).
  • If you now click the edit button, you’ll notice a server pull down shows up. That’s the secret. Set the server to serverb.domain.com, save, close directory tool and restart the web services and you’ll now have individual group services under different virtual host addresses.

Hope this helps…..The above 2 problems are discussed (not in great detail) under the following two Apple Support Discussions:

1) Always goes to the wiki page
2) Wiki – No group with that name hosted on this server?

Secure remote backups using Rsync…..

datePosted on 13:36, March 19th, 2008 by Many Ayromlou

While the world was busy trying to figure out how to sync their palm pilots to Windows 98 (or was it 95) Andrew Tridgell was working on his thesis……Rsync. The endall-beall in the world of syncing. You see, if you’ve ever tried any syncing program before you’ll appreciate the ease with which rsync works. You’ll also see the efficiency of it’s algorithm in dealing with changes/updates, and for that you can thank Andrew. I’m just gonna show you how to use this excellent tool along with ssh (another must have/must use free software utility) to setup automated secure backups between two different platforms.

For the purpose of this article I’m using a PowerMac G5 with a 1TB Firewire disk hanging off it as my backup server. As my client I’m using the departmental research server (yes, forget that it’s a server, in this exercise it’s a CLIENT).

So first we need to make sure we have the tools: ssh and rsync. They are already part of my distribution (SuSE Linux 10.1 on the client and OSX 10.5.1 on the server) so I didn’t have to install anything. You want to make sure that your rsync uses protocol version 2.x.x on both sides. (type: rsync –version on your machines to see the protocol version).

Note: You can also grab RsyncX for older OSX versions and/or cwRsync for windows.

Step 1. Is to remove the interactivity that happens during an ssh session (ie: password prompt). To do this we must generate passphraseless keys that we can initially manually exchange between our machines. So in our case we want to grant access to our client machine — via ssh — from the server. Now here is were things get a bit OS specific. Under OSX there is no root account (atleast not one you can log into) by default. In my setup I want to allow root@server.domain.ca (OSX machine) to have access to root@client.domain.ca (Linux machine), so here is what I had to do.

On the OSX machine (server or machine initiating the rsync session) login as the standard user/admin and issue the following commands:
$ sudo su - (you'll be asked for your password and then be in a root shell....be careful).
# cd ~ (this is just to make sure we're in root's home directory which is /var/root under OSX).
# ssh-keygen -t dsa -b 1024 (do NOT put in a passphrase when prompted....just press Enter).
Generating public/private dsa key pair.
Enter file in which to save the key (/var/root/.ssh/id_dsa):
Created directory '/var/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/root/.ssh/id_dsa.
Your public key has been saved in /var/root/.ssh/id_dsa.pub.
The key fingerprint is:
03:cc:52:7a:ed:ae:bf:53:48:9c:dd:45:c7:a9:bd:f1 root@server.domain.ca

Make sure you don’t enter a passphrase when prompted (remember we want a automated operation here). If everything goes right you should have two new files in your .ssh directory named id_dsa (your private key….don’t ever give this to anyone) and id_dsa.pub (your public key which we are going to use).

Now you need to transfer the id_dsa.pub key file to your client somehow. I do this just using ssh again. If you want to be totally super secure you can stick it on a usb key and walk it over to your client machine. So still on the server (OSX) machine I do the following (still in roots account, so be careful):
# scp ~/.ssh/id_dsa.pub root@client.domain.ca:/root/.ssh/authorized_keys
# ssh client.domain.ca -l root "chmod 600 ~/.ssh/authorized_keys"

So the first command transfers id_dsa.pub from the server and copies it to the root’s .ssh directory on the client (and renames it to authorized_keys). The second command issues a remote chmod command to set the right permissions on the authorized_keys file on the client (Linux box).

Now, to verify, while still logged into root on the server (OSX) try to ssh to your client machine (using root’s account on client). If everything works you should be able to log into root’s account on the client (Linux machine) without a password prompt. If you’re prompted for password, stop here, and redo/recheck your procedure.

Step 2. Pheew…..You made it, that was the hard part….the rest is pretty simple. Now we just need to test to make sure things are running smoothly and once that’s done we can automate everything using a cron job (Step 3.). So lets start our test run. For this I’ve chosen to backup the /etc directory on the server (lots of small files, nothing earth shattering) and my chosen path on the server is /Volumes/TERADISK. This is where OSX mounts my firewire drive (your milage may vary). I’ve created a folder on TERADISK called FULLBACKUP, which I use to have rsync house my backups. So to test issue the following command as root (yes still, so be carefull) on the server:
# /usr/bin/rsync -a -v -z -e ssh "root@client.domain.ca:/etc/" /Volumes/TERADISK/FULLBACKUP/etc
Notice I use /usr/bin to make sure I’m running the kosher version of rsync under OSX Leopard (I have an older rsync in /usr/local/bin that rsyncX installed). Now a word about slashes in rsync. Note that I follow the first /etc with a slash, but not the second occurrence. That’s because I’m telling rsync to grab the files INSIDE /etc on the client (hence the extra / at the end) and sync them to files in /Volumes/TERADISK/FULLBACKUP/etc existing directory on the server (hence the missing / at the end). You can think of a trailing / on a source as meaning “copy the contents of this directory” as opposed to “copy the directory by name”. So hopefully this command worked for you and after a few minutes you have a copy of the /etc directory on the server. If not please stop and review your steps. Do NOT do Step 3. unless Steps 1&2 are verified and working.

Step 3. Well we’ve reached the end. All you have to do now is to use crontab -e command while still logged in as root on the server to add rsync entries for folders you want synced between the client and the server. Note that I do NOT backup absolutely everything off the client, only specific folders (and their subfolders ofcourse). I’m pretty sure that rsync will get confused if you try to sync things like your dev directory from the linux client. In my cron I have the following:
0 4 * * 6 /usr/local/bin/rsyncmanu.sh
Which runs the rsync shell script on the server (as root) every saturday at 4:00 am.

That’s it. Hopefully this has been useful…..

12345678PreviousNext