apple

Mac OS command line suckage

Situation: program foobar is running on a Mac OS box and on a Linux box. I verified that using "top" (I'm working in an 80x25 xterm btw). Now the funny part:

Linux:

user@linux$ ps aux | grep foobar
root [...] /usr/sbin/foobar --some-options --more --options --even --more --options

Mac OS:

user@macos$ ps aux | grep foobar

Huh? What's going on? I know the program is running on both boxes! Mind-boggling solution after a long time of swearing and wasting time:

user@macos$ ps auxww | grep foobar
root [...] /usr/sbin/foobar --some-options --more --options --even --more --options

WTF? I mean... WTF??? Mac OS sticks the physical output on the terminal — 80 characters per line — into the pipe (instead of the full content). That's why the grep for "foobar" returns nothing - the "foobar" part is beyond the 80 character mark...

So if I resize my terminal to 20x10, only 20 characters per line would go into the pipe?!? How stupid is that?

Do all BSD-type OSes do that?

Free Software News and Advancements

No, I'm not dead, just very very busy...

There have been quite a few interesting new Free Software projects and news popping up recently (or I only recently noticed them):

Apple Safari executes arbitrary shell scripts without asking you for permission

It seems Apple is having more and more severe problems lately, MacOS viruses and worms start popping up and spreading on a larger scale... Michael Lehn has now discovered that Apple Safari can be tricked into automatically downloading and executing arbitrary shell scripts.

No need to mention what harm this can cause, especially if you are stupid enough to browse the web as root (or whatever Apple calls their superuser).

The behaviour to automatically open downloaded "trusted" files in a respective application is the default in Safari, which is obviously not the brightest idea Apple ever had. This is not an Apple-only problem, though. I really wonder why so many people, be it developers or users, are willing to sacrifice security for some crappy "feature"...

(via Digg)

How to watch videos from your 5g video iPod on TV without buying the Apple video cable [Update]

I stumbled over a very nice article over at MacDevCenter which explains how to use a cheap, standard A/V-to-RCA cable to direct the video output of a 5g video iPod to your TV.

That's sure something I need to try soonish! I was a bit reluctant to buy the not-so-cheap Apple cable. This guide not only saves me some money, but it's also nicer being able to use standard components instead of proprietary stuff...

Update 2006-01-07: I have tested video playback using such a standard cable today and it works fine! The video quality is quite good, too, even at 320x240 (but you can probably also have bigger videos, I guess). Using a cable which only has two connectors (white and red probably) works too, but you only get audio and no video then.

Initial Linux support for the 5g video iPod - video sync using gtkpod / libgpod [Update]

My video iPod

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

OK, so I spent some fun time playing around with my 5g video iPod — time for more serious action now.

I have created two patches today which add support for the video iPod to gtkpod, a GTK+ based, platform independent GUI for Apple's iPod.
These initial patches allow you to sync m4v video files to your iPod and watch them there. I will add support for all other video formats which work on the iPod, soon. The patches will be sent to the gtkpod maintainers, of course, in the hope that they can be included in the next release.

Note: This is pre-alpha, barely-tested code! Use at your own risk!

Installation instructions:

  • Get the current CVS version of libgpod. Apply the following patch: libgpod_5g_video_ipod_support.patch (Update: patch no longer needed). Compile and install libgpod.
  • Get the current CVS version of gtkpod. Apply the following patch: gtkpod_5g_video_ipod_support.patch (Update: patch no longer needed). Compile and install gtkpod.
  • Mount your iPod (USB cable): mount -t vfat /dev/sda2 /mnt/ipod
  • Start gtkpod (possibly as root, depending on your system) . Maybe you need to edit the settings and adjust the mount point for the iPod (/mnt/ipod is the default).
  • Click on the "Read" button to read in the iTunesDB from the iPod, click on "Files" to add a video file (e.g. this Apple commercial from 1977), click on "Sync" to upload the file to your iPod.
  • Quit gtkpod, unmount the iPod (umount /mnt/ipod), disconnect the USB cable.
  • Profit!!!1

I get a "Destroying mmap buffer" error every time I sync the iPod, but that's probably a gtkpod bug, and it's non-fatal anyways.

If you happen to own a video iPod, please test the patches and report whether they work! Thanks!

Update 2005-11-19: The libgpod patch is in CVS now (plus a bug which caused MP3s to appear in the "Movies" list is fixed now, too). So you don't need the libgpod patch anymore! I have updated the gtkpod patch (Update: patch no longer needed.), you should now be able to sync almost any video format (m4v, mp4, mpg, mpeg, avi, mov) to your video iPod.
Update 2005-11-24: The current libgpod/gtkpod CVS now contains all the features of my patches, so they are obsolete from now on.

Syndicate content