Archive for ‘osx Server’ Category

How to mount your Journalized HFS+ disk in Linux….

datePosted on 20:41, May 23rd, 2009 by Many Ayromlou

This is something that people who deal with OSX and Linux come across everyday. Yes you can format your USB stick or removable HD using FAT32. The problem is that FAT32 does not support large sized files which can cause problems. So how do you solve this…..Easy. Attach the Journalized HFS+ disk to your MAC and startup disk utility. Inside disk utility find the disk in question and click on the partition(s) while holding down the “ALT” key. Keep holding the key down and go to the File menu and choose “Disable Journaling” (command-J). Eject the disk, move it over to your linux machine and hook it up. Linux can now read and write to the disk. Once you’re done, move the disk back to the apple machine and after selecting it in disk utility click on “Enable Journaling” button. Done.

Enabling Google Calendar in Apple’s iCal under OSX 10.5+

datePosted on 18:08, May 20th, 2009 by Many Ayromlou

Yep, It works I just transfered all my calendar appointments from local iCal calendar to Google calendar in one easy step. First you need to go into iCal and export your current calendar. If you’re starting fresh with google calendar you don’t need to do this.

To set up CalDAV support for Google Calendar in Apple’s iCal, follow these steps:

  1. Open Apple iCal, go to Preferences and then the Accounts tab.
  2. Click on the + button to add an account.
  3. Under Account Information, enter your Google Account username and password (make sure username does NOT have added).
  4. Under Server Options, add the following URL: (replace ‘youremail’ with your Google Account username and is usually unless you’ve got google apps setup.
  5. Click Add.

Under the Delegation tab, select the calendars you’d like to add to iCal by checking the boxes next to them. You may need to hit refresh to get the latest list of calendars.

Add your email address to your Address Book card by selecting Add Email. You’ll be prompted to add your email address only if your address is not already in your Address Book. You won’t be able to invite or email guests to Google Calendar events within iCal if your address is not in your Address Book.
Your Google Calendar will now appear in iCal’s list of calendars, and changes you make to your Google Calendar in iCal will be reflected when you sign in to Google Calendar.

If you had previously exported existing iCal events from your local (or other remote) machine, you can now select Import from File menu and choose the file and tell iCal to import it into your google calendar (your google calendar will appear as your full registered name in the import destination list).

Writing Moblin (and Ubuntu) USB images using dd in OSX

datePosted on 15:52, May 20th, 2009 by Many Ayromlou

I came across this problem this morning, while writing the newly downloaded moblin USB image file. The concept is straight forward, plugin a 1GB+ USB stick into a functioning Linux or Windows box, make sure the stick is not mounted and use dd to write the disk image to the stick. Under OSX however the instructions for unmounting are slightly different, so here are the quick steps:

  1. Download the desired .img file
  2. Open a Terminal (under Utilities)
  3. Run diskutil list to get the current list of devices
  4. Insert your flash media
  5. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  6. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located.
  8. Run diskutil eject /dev/diskN and remove your flash media when the command completes

That should do it…..

One of the first things you hear a new mac/osx user complain about is the odd way the green “zoom” button works on the upper left hand of windows on Macs. The button behaves differently depending on the app – Finder and Safari sizes to best fit, iTunes’ zoom button switches between the mini player and the normal window, Mail goes full screen. Often times, the behavior differs from one app to another and many Mac users find this behavior inconsistent, unpredictable and disorienting to use.

RightZoom provides a quick and easy solution for the zoom button’s inconsistent behavior. It enables you to make the zoom button maximize the window to full screen when you click the green orb.

By default, RightZoom makes a number of apps blow full screen when hitting the green orb. You can add or remove specific apps if you wish on this white list. But upon a fresh install, here is the list of apps that work with RightZoom :

  • Finder
  • Safari
  • Microsoft Word
  • Microsoft Excel
  • Microsoft PowerPoint
  • Pages
  • Numbers
  • Keynote

You can also blacklist applications you don’t want to change this behavior for (like iTunes). RightZoom is free and distributed by BlazingTools Software .

Just came across tms , what a great tool. It a command line tool for OSX 10.5+ that allows basic CVS style operations on your Time Machine volumes and It does its thing in read-only mode, so nothing gets changed/deleted…..woohooo. Here is the stuff you can do with it:

  • help      – instructions on usage
  • version   – print the current version of this tool
  • disk      – print the current disk
  • disks     – print list of all Time Machine disks
  • volumes   – print list of all volumes
  • machine   – print the current machine
  • machines  – print the list of all machines backed up on the current disk
  • status    – print the current configuration
  • snapshots – print the list of snapshots for the current machine on the current disk
  • snaplog {} – print the log for the given (or latest) snapshot
  • log +     – print revision information for the given files
  • diff [-u] {} {} – print file diff with the given (or latest) snapshot, or between two snapshots
  • delta [-size] {

Go grab your copy NOW.

How to get Admin rights in OSX Leopard using single user mode…

datePosted on 23:11, February 18th, 2009 by Many Ayromlou

Here is a quick way to gain access to that leopard machine you don’t remember the admin password to. Yes I know this can be used by all the kiddies out there, but lets hope they are smarter than that. To start, reboot the machine into single user mode by holding down command-s before the chime (on the white screen with gray apple logo). Once in single user mode you need to mount the HD in read-write mode using the following commands:
/sbin/fsck -fy
/sbin/mount -uw /

Then we need to start the directory services by issuing the following:
launchctl load /System/Library/LaunchDaemons/
First thing we need to do is to create the new userid (I call it newadminusername, you can use whatever you want). It is important to assign the user a Realname (which is the long name under OSX), a UID in 5xx range (I use 599 in this example) and assign the user to group 80 (which is the admin group):
dscl . create /Users/newadminusername
dscl . create /Users/newadminusername RealName “Test Admin User”
dscl . create /Users/newadminusername UniqueID 599
dscl . create /Users/newadminusername PrimaryGroupID 80

Next we need to use the dscl command to make our newadminusername part of the admin group in open directory using the following command:
dscl . append /Groups/admin GroupMembership newadminusername
To check and make sure it worked lets look at the list of users in the admin group using the following command:
dscl . read /Users/newadminusername
and make sure newadminusername is setup correctly.
dscl . read /Groups/admin
and make sure newadminusername is listed as part of this group. The output of the commands on my machine for my test userid “tester” (I chose tester as my “newuseradmin”):
Brain:~ root# dscl . read /Groups/admin
AppleMetaNodeLocation: /Local/Default
GroupMembership: root mayromlou tester
Password: *
PrimaryGroupID: 80
RealName: Administrators
RecordName: admin
RecordType: dsRecTypeStandard:Groups
SMBSID: S-1-5-32-544
Brain:~ root# dscl . read /Users/tester
AppleMetaNodeLocation: /Local/Default
AuthenticationAuthority: ;ShadowHash; ;Kerberosv5;;tester@LKDC:SHA1.532A60C783871C50CE0DAF911171860F528DE20F;LKDC:SHA1.532A60C783871C50CE0DAF911171860F528DE20F;
GeneratedUID: A248AE2D-DCA4-41AF-B3C9-91F96CB42091
Password: ********
PrimaryGroupID: 80
Test User
RecordName: tester
RecordType: dsRecTypeStandard:Users
UniqueID: 599

If everything is good to go reset the users password:
passwd newadminusername
Reboot by typing reboot from the command line. You can now use your newadminusername to login and admin the machine. Once you’ve got access back to the machine through your regular account, you might want to undo all the stuff we have done above (just to keep things neat and tidy). If you decide to do that, reboot into single user mode again by holding down command-s before the chime (on the white screen with gray apple logo). Once in single user mode you need to mount the HD in read-write mode using the following commands:
/sbin/fsck -fy
/sbin/mount -uw /

Then we need to start the directory services by issuing the following:
launchctl load /System/Library/LaunchDaemons/
Then we need to undo all the steps we did above to create the newadminusername ID. That can be done simply by issuing the following commands:
dscl . delete /Groups/admin GroupMembership newadminusername
dscl . delete /Users/newadminusername

That’s it…..You’re done……

Disk for Iphone….Turn your IPhone (IpodTouch) into a portable HD.

datePosted on 13:48, February 13th, 2009 by Many Ayromlou

MacFUSE project has grown a lot since we last covered it here and here. MacFuse 2.0 is here and it’s looking really nice. MacFUSE is the mac implementation of FUSE (File-system in USEr space) filesystem originally developed for Linux. For those of you who’ve not heard of this gem before, MacFUSE allows you to extend Mac OS X’s native file handling capabilities via 3rd-party file systems. Pretty much anything that has some order to it can be turned (viewed as) into a filesystem (ie: sshfs, youtubefs). As a user, installing the MacFUSE software package will let you use any 3rd-party file system written atop MacFUSE.

Disk for iPhone is a MacFUSE based filesystem that allows you to read and write files on your iPhone. It uses the MobileDevice API (like iTunes) to access the filesystem of the iPhone over USB. You need to install MacFuse base system on your machine first and then grab Disk for iPhone module.

I have to admit I have not touched DSS in a while, but the instructions below are generic enough that you should be able to alter it for your Darwin Streaming Server. For the purpose of this exercise I assume your Axis camera is setup for mpeg4 video and aac audio. I also further assume that you have a reachable IP address on the camera and know how to login to the web interface. First thing we want to do is make sure you have the uptodate firmware. As of this writing the newest firmware is 4.40.1. So make sure you have atleast that version as well.

1) We need to login and change the RTSP daemon’s timeout value. If we don’t do this the server will stop sending packets out after 60 seconds (default). To do this you open your browser and type the following command in the browsers Address field:

This will bring up a screen (like above) that will let you edit the file. Find the timeout value (should be 60 by default) and change it to 0 (zero basically means no timeout). Save the file by pressing the “Save file” button.

2) Now power cycle the camera just to make sure the new value is loaded.
3) Once the camera is functional again go to the web interface and make sure you can use LiveView to watch the video and audio.
4) On your Streaming server (QTSS or DSS) setup a relay. I’m including three pictures below from my Quicktime Streaming Server running on OSX Server 10.5.

