osx

Git repository gets corrupted when I do a large commit: "Possible repository corruption on the remote side"

Hi All, A friend of mine and I have been trying to use git for a project. It is hosted on his server, and I git clone it as: git clone [email protected]:/path/to/git/repos.git Pretty standard stuff, and it works great for a while. But every time one of us has added a large commit (which git supposedly handles very well), of the or...

Mac OSX: Passing a file from user process to kernel module.

Hello, I need to pass a link to file from a user process to the OSX kernel driver. By link i mean anything that uniquely identifies a file on the local filesystem. I need that link to do I/O on that file in kernel. The most obvious solution seems to pass a file name and use a VFS vnode lookup. However i noticed, that Apple Disk Images h...

how to get list of installed appications on mac

I need to get list of installed applications on leopard / snow leopard. Can any one suggest me how I can get list of installed apps using my cocoa application. I have tried using "system_profiler SPApplicationsDataType". Problem with this is it just lists out *.app files, which includes the drivers as well. Is there a way to get only li...

XCode keeps lowercasing my file names!

I have OSX installed on a case preserving but not case sensitive partition: Which seems to be causing XCode and SVN to fight. At various points, for reasons I cannot discern, XCode will take a file that has mixed case, and save it in all lowercase to the file system. XCode will continue to display in its file lists the mixes case file....

Connect to an existing process

Hole thing is happening on the mac os x. Let's assume that I've opened an program by clicking on an .app icon. It's a python program with GUI which has a separate process that waits for a user input. But as I've opened it by clickin .app icon I dont have access to it's input as I would have if I opened it in Terminal. And the question ...

Can I present My Loginwidow before MAC Login Window

Hi All, I am trying to put my own customised login window before the standard MAC OS X Login window. Acutally , I need to have a stacking / chaining of window, so that original MAC Login window presented after my customised login window. I have already tried prelogin agent, but that do not fullfill my requirement , because i want my wi...

Using enums and switch statements in a class

How would I make the following calculator Class work?: //Calculator.h #import <Cocoa/Cocoa.h> @interface Calculator : NSObject { float initialNumber, operandNumber; typedef enum{ additionOperation, subtractionOperation, multiplicationOperation, divisionOperation }operationType; } @property(readwrite) float...

Changing window focus on OS X

As part of an InstallationCheck script on OS X I need to use finder dialogs to let the user browse for files. When I'm done I want to move the installer application up front again so that the user can easily continue with the installation. I have already tried the simple: tell application "Installer" to activate This does not work be...

Xcode is not building the Binary

Hello, Xcode is doing something bizzare which I at one point in time fixed but now for the life of me I can't figure out what's wrong. Xcode is building my project fine - no errors on a clean-all build. All my product names and info.plists agree, all the settings appear to be correct. I've only got the one build configuration (I alw...

Flash player debugger plugin crashes on Mac OS [tried many version of the plugin and browsers, all of them crash]

Dear All, I recently started using Mac OS X for a flex/actionscript project and having a problem with flash player debugger plugin for the browsers: OSX: 10.6.3 Browsers I tried: firefox, safari and chrome Flashplayer debug "Flash Player 10 Plugin content debugger (Intel-based Macs) Whenever I open a page containing a flash content, ...

How can get dtrace to run the traced command with non-root priviledges ?

OS X lacks linux's strace, but it has dtrace which is supposed to be so much better. However, I miss the ability to do simple tracing on individual commands. For example, on linux I can write strace -f gcc hello.c to caputre all system calls, which gives me the list of all the filenames needed by the compiler to compile my program (th...

Add Route through a VPN in Mac OS X

Is there an equivalent to add route in Mac OS X? On my Windows machine I can connect to our web server via VPN and then create a route on the to so we can access the MSSQL Server and make Remote Desktop Connection without have to enable remote gateway. This let's us develop and test in the same session without disconnecting. Now that I...

Adding Cocoa to a Carbon app?

Hi All, So We have a really old project that is all Carbon. We need to modify the way we open and save files and the dialog code we use is to old, so I wanted to create this new in Cocoa. How does one create a Cocoa Class that can be called from Carbon? What Cocoa routines would I use to create open and save dialogs and present them t...

Python libusb pyusb "mach-o, but wrong architecture"

I am having some trouble with the pyusb module. I have narrowed down the problem to a single line, and have created a small example script to replicate the error. #!/usr/bin/env python """ This module was created to isolate the problem in the pyusb package. Operating system: Mac OS 10.6.3 Python Version: 2.6.4 libusb 1.0.8 has been...

A way to enable a LaunchDaemon to output sound?

I have a small Foundation application that checks a website and plays a sound if it sees a certain value. This application successfully plays a sound when I run it as my user from the Terminal. I've configured this app to run as a LaunchDaemon, with the following plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//...

git mv and only change case of directory

While I found similar question I didn't find an answer to my problem When I try to rename the directory from FOO to foo via git mv FOO foo I get fatal: renaming 'FOO' failed: Invalid argument OK. So I try git mv FOO foo2 && git mv foo2 foo But when I try to commit via git commit . I get # On branch master # Untracked files: # (...

JavaApplicationStub with SWT causing problems

I created an application in Eclipse that uses SWT for the GUI. I've attempted to deploy the application using the Eclipse deploy, but it seems that when I do that, LSUIElement is not respected, and I can't force the application to disappear from the dock. Nonwhistanding that issue, the application actually deploys ok and is runnable. I...

what happens when you plug in a new USB device?

I have an embedded device with a USB connection. When the user plugs the device into their PC (Windows, OSX), how does the operating system discover what drivers to install? How do I get my drivers to be selected? Can they reside on some central server (run by the OS vendor)? ...

How to replicate CTRL+C in a shell script?

I'm running a script that performs a command that lasts too long, so I want to interrupt it. Any help? I've tried to search a lot, and I've been pointed to the kill command. Although, I can't get it to work. By the way, I'm using a Mac OS X. Thanks! ...

Mac OS X - run shell script from the desktop GUI

You can create a shell script or a Python or Ruby script and run it on the Mac by using "Terminal" ... if you have Finder open, and you click on the icon for the file containing the source code of a saved shell script, is there a way to have that script run, instead of opening in my text editor ? ...