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."
← Back to Stories (view on slashdot.org)
Why don't they just do it their selves and add more value to their "distro"? They could easly take all the popular GNU tools and port them to Darwin. Then we wouldn't need to use fink.
Karma: The shiznight, mostly because I am the Drizzle.
its about time. i figured with the BSD core they would be a lot quicker at it than this.
Especially trying to support some new servers
Either way, this may help the adoption of the Apple into the IT industry a little more.
It'll be interesting to see whether or not they're included into the next release of X.
Get paid to code OSS
stuffing hot grits down my pants while watching *BSD die.
What is this? Retro-trolling? If you're trying to keep up with the latest trolling trends at least make the hot grits stuff you down its pants or something.
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?
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.
It used BSD tools, not GNU tools.
Deal with it.
It hides the command line about as much as a KDE system hides the command line
Open the terminal app and there's a BSD command line/Open Konsole and there's a Linux command line
Login to a console instead of Aqua and there's a command line/Login to a console instead of XFree86 and there's a command line
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.
You seem to be under the mistaken impression that a UNIX OS cannot have useful well written applications or it's not a unix. That kind of false restriction on development is one of the things that's kept unix boxes in the desktop backwaters for decades. OSX has both worlds, and does it quite simply because those worlds are not exclusive. Open up OSX and run a terminal window or console login. hell, run 5 of the things and you're in as geeky a land as any Linux system. On the other hand, run Safari, Office v.X, Dreamweaver, Photoshop and Pro Tools if you like - and there's your polished slick app land.
There is nothing whatsoever preventing you from doing both if you need, or even mixing further. My OSX runs OSX only apps (in Aqua), fink apps including GNU commandline utils, KDE, Gnome and macos Classic apps, all at the one time. It's the most flexible mix I've ever used in 20 years of my computing experience.
- 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...
Well, if your a unix head, using a mac, and have been under a rock for a long time, here ya go
r macosx.html An x11 server that uses quartz extreme (or whatever you want to call it)
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/x11fo
There are many other things to use, too
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.
Is that all that's required? I tried replacing getopt include with unistd, among other things to try to get http://prdownloads.sourceforge.net/id3v2/id3v2-0.1 .9.tar.gz to compile on OS X, and it still didn't. I don't have a Mac, this was on a friend's machine, so I don't have the error.
BTW, in order to get id3lib to compile (which id3v2 above depends on) I had to use these flags:
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).
I hate Grammar Nazi's
Well either someone could send it to you or you could try one of the other terminal apps out there. this one looked interesting.
Oh, and dragging something from the Apps folder to the Dock (it's not called "taskbar") results in an shortcut or "alias" of the thing. The original item doesn't get moved when one draggs to the Dock. You must've dragged it somewhere else or otherwise deleted it entirely.
You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
Well that "move" happened a couple of years ago and has nothing to do with the current story then. I guess I just misunderstood because of that disconnect.
You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
DarwinPorts
DarwinPorts FAQ
Interview with Jordan Hubbard on DarwinPorts (Slashdot article)
If you want Unix tools and don't like Apple's, get Yellow Dog Linux and install mac-on-linux. I run my iBook that way and I have instant access to both OS's. No need to reboot to get to the other. OS X runs at near native speeds on top of MOL.
Yeah, this is flamebait, but I have karma to spare! What's with the BSD subsystem and the Mach microkernel then? What's with the terminal? Crawl out from under your rock you troglodyte!
Pooty tweet
It doesn't seem like such a stretch to assume that other architectures are officially not out of the question, with a hedge statement like this one. Very interesting...
DO NOT LEAVE IT IS NOT REAL
In versions of MacOS before OSX, the command line was called MPW - you could download it from here.
Admittedly, installing a development environment is a little overkill to just get a command line, but it would give you one...
Have you noticed that Apple tends to only include highly-polished software? There's a reason they built their own KHTML based browser, rather than just porting Konqueror. They have really high standards for the usability of their software, so any non-command-line tool would need to be entirely redesigned to fit their standards, which introduces a lot of work.
Even for command-line programs, once Apple releases something themselves, they implicitly take responsibility for it. If they start doing half-assed ports, then their whole "it just worked" thing goes down the tubes because if their stuff doesn't work, people will hold it against them. They'd probably have to carefully QA every port they did in extensive detail, and that would be expensive. Then there's technical support, maintaining the ports, etc.
There's lots of stuff I'd like to see built into darwin, but I can understand why it isn't really their priority. As has been pointed out, most people who need additional command-line tools can get them themselves and I think apple would rather put their energy into making the tools they do have easier to use by building helpful GUI front-ends for those of us who either don't know how to use unix well, or just find it a lot less enjoyable.
I really like running KDE on OSX. They work pretty well together, provided you've got the dock set on "autohide". With fink and KDE, I get everything I could ever want from Linux, everything I need from OSX, nothing runs in emulation, and I only have a single kernel. I think it's a pretty good solution.
Mac OS X is still PPC only, of course.
Not to moderators: It's a Joke. Laugh.
I am TheRaven on Soylent News
BSD: GNU:
"Wise men talk because they have something to say; fools, because they have to say something" - Plato
eek! You're right! I installed OS X 30 days ago and now it's telling me I have to phone Apple, long distance, to "activate" it or somethingwith my Social Security Number, my passport details, my dna, the rights to my first born child and two side orders of onion rings.
I need to write my term paper and I'm like, bummer, they're engaged.
OS X is not a Unix like cigarettes don't cause cancer.
Sure the top layers are proprietary, but the Darwin level is all open source. Hell, you can download it from Apple's site and install it yourself.
Or install OS X itself and compile all those useful tools designed for BSD-style unix OSes.
They keep the top levels closed for a reason - to make money, and to ensure that the overall feel of the system stays the same.
For school, I have to use sftp and I recently discovered Fugu, which is an open-source frontend for it. It's by far the best ftp program I've ever used. So simple, yet so effective.
Open Konsole and there's a Linux command line
Every time I open Konsole I get a FreeBSD command line instead. Maybe I should log this as a bug to Redhat so they can fix it for me.
A Government Is a Body of People, Usually Notably Ungoverned
I use these regularly, both on my main machine and on the router/firewall/server machine with dual ethernet ports and so forth. Never seen a seg fault.
Perhaps you have an UNUSUAL problem and haven't bothered to report it to Apple, and therefore they haven't seen it?
Sheesh.
-fred
Sign #11 of Slashdot overdose: You see the phrase 'moderate Republican' and you wonder if that would be a +1 or a -1.
What about versions 1 through 9? I had a Mac during one of these versions, and could not even find the command line.
There wasn't one. Mac OS and Mac OS X are two fundamentally different operating systems. They are not comparable in such terms. Mac OS X is NeXT (which has a BSD core), with the Mac OS API tacked on.
I wasn't saying that OS-X was dumbed down this way. I was saying that the more they can do to improve the CLI the better, to play "catch up".
I run Slash, a very complex POSIX-heavy system, on Mac OS X with no problems. I run command-line tools on my Mac as easily than I do on my Linux or Solaris box. Saying they need to "catch up" shows you don't know what you're talking about.
I think my Terminal application is lost. I "moved" it from the Applications folder to the taskbar so that it would be easier to access, then it got in the way, so I moved it to the trash. However, I didn't realise that it was the real application, and not a link, so now that I've emptied the trash, I don't have a terminal anymore
That does not happen. Dragging something to the Dock and then to the Trash does not delete it. It never has.
Yeah, "proprietary" has not one thing to do with whether or not something is "Unix." Being Unix has to do with only two things: being compliant with the interface, and paying the trademark holders a certain amount of money. Apple has the former and not the latter. Suits me just fine.
Yep, I guess that shows how well I know OS X. I guess I moved it to the desktop *and* the Dock, and then deleted it from both places eventually.
-Brent