Tag Info

Hot answers tagged

38

The whole ABI is different, not just the binary format (Mach-O versus ELF) as sepp2k mentioned. For example, while both Linux and Darwin/XNU (the kernel of OS X) use sc on PowerPC and int 0x80/sysenter/syscall on x86 for syscall entry, there's not much more in common from there on. Darwin directs negative syscall numbers at the Mach microkernel and ...


25

Does Cygwin work like wine? No. Does it provide a compatibility layer inside a foreign OS? Yes. Wine can run Windows executables on Linux, but Cygwin cannot run Linux executables on Windows. Instead, Linux programs have to be compiled specifically for Cygwin, whereby the aim of the Cygwin project is to make that as straightforward as possible, i.e. it's ...


25

Why are there so many "sh compatible" shells? The Bourne shell has been with us since 1977, released as part of Unix V7. Since pretty much every Unix and Unix-like system descends from V7 Unix — even if only spiritually — the Bourne shell has been with us "forever."1 The Bourne shell actually replaced an earlier shell, retronymed the ...


19

The best I have come up with is this "two-line shebang" that really is a polyglot (Bourne shell / Node.js) script: #!/bin/sh ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@" console.log('Hello world!'); The first line is, obviously, a Bourne shell shebang. Node.js bypasses any shebang that it finds, so this is a valid javascript file as ...


18

I'm not sure what issues you're constantly experiencing but I run Gentoo on Lenovo Thinkpad without problems (fingerprint reader does not work) - with possible problems with removal of BKL in recent kernels (however 2.6.33 worked ok). Previously I used IBM Thinkpad. From my small experience with them: Thinkpads seems to have a community which helps ...


14

