Archive for ‘osx Server’ Category

Movist…..will it be the next VLC for mac….

datePosted on 13:51, February 5th, 2010 by Many Ayromlou

The answer to that is maybe, we’ll see. But all that aside if you’re interested in a minimalistic video player that can handle more codecs than VLC and is generally faster then give Movist a try.

The unique thing about the player is that it allows you to switch codec engines between ffmpeg and quicktime based on file extensions. Oh and did I say it’s FREE aswell :-).

._ resource fork files don’t work properly in OSX 10.6 Samba……

datePosted on 23:36, January 29th, 2010 by Many Ayromlou

Well the title is a bit misleading… are the details. I found out that if you have a NTFS native shared directory on your server, everything works fine as long as you’re using OSX 10.5 (Leopard) or below as a client. You can move files from Leopard and/or Tiger clients to the share and as long as you don’t mind the ._ files everything works.

Well something new has been introduced in Snow Leopard that kinda breaks this. If you have a Snow Leopard client machine accessing a NTFS native shared directory (via smb), by default the shares are mounted with the new xattr (Extended Attribute) feature, instead of those “old” ._ files. This messes everything up if you’re in a mixed environment with 10.4, 10.5, and 10.6 clients all accessing files in a NTFS native smb share.

Snow Leopards version of samba will read those old resource fork files, but files uploaded or modified by the Snow Leopard client will be unrecognizable by the older samba clients (10.5-) as far as the resource fork goes. This introduces some problems with programs that use the resource fork to store information.

All this headache is related to the ‘NTFS Streams’ feature of SMB mounts, so if we disable that, everything goes back to normal. To do this you have to create a file named /etc/nsmb.conf on all your 10.6 clients with the following contents:


Hiding Files and Folders in OSX Finder…..

datePosted on 20:52, January 29th, 2010 by Many Ayromlou

If you ever have a need to simply hide extraneous files and/or folder entries in Finder you can use the following command:
chflags hidden ~/Movies
This example will hide the “Movies” folder from showing up in Finder. There is a easy way to get to the folder if you decide to later on, just go to Finder’s “Go to Folder” menu option. If you want to reset this option you can use the following command:
chflags nohidden ~/Movies
If you want to check a file or folder for hidden files you can issue the following command:
ls -lO

Elgato turbo.264 HD video encoding coprocessor review…….

datePosted on 18:00, January 15th, 2010 by Many Ayromlou

I just picked one of these babies up from the apple store and after testing it a bit for the past hour, I have one word for it: WOW. This little guy is no gimmick, it’s zippy as hell and it does exactly what they say it would. The details for the device are on Elgato’s Website, but this is just a mini review of the tests I ran against a couple of software encoders.

Here is my setup:

– Mac OSX 10.5.8 with latest updates running on a 2.16Ghz Intel Core 2 Duo Black MacBook w/ 2 GB 667Mhz DDR2 SDRAM.
– Test input file was a HD movie I grabbed from vimeo through BT. It’s 12.5 minutes in lenght.

– Output was done through the Elgato Turbo stick, Mpeg Streamclip encoder and ffmpegX.

– In all cases I’ve tried to produce a single pass h264/x264 file with the same dimensions and settings as the Elgato software preset for ipod best (640×360 @ 24 fps @ 1500 kbps at 80-90% quality).

The results blew my mind:

  • Elgato Turbo took 8:43 min to encode the 12:29 min movie.
  • Mpeg Streamclip took 50:25 min to encode the 12:29 min movie.
  • ffmpegX took 49:52 min to encode the entire 12:29 min movie.

Here are a couple of full size frames (640×360 px) blown up to 1920×1200 to exaggerate imperfections (click on the pics to see them full size):
– Elgato Turbo stick

– Mpeg Streamclip

– ffmpegX

– And last but not least all three at the original size (left to right): Elgato Turbo Stick, Mpeg Streamclip, ffmpegX

Best C$179 I’ve spent in a while. It just works.

Let’s be clear on this, Wine, which is what WineBottler uses, lets you run Windows software on other operating systems. With Wine, you can install and run these applications just like you would in Windows without the need for a emulator or virtual machine. Not every program works yet, however there are already several million people using Wine to run their software.

