osx

Add OS X Native Fonts to X11

I am starting to use xterm for my default terminal. My only issue, is that I don't like any of the fonts. Is it possible to install more fonts for use in X11. I'd really like to get Monaco. Thanks. ...

Crash-proofing Mac Cocoa application

In my Cocoa application I need to run a task that uses unstable unfixable code. It takes little input, works independently from the rest of the app, and generates thousands of ObjC objects as a result. How can I run the unstable part and let it crash without taking down whole application? Is it possible to fork() Cocoa application? How...

Simulate a physical mouse move in Mac OS X

Hello, I'm looking for a way to simulate a mouse move event in Mac OS X 10.6. It would have to be defined in mouse units (rather than pixels — that is important!) I need this for an experiment which basically consists of drawing lines. Any ideas are welcome. Thank you! ...

What is the purpose of the kill flag for the codesign tool?

I've read the man page, but I'm having trouble understanding what the -o kill flag does to the codesign tool. I initially interpreted the sentence "Code with the kill flag set will die when it loses its identity" to mean that if you sign an app with the kill flag, and then change the app in a way that invalidates the signature, then the...

pkg-config path for mono on mac

I installed mono in Mac OS X. I was following these instructions on the mono website. The first console application worked because it didn't use any packages. However, when I ran gmcs hello.cs -pkg:gtk-sharp-2.0, it told me I didn't have pkg-config installed. So I installed pkg-config. Now I get this error because pkg-config doesn't know...

Problem using MySQLdb on OSX: symbol not found _mysql_affected_rows

This is related to a previous question. However, the main posted solution there is not working for me. I'm on Snow Leopard, using the 32-bit 5.1.49 MySQL dmg install. I'm using the built in python (apparently, as noted in the comments, my Python version is different), which appears to be 2.6.5 32-bit: Python 2.6.5 (r265:79359, Mar 24 ...

How can I build a Safari extension package from the command line?

Instead of going to Extension Builder > Build Package…, I'd like to built a .safariextz package from the MyExtension.safariextension folder. I know I can unpack an extension with xar -xf. I suspect the way back involves packing it with xar, but then I'll need to do the code signing thing, which may or may not involve codesign(1). ...

Is there something like filter driver for Mac OS X?

Windows lets you develop a filter driver to catch file I/O's on VFS. But I can't seem to find something similar for Mac. It does have something called Filter Schemes, but those are for HFS+. Anyone know if there is a way for me to intercept file I/O's on Mac without using programs like MacFUSE? ...

Unix (osx) command line image processor?

I have a jpeg image of 400x400 px that i want to paste into a 960x640 image. Is there a command line image processor that I can use on OSX? Thanks! ...

How can I capture the stdout from a process that is ALREADY running

I have a running cron job that will be going for a while and I'd like to view its stdout. I don't know how important the fact that the process was started by cron is, but I figure I'd mention it. This is on OSX so, I don't have access to things like... /proc/[pid]/..., or truss, or strace. Suggestions of executing with IO redirection ...

cocoa: know the position of the app icon in the dock

Hello, I need to show a special menu when the dock icon is hovered. In order to do this I need to find a way to get the coordinate of the app icon in the dock. Do you know how I can get this info? Thanks and regards, ...

Translate Apple's model identifiers (MacBookPro5,1) to user-friendly names?

Does Mac OS X have API that translates Apple's model identifiers (the kind found in plists and APIs, e.g., "MacBookPro5,1") to user-friendly marketing names of these devices ("Unibody MacBook Pro Late 2008")? I'm looking for more future-proof solution than simply hardcoding a list. ...

Tomcat on Mac shows org.apache.catalina.startup.Bootstrap in Application Bar

I have a vanilla tomcat 6.0.20 installation on Macintosh. Previously when it launched the process that showed up in Activity Monitor (and ps -w -w) was "java". Now it is org.apache.catalina.startup.Bootstrap, and it shows up in the Application Bar, which is weird. Some time passed before we noticed this, so we don't know exactly what ...

Is there a command line utility that can listen for OS-wide keystrokes and tell me via stdout?

I'm developing an app and I'd like to trigger functions in my app via keystroke combos when it's not in focus. Because I'm developing my app in AIR, I do not have access to listen to global Keystrokes. However, I can receive STDOUT from an application. So, I'm looking for a utility that can give me this ability. I'm looking for both Win...

CARenderer never produces output

Hi, I've been stuck for hours trying to render a Core Animation layer tree into an OpenGL context using CARenderer. The OpenGL context is currently provided by a NSOpenGLView subclass set up in Interface Builder, with settings on default. Here's how I set up the CALayers in my example: l1 = [[CALayer layer] retain]; // l1 is an...

Determining what AppleScript commands an application responds to

Is it possible to ask an OSX application which applescript commands it responds to, and if so, how? ...

How to check the status(running/stopped) of a process/daemon in Mac?

In Linux, we have the command "/etc/init.d/process_name status", this will give whether the process/daemon is running or stopped. For Example In Ubuntu: root@Ubu91032b-Bassu:~# /etc/init.d/ssh status sshd is running root@Ubu91032b-Bassu:~# My question is, is there any command (like above) in Mac to check the status of a daemon/pro...

File extension icon on Mac

Hi My application uses new proprietary file formats with extensions never been used before. I would like to associate specific icons to display my files in finder with nice iconography. As far as I know LaunchService is responsible to handle all these data, however Im confused where, when and how shall I create associations. Which entr...

WIll QT have any future as a GUI toolkit on MacOSX?

Today i tried to implement the owner drawn menu item support in Cocoa and MacOSX 10.5 And what i found was pretty scary when i think about QT which i intended to use for some other projects. If i see it right there is no future for QT on MacOSX because the whole Appearance Manager with the exeception of a few trivial functions is compl...

PHP system calls and $PATH in OS X

I'm trying to get PHP to make system calls on OS X. However, it doesn't seem to be able to find anything that's included in the system path. When I run... putenv("PATH={$_SERVER["PATH"]}:/usr/local/bin"); ... just before the system call, it works. This is not a practical solution, since the code that executes the system call is a plug...