Why OSX applications won't run natively on linux: First of all OSX uses a different binary format than Linux, so Linux can't execute binaries compiled for OSX (the same way it can't execute binaries compiled for Windows or BSD). Second of all, if you're talking about GUI applications, Apple's GUI toolkit Cocoa a) is only available for OSX and b) does not ...


10

No, not all scripts intended for bash work with dash. A number of 'bashism' will not work in dash, such as C-style for loops and the double-bracket comparison operators. If you have a set of bash scripts that you want to use for dash, you may consider using checkbashisms. This tool will check your script for bash-only features that aren't likely to work in ...


10

You can check on this site: http://www.linux-laptop.net/ You look a lot of laptops and their level of "compatibility" with distributions of GNU/Linux that other user have tested, maybe you can find something that you like there.


8

#!/bin/sh //bin/false || `which node || which nodejs` << `tail -n +2 $0` console.log('ok'); //bin/false is the same thing as /bin/false except that the second slash transforms it into a comment for node, and that's why it's here. Then, the right side of the first || gets evaluated. 'which node || which nodejs' with backquotes instead of quotes ...


8

"sh compatible" refers to POSIX sh, the basic shell that is required to exist on all compatible systems. A sh-compatible script should work on any POSIX-compatible machine. The reason it's necessary to say so is that commonly /bin/sh is a symlink to /bin/bash, which has let some Bashisms slip into scripts that declare themselves to use sh with #!/bin/sh. ...


7

I'd suggest buying one with Linux preinstalled so you know the hardware is compatible. Dell still sells some, though not sure if you can still use the web interface... Rumor has it you have to call now...


7

The short answer is no, they're not 100% compatible. But most the shells are pretty close to the basic, so you would only rarely bump into inconsistencies. In fact, most shells differ not much by added syntax, but by some extra features like tab-completion and similar. Also, dash is sort of a descendant of ash - or port from BSD to linux, to be precise. ...


6

They are not necessarily binary compatible. That being said, most packages will probably work fine. I've done this on occasion and I've never had a problem. Although, it's not recommended to mix Debian and Ubuntu packages on a single system. If you're going to do it try to keep it at a minimum. If you're pulling in too much of the other, then perhaps you ...


6

Very interesting finding. Although I've never used ls -s to check whether a file is empty or not, I would have assumed, that it reports 0 for empty files, too. To your question: As Mat already commented, show them your test results. To explain the results to them, state that ls -s reports the amount of allocated blocks in the filesystem, not the actual size ...


6

I think that /bin/true has to be the oldest working .. Well, can you call a zero-byte file a binary? touch /tmp/old_true chmod 755 /tmp/old_true /tmp/old_true echo $?


5

The problem with notebooks with Linux preinstalled is which distro comes with them. I've bought one which had an unknown distro (Satux) that was Debian-based, but included proprietary drivers and no access to the sources for the distro or drivers. When I finally decided to install Ubuntu over it, I started to have to chase drivers all around the internet, ...


5

My experience is mostly with Dell latitude series of laptops. Looking for Linux compatibility, their actual series is a go, and, on Fedora, they work with all the power saving features (suspend, resume, disk spinning...) I am not biased, but Intel hardware (Centrino brands, Core2 Duo, new Core i3, i5 and i7) are good to go, mostly because all of the ...


5

Don't parse ls if you can help it. Depending on what you're doing, the test utility might be a better alternative. test -r filename will return success if the file is readable with the current user's permissions, and will follow symbolic links automatically. Likewise, -w and -x will tell you if the file is writable or executable. The test command is ...


5

You probably want to run some variant of Darwin, probably PureDarwin, rather than FreeBSD.


4

Unlike most (if not all) other file systems, ZFS doesn't preallocate a static array of inodes. Creating an empty file on ZFS will then use a new block of data which is the one reported by ls -s. I suspect GFS to have to store synchronization/lock data leading to the other non zero result.


4

The C locale is not the default locale. It is a locale that is guaranteed not to cause any “surprising” behavior. A number of commands have output of a guaranteed form (e.g. ps or df headers, date format) in the C or POSIX locale. For encodings (LC_CTYPE), it is guaranteed that [:alpha:] only contains the ASCII letters, and so on. If the C locale was ...


4

Basically this boils down to: you can't keep binary compatibility and introduce new features, since these things go directly against each other in most aspects. If you introduce major new features you in the end have to change the ABI (usually shortly after the changes in the API). Now, you can have versioned symbols (like for example Glibc has), but this ...


3

No, Debian and Ubuntu are not binary compatible. Debian and Ubuntu may use different compilers with different ABI, different kernel versions, different libraries, different packages/version etc. As not all Ubuntu packages are in Debian (and vice versa) deb packages may also depend on uninstallable versions. RedHat and CentOS are the same as CentOS basically ...


3

The most important reason why OS X apps will not run on Linux is because those OSes used different syscalls. Some previous answers mentioned libraries but that is generally not the case - Core Foundation is largely open sourced by Apple under the name CFLite and readily portable to any platform (the Windows version of iTunes actually sits atop of a Windows ...


3

I'd say the OSX tools are closest to the OSX tools. They are open source, you can download the source directly from Apple: http://opensource.apple.com/


2

There is no best laptop for Linux, because this heavily depends on your usage. I'd recommend getting a laptop with Linux preinstalled. Other than that I can safely say that an Aspire Timeline 1810T runs Linux very well, but it is only a subnotebook.


2

The Darling Project was started a short while ago and, while it is far from ready, is probably what you are looking for. It is a Wine-like compatibility layer for running OS X applications on Linux, and looks pretty promising.


2

There's not a complete one. Bear in mind that Mac OS X started life as NeXTSTEP, of which OpenStep is a compatible implementation. Or rather, was at one time, so the story goes. Since then at Apple the NextStep frameworks have evolved into Cocoa. Cocoa has over 10 years of additions, extensions and improvements that don't exist in OpenStep. From what I ...


2

Since wine is a re-implementation of the Windows API - you're looking for a re-implementation of the Macintosh API or various "kits" that Apple provides to let OSX apps link to the system frameworks. I don't know of any that fit the bill. The only thing even close is the Chamelion Project which brings the UIKit from iOS to Mac OS X. Since I don't have a ...


2

I don't think so but maybe you could possibly run a Hackintosh inside a VM.



Only top voted, non community-wiki answers of a minimum length are eligible