WineBottler makes it really simple to create a application bundle out of Windows programs that will run on OSX. WineBottler is a tool similar to codeweavers Crossover, where separate prefixes — like runtime environments — are created per app. However, WineBottler ‘wraps’ or ‘bottles’ a separate prefix in each application bundle. WineBottler allows standalone (i.e. not requiring wine to be installed) applications to be created as well, by including the wine bundle inside the standalone application bundle.

Additionally unlike Wine which installs files in “standard” unix directories (/opt, /usr/local, etc.), WineBottler has two OSX application bundles that you copy to your Application directory. Very clean install/uninstall. Oh and did I mention that it’s free/opensource. The only catch, OSX for Intel only.

Someone must have screwed up something in the freshclam plist as part of the update for Leopard (2009-05). I was getting this error constantly in my system.log which was not only annoying as hell, but also kept clam from downloading new virus definitions. Anyways, here is how you fix it.

  1. use sudo and edit the file /System/Library/LaunchDaemons/org.clamav.freshclam.plist
    sudo vi /System/Library/LaunchDaemons/org.clamav.freshclam.plist
  2. Somewhere in this file you’ll find a block of code like this:
    <string>-c 4</string>
    </array> </code>

    Change it to look like:
    </array> </code>
  3. Then use the following two sudo commands to reload the freshclam service.
    sudo launchctl unload /System/Library/LaunchDaemons/org.clamav.freshclam.plist
    sudo launchctl load /System/Library/LaunchDaemons/org.clamav.freshclam.plist

I’ve been using Synergy for about 3 years now and never really thought about writing about it. Tonight I came across Synergy+ which is a maintenance fork of the original Synergy. So I thought about writing a small note about it since it’s now maintained again.

Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It’s intended for users with multiple computers, where each system uses its own display. It’s a little like having a 2nd or a 3rd desktop. It’s not a KVM or VNC tool, but it does achieve similar results (but with added convenience). No need to press any buttons when you want to change desktops, and your keyboard input goes to the same screen that your mouse cursor is on.

Main features:

  • Move your mouse easily between computers
  • Requires nothing other than existing ethernet
  • Copy and paste between your computers
  • No need to press any buttons (unlike KVM)
  • You can still use multiple monitors on the same computer
  • By using the ScrLock (or “Scroll Lock”) key you can prevent switching from one monitor to another, which is useful for gaming and other full screen applications.

So head over to Synergy+’s home over at Google Code and grab your copy. Synergy+ is free open source software.

Safari 4.0 crashes upon exit under OSX 10.5.7

datePosted on 14:27, June 27th, 2009 by Many Ayromlou

I’ve had this problem ever since Safari 4.0 came out a little while ago. The symptoms are simple, when you close a Safari window it crashes. I reported it the first couple of times to Apple using crash reporter, then I started to look around for a solution, but to no avail. I gave up for a while and used firefox again. Today I got fed up with this and started to debug the issue from command line and finally found the problem.

A little while back I had purchased a QNAP NAS device, which I absolutely love. At the time I was impressed by the fact that it supported both XP and OSX. There is a piece of software you install on your machine called QGET which allows you to pass all sorts of downloading commands to the NAS (so it can download things in the background). This program has a Safari plugin that turned out to be the culprit. The QGET program is actually fine and by itself doesn’t cause any issues. All you need to do is delete QGET plugin folder from /Library/InputManagers and restart your machine…….No more crashes…..yeaaaaa :-)

OSX 10.5: How to create a public share folder…..

datePosted on 12:39, June 11th, 2009 by Many Ayromlou

This problem has been around (I think) ever since the introduction of POSIX permissions. In pre-10.5 versions you could sorta do something like this by changing the default umask on the system, but that was system wide and applied to all folders/files a user created on the entire filesystem…..not nice. The real question is how do you create a directory that is totally public without mucking around with system/user wide settings. A folder that anyone on the system in question can read/write/modify/delete anything anyone else has put in there. A true shared directory with share permission inheritence. We call it “pub” directory at my place of work.

