Bloggers and screen shooters: Disable shadow in window screen captures

Blogger, CLI, OSX, osx Server
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 :-).
Read More

Some CLI tunes…..

Apple, CLI, Macintosh, OSX, osx Server
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…
Read More

Twitter from Unix/Linux/OSX command line

CLI, Linux, OSX, Twitter, Unix
Yep, you can. Here is the recipe:1) You need to install "curl" for your OS. OSX comes with it by default which is nice. Most unices out there also have it installed or have it available for download (Ubuntu, Debian users can use "sudo apt-get install curl" to install).2) Edit a text file using your favourite editor and add the following line in there:curl --basic --user "youruserid:yourpassword" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json" -o /dev/null3) Make sure you replace youruserid and yourpassword with appropriate strings.4) Save the file as something like twitter.sh and make it executable by issuing this command:chmod 700 ./twitter.sh5) Twitter away by using the following command line:./twitter.sh "Put your twit in here and press Enter"6) Done.Have fun commandline twittering :-).
Read More

Turn on/off remote desktop service remotely….

Apple, CLI, Leopard, Macintosh, OSX, osx Server
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.launchdAnd once you're done, you can turn it off by issuing the following through an ssh session:$ cd /Library/Preferences$ rm com.apple.ScreenSharing.launchdI'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…
Read More

Secure remote backups using Rsync…..

CLI, Linux, Opensource, OSX, osx Server, rsync, Windows
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…
Read More

Quicktip for Frontrow users (OSX)

Apple, CLI, Macintosh, OSX
I bet you didn't know that Frontrow, Apple's Media Centre software that ships with every Mac, can actually playback those HD trailers from their site. Well here is a quicktip to enable that functionality:defaults write com.apple.frontrow EnableHDMovieTrailers TRUEOnce you type this into terminal, start up Frontrow and note that you get a new option under trailers. To disable this functionality issue the following command from a terminal window:defaults write com.apple.frontrow EnableHDMovieTrailers FALSE
Read More

Twitter….the cool way….

CLI, Linux, OSX, Twitter, Unix, Windows
To be honest, I've had a twitter account for a while, but since I need a browser (or phone) to get access to it and twit, I hadn't used it. But that's about to change (maybe), since I found out how you can twit from command line. Yep, twit away from any UNIX, Linux, OSX (and Windows) Command prompt. Here is how:1) First find the program CURL for your intended platform. It comes built into OSX and most Linux distros and there is a port for windows as well (use google).2) Setup your twitter account.3) Use this command when you want to twit:curl -u yourusername:yourpassword -d status="Your Message Here" http://twitter.com/statuses/update.xmlNow one thing to remember is that the username and pass get added to your shell history, so if you're on…
Read More

Stream your Linux/Windows/Mac Desktop as video using VLC

Apple, CLI, Darwin Streaming Server, Linux, Macintosh, Opensource, OSX, Video, VLC, Windows
A buddy of mine (thanks Mike) showed me this today. There is a input Access module in the newer versions of VLC (0.8.6+) called "screen" which makes this possible. To stream your desktop to another machine (ip address: 192.168.1.2 in this case) just use the following command in Linux (sorry command line only):vlc screen:// :screen-fps=30 :screen-caching=100 --sout '#transcode{vcodec=mp4v,vb=4096,acodec=mpga,ab=256,scale=1,width=1280,height=800}:rtp{dst=192.168.1.2,port=1234,access=udp,mux=ts}'or in Windows (slightly different syntax) use this command:vlc screen:// :screen-fps=30 :screen-caching=100 :sout=#transcode{vcodec=mp4v,vb=2048,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=rtp,mux=ts,dst=192.168.1.1:1234}}This is one massive command, so lets take a look at it in more detail:screen:// is our input module selection (if you just run vlc screen:// you'll see your own screen on the server inside vlc....kinda cool):screen-fps=30 specifies that we want to screengrab at 30 fps (from default 5 fps):screen-caching=100 sets the internal caching to 100ms (from default 300 ms)--sout is…
Read More

How to uninstall almost any application in OSX manually

Apple, CLI, Macintosh, OSX, osx Server
Well, you learn something new everyday. Here is what I picked up today....If you ever install an application that came as a OSX package, there is a good chance that the installer has installed files all over your machine. There is also a good chance that the installer has left you a little gift -- a way out if you like -- in /Library/Receipts folder on your mac.You see, if the author/packager has done their job correctly (most do), there is a Bill Of Material (known as a bom file) that is copied onto your system. In the example below I wanted to check the files that got installed on my machine by the MacFUSE installer so here are the commands I issued:Brainiac:/ mayromlou$ cd /Library/Receipts/MacFUSE\ Core.pkg/Contents/Brainiac:Contents mayromlou$ lsArchive.bom Info.plist…
Read More

Changing DNS hostname on OSX Server

Apple, CLI, Macintosh, osx Server, Sysadmin
If you ever need to check the DNS hostname under OSX server here is the command:$ sudo changeip -checkhostnameIf you need to change it (ie: after a DNS table change) use the following command (for OD sites):changeip /LDAPv3/127.0.0.1/ 192.0.0.12 192.0.0.12 old.example.com new.example.comchangeip also has a lot of other uses (ie: if you change the ip address of your machine you can use changeip to change the setting in the directory as well). Have a look at the man pages for more info.If you're having trouble kerberizing your Open Directory under OSX server then you are also most likely having hostname problems. Run the first command to check the hostname information and make sure "Current Hostname" and "DNS Hostname" in it's output match. If they don't use the second command to…
Read More