Mac OSX: Linux in a fancy tuxedo!

Archives Forums/MacOS X Discussion/Mac OSX: Linux in a fancy tuxedo!

Russell(Posted 2011) [#1]
So, my brother, who has been on mac for over twenty years, has been trying to get me to "convert". I've always admired mac because of it's attitude and style (and because it is the closest thing to the Amiga since it died).

Anyway, I thought, what the heck, I have VirtualBox here and have successfully installed WIndows XP Professional (from my own legal CD) and Ubuntu 10.10 (which is, of course, free) and wondered how much of a pain it would be to install Mac OSX 10.6.2 (from my brother's DVD) on it as well.

I won't go into the gyrations I had to go through to get it installed, but there it is! I like it, overall, and it seems quite stable.

Works good, with sound and everything (I can even watch youtube videos through Safari and Firefox with sound with no problems - albeit maybe slightly slower than my host PC (2.6Ghz quadcore Windows 7 64bit).

After also installing Xcode 3 most things compile fine. But I found a few of the examples from the help, such as the example for CreateImage.bmx that gives the error
Unhandled Exception:Unable to create GL Context
2011-03-17 08:48:10.486 .CreateImage.debug[5606:60b] invalid pixel format
2011-03-17 08:48:10.502 .CreateImage.debug[5606:60b] invalid context

And none of the sound examples seem to work (although there is no error message given).

I assumed OpenGL is part of the OS (I can't imagine that it isn't). As for the sound, it may be a quirk of VirtualBox, although sound seems to work fine otherwise.

Any ideas? Does it need to be directed to use OpenAL or something similar?

Russell


xlsior(Posted 2011) [#2]
If you are emulating OSX in a virtual machine:

1) You don't have 3D hardware acceleration, which means you'll see OpenGL errors. It may work in windowed mode (not full screen), but at a horribly slow pace
2) OSX doesn't have drivers for the ancient sound hardware that the virtual machines emulate. Just because you have a super duper ultra-standard compatible card, doesn't mean that the virtual bhox sees it that way. It has a crappy 15-year old basic soundcard, which in all likelyhood isn't suypported by OSX.


ima747(Posted 2011) [#3]
All visuals in OS X *should* be being accelerated by OpenGL, it's really the core of the visual systems for OS X. However if you're hardware (in this case virtual) isn't properly supported (why would it be, it's virtual and not made by apple...) then it may be doing software rendering for the 2D, and then giving up entirely on the 3D. The errors you're getting there seem to indicate a true opengl context is not able to be created (this would be caused by the drivers failing to do everything they should) and falls in line with the virtual hardware failure concept. dito for audio. Apple only supports OS X for mac hardware so anything with an Apple Computer Inc. logo stamped on it is 100% unsupported and by extension you'll need to rely on some hardware community (such as the hackintosh community that finds ways to cram OS X into standard PC systems) to get drivers, and by extension functionality.

If you've got a link to a guide or whatever you used to get it working in a virtual box at all I'd love to take a peak for testing purposes (it's always nice to have more OS revisions etc. available without having to buy a stack of flash drives to boot from...)


Russell(Posted 2011) [#4]
Well, it looks like I spoke to soon... I tried downloading quite a few free games for MacOSX and only one of them actually worked, correctly, with sound. (And it ran quite slow). So, I guess I'll just have to save my money for a Mac Mini.

Considering all I had to go through just to get the OSX 10.6.2 installed and working on Virtual Box, I'm surprised anything works at all!

Still fun to play with, though!

One quick question (well, two) about the OS:
1) How come when I click the red circle in the upper left hand corner, the application doesn't always 'completely' quit (I can still see the mini spotlight under the icon on the dock)?
2) To remove an application, all I have to do is delete its folder/program files, right? (There is no 'Install/Remove Programs' program, correct?)

Thanks
Russell


Brucey(Posted 2011) [#5]
How come when I click the red circle in the upper left hand corner, the application doesn't always 'completely' quit

It depends on the type of application. If it a document-based type of app, it tends to stay running when you "close the document window". Generally, if you want to quit an app you press command-Q (or do it through the menu).

Mac OSX: Linux in a fancy tuxedo

More like, UNIX in a fancy tuxedo. It is BSD-based, Unix 3 certified.

Last edited 2011


Yasha(Posted 2011) [#6]
I just did the same thing today! (edit: using the instructions here with a purchased DVD.) In the hopes I could port things to Mac without too much difficulty. Sad to hear that may not be the case.

Performance is terrible here (10.6.3 guest on top of XP), but that's probably because I'm using an old laptop (although that said, Ubuntu 10.10 in VMware isn't perceptibly slower than Windows). By terrible I mean YouTube locks up the entire VM for a minute or so as I desperately try to close the browser, and if anything complicated is going on (so far the only "complicated" thing I've done is install Xcode) there's a delay of a few seconds between typing and text appearing.

Also sound didn't work out of the box.

EDIT: And I'm rapidly concluding that this was a bad idea. Even with more resources allocated it's incredibly sluggish (which is damaging my appreciation of the interface), buggy, and crashes too often for my liking. Time to try a "real" installation and hope that's faster/more stable.

EDIT 2: After applying every speed optimisation Google could find, it's actually just about fast enough to use and is quite fun. Still not as fast (and therefore pleasant) as Ubuntu, but liveable. I would give a real Mac the benefit of the doubt after this experience.

Last edited 2011


D4NM4N(Posted 2011) [#7]
You are not far off both Linux and OSX are based on unix.


GfK(Posted 2011) [#8]
Linux is John Merrick, compared to OSX.


ima747(Posted 2011) [#9]
Linux runs a kernel modeled after UNIX but developed independently, OS X runs a BSD based true unix kernel (though it is modified etc.). In the real world there's not much difference but to some it's all the difference in the world :0) Basically linux is very much LIKE UNIX (like windows 7 is LIKE windows XP, totally different guts that do almost the same thing in almost the same way), where as OS X is more akin to a unix distribution, see the Darwin for more info on the Unixy under pinnings of OS X.

I think of OS X as actually a bespoke OS running on top of a UNIX system. As such with a mac running OS X you can run Unix (and by extension most linux) software, X11, OS X, Mac OS 9 and under all natively in one space. Add on virtualization software line Parallels, or unix/linuxy compatibility layers like Wine and you can run windows software in the same space. And should you hit a compatibility issue there then reboot to running windows natively via BootCamp...

When you close a window on a mac you're closing a window. Some programs elect to close themselves when there are no more windows open (such as iPhoto and other single interface applications) but by OS standards a window and the application are independent (which is why the menu bar is not attached to the window, you can use the menus to do other things, like open a NEW window after closing all the existing windows...). Programs that have a dot under them in the dock are currently running wether you see any windows or not. It's often confusing for people coming from windows where if you don't see it then it doesn't exist for all intents, but it allows for a much more dynamic OS experience, such as your mail program can run in the background checking mail without having to take up any screen space (or be custom coded to support minimizing to the tray etc...). It also is in keeping with Mac's multitasking philosophy of multiple things being not just run but USED at once. This is why mac windows don't typically maximize to cover the WHOLE screen blocking you from doing anything else, they will generally leave space so you can work with things behind other things. Your screen size will often determine if this is a good or bad idea (lots of windows on a small screen turn into a mess pretty quickly, however on large or multiple screens you can effectively run multiple programs with multiple open windows at once without having to "switch" like you generally do on windows since everything wants to be full screen...).

There is no standard install/remove. Generally speaking an application on mac is supposed to contain all it's resources etc. within the application file itself (which is actually a folder disguised as an executable...) so that it's easy to move, store, sort, etc. without breaking anything. This doesn't always happen, usually because the software is related to a PC variant where that's not possible so to simplify they keep the same structure so there's a parent folde (*cough* adobe). Programs that do that kind of thing or stash stuff in other places (usually somewhere under the /library folder) generally come with an uninstaller script that removes the stuff they bury around your computer. But since there's no registry it's all just files, so even if it leaves something behind without a program to access that something it just sits there passively. It's much more WYSIWYG than windows. if it's deleted it's gone, no dll's and registry entries scattered everywhere. As a result over time it doesn't build up crud that needs to be cleaned out or else it has an effect.


D4NM4N(Posted 2011) [#10]
Yep the OSX gui bit is more comparable to Xwindows (as in it runs on top of an OS) than comparing it to Unix or Linux in that sense.

Well i have been using OSX for one week on my new shiny Macbook pro i7 thingy and to be honest it is.. well it is alright. The hardware in this thing is awesome though!!!.... but I am going to install Ubuntu on it too for primary use because i can simply use it faster and much more efficiently.. I only really need osx for xcode.
So i must love John Merrick whoever that is :D

Last edited 2011


ima747(Posted 2011) [#11]
http://en.wikipedia.org/wiki/Joseph_Merrick

Linux is a bit of an "elephant man", vs OS X (which is tightly wrapped up, no bulges and growths etc.)

There are pros and cons to both. Unified and tightly wrapped makes mac very easy to support, driver support for the most part is totally transparent, you can rely on the hardware to be within specific ranges etc. The advantage to the mongrel that is Linux is that since it's all loose ends is significantly easier to dive deeper, make your own drivers, etc. The new high end distros like Ubuntu mask a lot of the rough edges and do a great job of making it feel like a cohesive system (back when I spent a lot of time on linux I spent more time booted to a terminal than to X11, that's VERY reversed now), but it's still pretty rocky under the surface. In this tortured analogy I'd equate windows to a gelatinous blob, it keeps expanding but there's no cohesive structure holding it together. Sometimes it's smooth, sometimes it's bumpy and you won't know which until you dip your hand in (installing printer A might be plug and play, printer B might take 4 hours of tracking down drivers and then adjusting their internal configuration).

There's no best OS, just the best for what you're doing based on your comfort level and usage habits (though I'm obviously quite partial to Macs).


D4NM4N(Posted 2011) [#12]
There's no best OS, just the best for what you're doing based on your comfort level and usage habits
100% agree, i like and hate all of them for quite different reasons. My main dislike about OSX is the whole dock thing (I much prefer a hider menu or even a command line where i can just type "firefox" for example).

Edit: oh yeah and the swedish mac keyboard layout is really odd you need 3 keys to get the {}s :(

Last edited 2011


ima747(Posted 2011) [#13]
The dock still feels to me like a concession to trying to woo windows users with something they can say is kinda like the task bar (which when you play in the windows world is the hub for everything of interest).

You can put the dock on auto hide which makes it much more like "old" mac OS. I shove mine on the right side of the screen, which with 3 screens means way the hell out of my way unless I turn my head :0) Tweaking the scale of the dock helps a lot as well.

There are also plenty of hacks and apps you can use to run things differently but I try to stay within the realm of standard so that I know roughly what normal users will be exposed to.

Mac OS really behaves better and becomes more powerful the more screen space you have, since it encourages you to run lots of things at once anyway. Windows tends to be a bit easier to manage on smaller screens because it tries to limit your focus to 1 or maybe 2 things at a time generally. More screens on windows doesn't tend to help as much simply because it really only wants you running 1 thing at a time anyway, it works but it's not the same level of gain. Conversely a tiny screen is easier since it's not trying to throw as many windows at you at once. I find linux to be a wild card, since the whole UI is totally 100% flexible depending on distro etc. etc. I find it totally unwieldy until I've spent a long time tweaking it just so then it's flawless... until I change something and now I have to re-customize it again... which is why I still prefer the command line (old habits...)


Winni(Posted 2011) [#14]
OS X runs a BSD based true unix kernel


No, it doesn't. OS X runs a BSD user land with a Mach kernel. Which is interesting, because the original Windows NT kernel also used a Mach architecture and design, but Microsoft later withdrew to a more monolithic design for performance reasons. The notorious "beachball of death" is an ominous symptom of the Mach design of the OS X kernel. You won't find that in FreeBSD, which was used as the foundation of the current OS X implementations, but uses a completely different kernel design. (NeXTstep, the technological predecessor of OS X, was based upon the original BSD 4.3 Unix.)


ima747(Posted 2011) [#15]
This is true, Mach is really the core nugget, but there are plenty of bastardizations from there that bring it much closer to a BSD kernel in many ways than a pure mach system. And Mach is a Unix alternative anyway so there are inherent similarities... In either regard it isn't a linux kernel, and is closer in nature to Unix (which is still pretty similar to linux, so it's all just circular unless you're getting down to nuts and bolts), and mach is also closer to unix so it's generally referred to as a unix kernel (more accurately a unix LIKE kernel, or more more accurately a mach micro kernel with BSD elements...). You could call it it's own kernel if you wanted but then you'd be discounting the established tech on which it's based...


D4NM4N(Posted 2011) [#16]
How can i make OSX command line perform like a linux one?
Basically any app in bin/ or usr/bin on a linux system are pathed so i can just type "firefox" for example.

On windows XP i did this with a special script i wrote that makes a bat file for every exe in program files and sticks int in c:/bin/ which i then add to the system path. Although in windows 7 i just use the start menu finder which is just as effective.

Call me a dinosaur but by the time i have searched out a big pretty hieroglyph and clicked on it i might as well just type it. (my dock is already stuffed full of stuff, despite being shrunk and that app menu with the huge icons is getting big too)

Last edited 2011


ima747(Posted 2011) [#17]
bin and usr/bin are system paths on OS X as well, so anything there will execute the same way. The command line is basically the same (the default shell in OS X is Bash, but you can change it to whatever you like, shell scripts work as you'd expect etc. etc.). I think what you're looking for however is a way to launch Mac OS X applications (that is GUI applications) rather than terminal apps via the command line. The "open" command allows you to do that, it's basically the same thing as double clicking something in the finder (documents will open with their targeted application, applications will open their bin, etc.).

Mac Applications are actually folders (with a .app extension and a specific content structure containing the binary and various other resources). You can launch the binary directly from the command line, OR use the open command (which has the effect of opening the application, thus telling the OS to find and launch the binary for you rather than locking the terminal...). A couple examples:

open /Applications/Calculator.app
will tell the OS to open the calculator

/Applications/Calculator.app/Contents/MacOS/Calculator
will launch the binary executable for the calculator directly

cd /Applications/Calculator.app/Contents/MacOS
./Calculator
That will cd into the calculator app's contents (remember it's just a folder) and into the MacOS folder (which holds the MacOS bin) then launch the calculator


Apple set this structure up (roughly) for the following reasons.
Visual programs almost always need assets of some kind. Since everything is in a folder structure you can move the program anywhere you like with ease and without the risk of breaking it by loosing some data file it may need.
Other OS's are free to incorporate the same structure (may have been borrowed from next, I don't recall exactly) with their own binary locations. So in theory one application could run on mac natively on PPC or Intel hardware, have native 32 and 64 bit versions for both, AND have windows, linux, Android, iPhone, etc. versions of the same program and all be contained in one "application". To my knowledge only Apple actually uses this structure, but they do use it for iPhone as well, so it is technically possible to have an iPhone and Mac executable in the same "application", however due to the iPhone distribution methods this is probably never actually done (you could do it with a corporate license rather than an app store license, or for distribution to your signed testers, but those are both beyond niche for a feature that is more geared to mass distribution...).
And for better or worse it allows easy editing or altering of the associated resources, such as the Info.plist file (which declares version information, application icons, other app info and general data). The con is it's pretty easy to go in and futz with stuff (like screwing with an application's version number), on the positive side it makes it easy to go in an FIX stuff (like file associations for blitzmax IDE which is a little messed, or to give bmx files a custom icon...). It's also great for updaters, they can distribute just the files that changes (probably just the binary, but perhaps some data files too, etc.) so you don't need a complicated updater program that can mesh the changes directly, just swap the files you need and ONLY the files you need, yet the whole program is still just 1 cohesive entity rather than a sprawling folder structure to the user.

Last edited 2011


ima747(Posted 2011) [#18]
Another trick for the dock is to use folders in it to create popout tears of things. For example my dock only has the programs I use ALL the time, like mail, safari, xcode, bmax, itunes and iCal. The stuff I use a LOT but not ALL the time I put shortcuts to in a folder called Apps buried in my Library (so the folder itself is out of the way) and then the "Apps" folder is in my dock, I click that and out pops a list of Address Book, Cyberduck, VNC shortcuts to other computers, network drive shortcuts to other computers to mount them quickly but not have to be linked to them all the time etc. Then I have the actual applications folder there as well for when I need to go digging for something I use occasionally, like iPhone, or Google Chrome. I never actually go into the application folder in the finder (except to organize things... I'm a bit anal about keeping misc stuff in my utilities folder, I don't like Applications ending up like Program Files on windows when it's easy to keep it neat and usable).


Corum(Posted 2011) [#19]
A common way to quickly run an application in Mac OSX, is a plain use of the spotlight tool.
I've been using aLaunch since 2008, and I never regretted the choice.
Learn more here.


D4NM4N(Posted 2011) [#20]
thanks for the info


Corum(Posted 2011) [#21]
You're welcome, but I think the incoming Lion will force a dramatic change in our relationships with applications and desktop. :)


D4NM4N(Posted 2011) [#22]
I am quite liking OSX, not quite as much as Ubuntu but its a lot better than windows and "nix-y" enough for me to get into it quickly. I think my favorite feature is the .app system, great idea, it kind of eliminates the windows registry, "application settings" and on the linux end "/usr/share" and "/etc" in one smooth move.
-although the only downside of this of this is you cannot just run from the terminal without lots of extra pathing, basically i miss the "/usr/bin" system.

cons for me so far though is that many apps do not seem to have a standardised file browser window, the whole dock thing sucks for my particular usage methods (Yep i am a mighty instancer!) and the keyboard is taking some furious getting used to. (although the keyboard thing is more a hardware moan than an OS one)

Aside from that it seems quite smooth and polished.

Last edited 2011

Last edited 2011


Corum(Posted 2011) [#23]
I agree on your point about keyboard usage weirdness.
Coming from Win and Linux and browsing around without the mouse is a sort of mission impossible.
Although I'm a Mac user from several years, yet today I think the Mac OS keyboard operation is totally unfriendly and unintuitive.
A friend of mine dropped his brand new iMac 27" because of the Photoshop shortcuts gaps, compared to his previous windows version.
He noticed his productivity dropped dramatically, owing to keyboard messy operation.


ima747(Posted 2011) [#24]
What specific problems are you having with the keyboard?
Physical key placement? (any USB keyboard will work so use whatever you like)
F Keys being misc functions and not F keys? (you can toggle this under the keyboard settings in system prefs)
Using command instead of control? (you can toggle which function each control key actually has to swap them if you like under keyboard settings)
Other?


ima747(Posted 2011) [#25]
regarding lion: they're introducing a LOT of new interface things but they are all (thank god) optional. I see the value for some users, like people just starting out who aren't used to running multiple programs at once (who, are also not likely to be comfortable with the new UI's or possibly not be able to even find them unless someone teaches them...) but for power users it all looks like a step backwards. I know I'm planning on tuning all of the new features to behave just like they do now since seeing less at once reduces my productivity and I don't want my window previews grouped together for the same reasons. The stacking of window previews etc. sounds great if you're coming from say window 7, where you have to hover over the application icon, then hover over the windows, but with my comfort with expose and spaces it just means more clicks and more hovering to get the same thing done slower...

Not pleased about the recent announcement that FTP is being removed from the sharing panel either (not the system mind you, just can't toggle it with 1 GUI click in lion). Yea FTP is dated and has some security flaws but it's just so damn useful when you're trying to share a file with windows and you just can't get windows SMB to either announce or see the network (happens between windows as well, not a mac thing just for the record :0) you can just flip on FTP and get stuff done...


Corum(Posted 2011) [#26]
What specific problems are you having with the keyboard

A quick list, from scenarios I recall at the moment. :P

Browsing filesystem:
Enter: Win/Linux -> run/open file; Mac -> rename file
Del: Win/Linux -> delete file; Mac -> nothing
Backspace: Win/linux -> previous dir; Mac -> nothing

On confirmation dialogs:
Cursor Keys: Win/Linux -> move around choices; Mac -> nothing

On text editing:
Home/End: Win/Linux -> the right reasonable behaviour; Mac -> the weird and messy one. :)


ima747(Posted 2011) [#27]
Aaaah, GUI interaction (mostly). Yea, macs arent designed to be operable without a mouse so those holdovers (useful as they are) didnt make it. There are keyboard shortcuts for defulat dialog actions (escape is cancel, enter is accept, command D takes the open/save dialog to the desktop, etc. I'm sure there's a googleable list somewhere...) but no total interaction replacements (like arrowing around through buttons in a dialog). You may be able to find an application that will do that though, there's nothing stopping it in the os, it's just not there by default.

The file system on the Mac specifically isn't intended to be browsed with the keyboard. But you can do it using command functions. They're far less convenient (because they don't want you to really do that...) but they are listed under the menus so you don't need to know the actions, you can just look for them... Again, more mouse/GUI focused, no history of keyboad usage. And again I would wager there's an application or other hack that adds windows style support, Linux's support is based off trying to replicate a windows like environment since that's what most people are familiar with... There are some GUIs for Linux that in turn try to replicate the Mac, but a tiny disibution platform trying to replicate a small distribution platform rather than a GIANT distribution platform doesn't make a lot of sense most of the time... But the fact they exist is sort of the point of Linux, just do whatever you like, it's all open :0)

Wether that is good, bad or neutral is down to personal habits. We all prefer what we're comfortable with :0) personally I tear my hair out with the arrow keys in a text field on windows. When things are selected pressing right takes you to the beggining... On the left... Because presumably you want to move the cursor that doesn't yet exist to the right, rather than insert it on the right... Both ways are right and wrong, all depends on which you're used to for what's natural.


DrDeath(Posted 2011) [#28]
...but no total interaction replacements (like arrowing around through buttons in a dialog). You may be able to find an application that will do that though, there's nothing stopping it in the os, it's just not there by default.

System Preferences > Keyboard > Keyboard Shortcuts > "Full Keyboard access..." > select the second option.

Voilą.


ima747(Posted 2011) [#29]
God bless all the settings I never use :0)