The old trick in OSX (in case someone is interested) was to write a small script that you ran via cron every 5-10 minutes that would “chmod” all the entries in a folder to be open to a specific POSIX group….something like the script below:

find /path/to/shared/directory ! -type l ! -perm -g=w -print0 | while IFS
= read -rd $'\0' filename
echo "*+*+*Permission changing program caught something"
if [ -d "$filename" ]then
chmod g+rwx "$filename"
# echo Directory changed
stat -l "$filename"
if [ -f "$filename" ]then
chmod g+rw "$filename"
# echo File changed
stat -l "$filename"

Well those were the old days and now with the help of ACL’s we can do this a lot nicer/cleaner. The procedure below is for OSX 10.5+ (it should also work on 10.4, although I haven’t tried it).

  1. Enable ACL’s on your computer. Type the following command in a Terminal window: sudo /usr/sbin/fsaclctl -p / -e and verify that ACL’s are now enabled by typing: sudo fsaclctl -p /
  2. Create a new group. The easiest way to do this is through the Accounts pane in System Preferences. Just click on the Plus sign to add a new account and then select Group from the New Account drop-down menu. Call this group anything you want; I called mine public. Add all the users who you want to participate in the file sharing to your newly-created group.
  3. Do the following steps in Terminal, in Applications -> Utilities:
  4. Change directory to /Users/Shared: cd /Users/Shared
  5. Create a new folder where the users will be able to share their files. I created a folder named Pub by typing mkdir Pub
  6. Change the group of the new folder to your newly-created group: sudo chown admin:public Pub
  7. Change the default permissions, if you wish: sudo chmod 770 Pub (this is optional if you’re happy with the default permissions).
  8. Create the ACL entry for the new folder:sudo chmod +a "group:public allow file_inherit,directory_inherit,readattr,readextattr,readsecurity,read,execute,list,search,writeattr,writeextattr,delete,append,write,delete_child,add_file,add_subdirectory" Pub

You now have a true public folder where all members of the group public can read, write and delete files, as well as read, write to and create new sub folders. The ACL rule takes precedence over standard UNIX file permissions and is automatically inherited. It’s this automatic inheritance that is really important.

IMPORTANT: You must copy (hold down Option in Finder prior to dragging), and not merely move, items. This is particularly important with bundles, such as the Aperture library bundle for example. Moving items doesn’t inherit/change the permissions/ACL’s. Copying ensures that the files are actually created in the shared folder, thereby forcing the ACL rules to be inherited. If you have moved files into this directory and the permissions are a bit messed up you can quickly fix that by issuing the following recursive command which will set the ACL’s and POSIX permissions to the “right” ones so that everyone can do anything in that directory:
sudo chmod -R +a "group:public allow file_inherit,directory_inherit,readattr,readextattr,readsecurity,read,execute,list,search,writeattr,writeextattr,delete,append,write,delete_child,add_file,add_subdirectory" /Users/Shared/Pub

OSX 10.5: How to delete user accounts from Command Line….

datePosted on 11:34, June 11th, 2009 by Many Ayromlou

I ran into this problem a little while back and thought I should document it. It’s kinda similar to the “How to get Admin rights in OSX Leopard using single user mode…” document from earlier this year. Here is the procedure:

  1. Boot into single user mode. Hold Command-s at startup.
  2. Check the filesystem: /sbin/fsck -fy
  3. If no remaining errors, mount the filesystem: /sbin/mount -uw /
  4. Start up directory services:launchctl load /System/Library/LaunchDaemons/ that single user mode said to use, but that didn’t work — this did.
  5. Find what groups the user belongs to: dscl . -list /groups GroupMembership | grep username — repeat for each group except for the user’s own group.
  6. Remove the group corresponding to the username: dscl . delete /groups/username (this may not be necessary — you may get an error that the group doesn’t exist; you can ignore it and go on).
  7. Remove the user account: dscl . delete /users/username
  8. At this point, you may wish to remove or archive the user folder in /Users.
  9. You may wish to remove the .AppleSetupDone file in /var/db to cause the Setup Assistant to run when next booted.
  10. All done? Type reboot to reboot the system or shutdown -h now to shut down the system.

Nice and squeaky clean…..