On the above screen you want to add a Relay by clicking the small + sign on the bottom left. This will enable the streaming server to login to your camera and grab a copy of the stream. The screenshot below shows you how you set it up.

So on the relay screen you give your relay a meaningful name, change the relay type to “Request Incomign Stream” and fill in the rest of the information. The Source IP is the IP address of your camera. The Path is basically what I have there (just copy it). User Name and Password are from the Axis camera interface (you should know this already).

Next you want to setup the destination of your relay. Here is the tricky part (easy, but tricky). Depending on how you setup your destination, the Streaming server will either Reflect or Relay the stream. We want to reflect the stream so we click the + sign on the bottom right and fill it in like the image below.

On this screen it is important that the destination be This will basically tell the server to Relay the output of the Axis camera to itself, effectively reflecting it. Destination type is announced UDP. This will automatically create the SDP file for us. Mount point is simply the name of the SDP file which will describe the stream specifics to our quicktime player (It’s justa text file, see further down). This file will be created automatically on your server under /Library/QuickTimeStreaming/Movies/ which is the default media directory for quicktime streaming server (yours might defer). Username and password are the id and password of a active user on your streaming server that can write to the media directory (/Library/QuickTimeStreaming/Movies/).

So once all this is done, you can use a workstation to launch quicktime and point it at the following URL:rtsp://IP-Address-of-streaming-server:554/axis.sdp
Note that axis.sdp is the name of the file I chose. You might have a different filename specified when you filled in the relay destination fields on the streaming server.

