osx

Is it possible to get the maximum supported resolution of a connected display in os x from java?

What the title says. Assume java 1.6 and leopard. Ideally, it would also be nice to get a list of all supported resolutions and the current resolution. If this isn't possible in java, is there some way to do it that could be called from java? ...

Move all windows to a single monitor (with two attached) in Mac OS X?

Whenever I use my MacBook away from my desk and later plug it into an external display (as primary), I get into the state of having windows deposited in both the notebook monitor and the external one. To move all windows to a single screen, my current solution is to "Turn on mirroring" in the display preferences and then turn it off aga...

Can you have virtual users using an SFTP server?

I've had a FTP server (Mac OS X, but not the server version) set up for a while where the users are virtual, i.e. they are not actual user accounts in the server's OS, but accounts handled by the FTP server software -- to the OS they all look like the ftp user account. I'd like to retire the FTP server software and go SFTP instead. Is t...

Is it possible to run OSX in a virtual machine?

I'd love to be able to try Mac OSX in a VM, preferable on something shiny and new like KVM for linux. I'm a Linux and Windows person, but would like to try out OSX without investing in the expensive hardware or accumulating yet another box to fit somewhere under my desk. (Read: no I don't want to get a Mac Mini) Is this possible? Legal...

Should you register new extensions with Apple?

Do I need to register new extension types with Apple before I release an application that would create them on OS X? ...

Can Mac OS X's Spotlight be configured to ignore certain file types?

I've got bunches of auxiliary files that are generated by code and LaTeX documents that I dearly wish would not be suggested by SpotLight as potential search candidates. I'm not looking for example.log, I'm looking for example.tex! So can Spotlight be configured to ignore, say, all .log files? (I know, I know; I should just use QuickSi...

How to do a sample rate conversion in Windows (and OSX)

I am about to write an audio file converter for my side job at the university. As part of this I would need sample rate conversion. However, my professor said that it would be pretty hard to write a sample rate converter that was both of good quality and fast. On my research on the subject, I found some functions in the OSX CoreAudio-fr...

Getting the process id of a Carbon C++ application

Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa ...

Window managers for Windows and Macs

X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions. Are there any consistent ways for writing such processes for Microsoft Windows or Mac OS/X? I kn...

How to use p4merge as the merge/diff tool for Mercurial?

Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5? ...

.NET Development on a Mac Tips

I have just got a MacBook Pro and have been using it (+Fusion) to develop on for about a month now. The purpose of this question is similar to Hidden Features of C#; to become a how-to of tips and trick for windows development on a mac. I should clarify that I am aware of boot camp but do not use it (nor do I have any interest to), hen...

Is it possible to forward ssh requests that come in over a certain port to another machine?

I have a small local network. Only one of the machines is available to the outside world (this is not easily changeable). I'd like to be able to set it up such that ssh requests that don't come in on the standard port go to another machine. Is this possible? If so, how? Oh and all of these machines are running either Ubuntu or OS X. ...

Opening a non-standard URL in a Cocoa app

In an application that I'm writing I have some code like this: NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString* myurl = @"http://www.somewebsite.com/method?a=%d"; NSURL* url = [NSURL URLWithString:myurl]; [ws openURL:url]; The main difference being that myurl comes from somewhere outside my control. Note the %d in the URL ...

XML Editor for OS X

Hi http://stackoverflow.com/questions/12073/what-is-the-best-xml-editor was a great question regarding XML editors on Windows. What about on OS X? Oxygen is feature complete, but, it's a Java app and a bit clunky on OSX. It's also extremely expensive. Anything Mac native and comparable in features for less than $300 ? Thanks Andrew...

Is there a good Fogbugz client for Mac OS X?

And/or: do I need one? I've recently started using FogBugz for my hobby projects, and I'm very happy with things so far. Having read more about it, especially the evidence-based scheduling, I'd like to start using it for my PhD as well. (Heh; something tells me my supervisors won't be opening tickets for me, though.) Last night I stumb...

Citrix Server sort of app - on a Mac?

Does anyone know of a similar product to Citrix Server that'll run on the Mac OS? Essentially, I'm looking to allow multiple remote users to log in to the same OSX Server at the same time (with full visual desktop, not SSH). ...

How come a 32 bit kernel can run a 64 bit binary?

On my OS X box, the kernel is a 32 bit binary and yet it can run a 64 bit binary. How does this work? cristi:~ diciu$ file ./a.out ./a.out: Mach-O 64-bit executable x86_64 cristi:~ diciu$ file /mach_kernel /mach_kernel: Mach-O universal binary with 2 architectures /mach_kernel (for architecture i386): Mach-O executable i386 /mach_ker...

Cross-platform space remaining on volume using python

I need a way to determine the space remaining on a disk volume using python on linux, Windows and OS X. I'm currently parsing the output of the various system calls (df, dir) to accomplish this - is there a better way? ...

Mail Message Link Handling

I've written an Applescript which when supplied with a Windows network link, will convert it to the correct smb:// equivelent for the server in our office, mount the network drive, and open the requested folder in Finder. I have this built in an application which just takes a pasted network path. Ideally I need this to trigger on clicki...

How do you keep the machine awake?

I have a piece of server-ish software written in Java to run on Windows and OS X. (It is not running on a server, but just a normal user's PC - something like a torrent client.) I would like the software to signal to the OS to keep the machine awake (prevent it from going into sleep mode) while it is active. Of course I don't expect the...