Slashdot Mirror


Porting Unix Command-Line Tools to Mac OS X

An anonymous reader writes "Over at Apple has posted a technote on porting Unix programs to Mac OS X. Nothing earth-shattering, but nice to see it all collected."

14 of 92 comments (clear)

  1. Re:Makes Mac OS easier to use! by feldsteins · · Score: 4, Insightful

    You seem to think this story represents some kind of "move" that it does not. I'm guessing you're not all that familiar with OS X. Fro example, there is no "hiding" of the command line. There's an application called "Terminal" that, when launched, gives you a standard tcsh command line. It no more "hidden" than their "add a printer" utility.

    I recommend you try OS X sometime. You might like it. At the very least you'll understand a little more than it's a bona fide Unix operating system and hasn't been "dumbed down" as you seem to imply.

    --
    You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
  2. The Point. by jellomizer · · Score: 4, Insightful

    The reason I use OS X is basicly because I have access to the UNIX command-line tools and I can usually easily port them to OS X. OS X has a nice set of application that are comericalially available Like Photoshop (I know the gimp is close but Photoshop works better for me) so I can do my Unix stuff at the command line and have access to some good comerical software. It is like having the best of both worlds. That and sometimes having the ability to pipe information is really good.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  3. Err, it's a BSD system, not a GNU system. by Anonymous Coward · · Score: 4, Insightful

    It used BSD tools, not GNU tools.

    Deal with it.

  4. Re:what's the point? by Matthias+Wiesmann · · Score: 4, Informative
    do you really think they , mac users , will accustom them to m4 , groff , epn etc or anything built upon them?
    Actually, there are many nice OS X applications that are build around unix programs:
    • Texshop is a wrapper around Latex.
    • cocoaspell is a wrapper around the Unix spell checker aspell
    • GPG Mail is a wrapper around the Gnu PGP implementation so that Mail.app can handle PGP.
    Those are just the first that came to my mind, there are many others. The fact that program interfaces are different does not mean that porting applications and components is useless, it simply means that a new interface will be needed.

    The intersting thing is that the service menu is something very Unixish, many command line utilities would make good services. For those that don't know OS X, services are components that take the current selection and apply some treatement on them. There are services that search google, do text transformation, ec...

  5. Unix tools... already ported! by 1155 · · Score: 5, Informative

    Well, if your a unix head, using a mac, and have been under a rock for a long time, here ya go


    http://www.osxgnu.org/ Go here for packages to install.

    http://fink.sf.net Wow, apt-get for os x

    http://finkcommander.sf.net Wow, a gui for fink

    http://www.apple.com/downloads/macosx/apple/x11for macosx.html An x11 server that uses quartz extreme (or whatever you want to call it)


    There are many other things to use, too

    1. Re:Unix tools... already ported! by goon+america · · Score: 4, Informative
      Apple keeps some contributed ports for download here:

      http://www.apple.com/downloads/macosx/unix_open_so urce/

  6. Re:So by Znonymous+Coward · · Score: 4, Insightful

    Then there's no point in paying Apple employees to work on porting the stuff.

    Yes there is, it's called value added software. It wouldn't cost very much to do it. Then maybe more geeks would buy macs.

    And don't tell me that geeks don't like macs. If they didn't, there wouldn't be a apple.slashdot.org

    nuff said

    --

    Karma: The shiznight, mostly because I am the Drizzle.

  7. Re:Makes Mac OS easier to use! by kalidasa · · Score: 4, Interesting

    I believe the AC was trying to poke fun at Microsoft for moving away from command line while at the same time Apple is moving towards it. Compare Windows 98 to XP and OS 9 to OS X.

    I don't. I think the AC doesn't yet know the difference between a command line interface and a command line tool. He'll learn, he's in the right place.

    I'd shy away from making the Win98:WinXP::OS9:OSX analogy, if I were you. Too many lusers will take it too literally./p.

  8. Re:So by Lars+T. · · Score: 4, Funny

    because RMS would demand to put GNU in front of any product they sell. GNU/Mac OS X, GNU/iMac ...

    --

    Lars T.

    To the guy who modded me down from perfect to terrible Karma - Apple haters still suck

  9. Re:So by anothy · · Score: 5, Insightful
    first:
    I have been annoyed on several occassions that the BSD command line utilities Apple provides lacked some feature that the GNU utilities have (I recall just replacing Apple's 'ls' with the GNU equivalent outright).
    then, in the very next sentance:
    At the same time, I don't want to mess with Fink, it introduces complexity.
    and, just to close it up:
    I'd much rather that Apple just installed the GNU stuff by default.
    man! i've got mod points, and i almost moderated this funny, but i wanted to make sure people got it. you don't want extra complexity, but you prefer the GNU tools to the BSD tools? y'er kiddin', right? how on earth can anyone make sense of that? the GNU tools are, on average, dramatically more complicated than the BSD tools. i used to build Linux boxes that dumped the GNU tools in favor of the BSD tools. then i got annoyed with the GNU C library and tried swapping that out. halfway through the project of rebuilding everything so that it didn't have the stupid glibc dependancies, i got fed up and went back to a BSD system - because the tools were so much simpler. Apple made a great decision in using the BSD tools rather than the GNU tools (license questions aside).

    oh, and as a parting kick:
    ...in Linux you can just assemble your system to do what you want.
    right. yup. unless you want it to be a good desktop system.
    --

    i speak for myself and those who like what i say.
  10. Re:what's the point? by jo_ham · · Score: 4, Informative

    I use GPG Mail with Mail.app and it's great, combined with GnuPG for OS X.

    I also use Tiny Fugue in the terminal to connect to a journal community chat server. You need Apple's free Developer Tools to build it though, but it works perfectly.

    I also use NcFTP for all my ftp needs. It used to be included with 10.1.x, but Apple stopped shipping it with 10.2.x, instead favouring the basic BSD ftp, which they improved in Jaguar. I prefer NcFTP though, and had no problems building it from source with the Developer Tools.

    The huge bonus I've found with OS X's terminal is the way it integrates with the "consumer" side of the OS making command line work more conveinent. For example, if I'm not in the mood to drill down into a directory to upload a file in NcFTP I can just drag it onto the terminal after typing "put [space]". I can also command+click links in TF to open them in my browser. These tricks work in the shell too, often handy for perfoming operations on files deeper in directories that I don't want to navigate to by typing them out. (Yes, yes, I'm lazy).

  11. Re:So by WatertonMan · · Score: 4, Insightful
    Those who are able to recognize the difference between GNU versions of the BSD utilities are savvy enough to install the GNU utilities or Fink. If you don't like Fink check out Darwinports which is a different approach to the issue. It sounds more like what you want. A lot of us prefer having all the custom source code in /sw rather than replacing the standard BSD stuff from Apple so that we have access to both.

    DarwinPorts

  12. Re:So by WatertonMan · · Score: 4, Informative
    A lot of porting is done by Apple employees. Just not necessary at Apple's request. This limits how much support Apple has to provide for these opensource projects and also limits their liability if something goes wrong. Quoting from the opendarwin page, "many OpenDarwin members are either Apple employees or Darwin Committers, who have an active interest in merging technologies from OpenDarwin.org into Darwin and Mac OS X releases. With OpenDarwin, project members have greater latitude in producing incremental updates or interim releases of Darwin. The mission of the OpenDarwin project is to innovate and explore new technologies while still remaining relevant, through its informal connection to www.opensource.apple.com, to the mainstream computing environments that Apple provides. It complements Apple's infrastructure by allowing increased participation by the community."

    As to the choice of BSD or GNU standard tools, that's a bit of a personal preference. However since Darwin is based on BSD (with a lot of FreeBSD of late) rather than Linux it shouldn't be surprising that it retains its tools. That is more in keeping with its BSD roots.

    As I mentioned elsewhere if you are savvy enough to recognize the difference in the tools you ought to be savvy enough to build the GNU versions of the tools.

  13. For those who don't like fink... by daveschroeder · · Score: 4, Informative

    At the same time, I don't want to mess with Fink, it introduces complexity. For example, having two sets of binaries in different places doesn't mean you can run shell scripts without changing them if they were written expecting one set to be somewhere it isn't.

    DarwinPorts

    DarwinPorts FAQ

    Interview with Jordan Hubbard on DarwinPorts (Slashdot article)