If everything goes right, you should see the output of the Axis camera in quicktime, being streamed (reflected) through your QTSS/DSS server.

UPDATE: Please note that the whole reflecting game will NOT work if youŕe behind a Firewall and/or a NAT (including home routers). If anyone knows of a trick to do this please let us know…..

How to turn Spotlight OFF (and ON Again)….Leopard Solution

datePosted on 20:01, January 14th, 2009 by Many Ayromlou

A number of people mentioned that the previous tip on how to turn spotlight on/off does not work with Leopard. Now that I’ve had a bit of time, I’ve confirmed this and found a way around it (it’s even easier in Leopard). Here are the details specifically for OSX 10.5+ (Leopard).

  • To turn off Spotlight service temporarily
  • % sudo launchctl unload /System/Library/LaunchDaemons/

  • To turn off Spotlight service permanently (no worries, you can turn it on again)
  • % sudo launchctl unload -w /System/Library/LaunchDaemons/

  • To turn on Spotlight service temporarily
  • % sudo launchctl load /System/Library/LaunchDaemons/

  • To turn on Spotlight service permanently
  • % sudo launchctl load -w /System/Library/LaunchDaemons/

Have fun….

Energize your Mac’s Safari browser….

datePosted on 18:48, January 11th, 2009 by Many Ayromlou

If you’ve been wanting some of the newer features of the “other” browsers in Safari, Glims might just be the right thing for you. Glims is a Safari plugin (OSX only) that gives you a lot of new features:

  • Adds thumbnails to search results
  • Adds thumbnails to search results
  • Adds search engines to the default Google search tab
  • Adds full-screen browsing capability
  • Adds Favicons to tab labels
  • Adds keyword search from address bar
  • Undo “Close Tab” (cmd-z)
  • Re-opens last session when Safari starts
  • Auto-Closes download window
  • Focus last selected tab
  • Always open links in a new tab
  • Type-ahead support (auto cmd-f)
  • Sets the focus on the search field when opening a new window
  • Adds Amazon’s information banner on search results
  • Adds Amazon’s information banner on search results
  • Adds a “Max Window Size” menu item to resize the Safari window
  • Forms autocomplete always on
  • Dated download folders

The plugin is still in beta stage, but very usable.