Search Results

Search found 1532 results on 62 pages for 'macosx iam'.

Page 30/62 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • AuthorizationExecuteWithPrivileges and osascript failing

    - by cygnl7
    I'm attempting to execute an uninstaller (written in AppleScript) through AuthorizationExecuteWithPrivileges. I'm setting up my rights after creating an empty auth ref like so: char *tool = "/usr/bin/osascript"; AuthorizationItem items = {kAuthorizationRightExecute, strlen(tool), tool, 0}; AuthorizationRights rights = {sizeof(items)/sizeof(AuthorizationItem), &items}; AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize | kAuthorizationFlagInteractionAllowed; status = AuthorizationCopyRights(authorizationRef, &rights, NULL, flags, NULL); Later I call: status = AuthorizationExecuteWithPrivileges(authorizationRef, tool, kAuthorizationFlagDefaults, (char *const *)args, NULL); On Snow Leopard this works fine, but on Leopard I get the following in syslog.log: Apr 19 15:30:09 hostname /usr/bin/osascript[39226]: OpenScripting.framework - 'gdut' event blocked in process with mixed credentials (issetugid=0 uid=501 euid=0 gid=20 egid=20) Apr 19 15:30:12: --- last message repeated 1 time --- ... Apr 19 15:30:12 hostname [0x0-0x2e92e9].com.example.uninstaller[39219]: /var/folders/vm/vmkIi0nYG8mHMrllaXaTgk+++TI/-Tmp-/TestApp_tmpfiles/Uninstall.scpt: Apr 19 15:30:12 hostname [0x0-0x2e92e9].com.example.uninstaller[39219]: execution error: «constant afdmasup» doesn’t understand the «event earsffdr» message. (-1708) Am I going about this all wrong? I just want to run the equivalent of "sudo /usr/bin/osascript ..."

    Read the article

  • Automatically install and launch a code-signed application from Safari

    - by Thomas Jung
    Is it possible and if so what are the steps necessary to package (or build) a Mac OS X application and code-sign it so that it can be downloaded with Safari and automatically launch? ... possibly after the user responds to some sort of dialog explaining that it is a signed application and the publisher has been verified. An example of the user experience I am trying to create is "installing Google Chrome for the first time on Windows", which is a 3-click, less-than-a-minute process. For the concerned among you: I am not trying to create a drive-by download. I am fine with some sort of intermittent user step approving the download. I just want to make the installation as quick and painless as possible and not require the user drag the app from a mounted DMG into the application folder. This may not 100% jibe with established Mac OS X user interaction guidelines, but it would work better for the not-power users. I only need the high-level steps or pointers to resources ... my google-fu was weak on this one.

    Read the article

  • Mac OS X bash prompt bug?

    - by Memo
    I am trying to set my bash prompt to display the time and current directory in bold: export PS1="\[\e[1m\][\A] \w \$ \[\e[0m\]" This does apparently work, but when I use the command history (ctrl-r), after finding the command I was searching for and pressing enter, this line is not displayed correctly. Here is an example: [21:58] ~/Wyona/svn-repos/zwischengas $ (reverse-i-search)`ta': tail -F logs/log4j-cnode1.log becomes, after pressing enter: [21:58] ~/Wyona/svn-repos/zwischengas $ -F logs/log4j-cnode1.log Of course, this is not "really" a problem, since the command does work correctly, but it is still annoying. Does anybody know why this happens? And, more importantly, how to prevent/fix it? Thanks, Memo

    Read the article

  • undefined symbols when compiling libjingle for Mac OS X

    - by wwh37
    Compiling libjinge-0.4.0 on my Leopard returned the following errors: /bin/sh ../../../libtool --silent --tag=CXX --mode=link g++ -g -o login login-login_main.o login-xmppsocket.o login-xmppthread.o login-xmpppump.o login-xmppauth.o ../../../talk/xmpp/libcricketxmpp.la ../../../talk/xmllite/libcricketxmllite.la ../../../talk/base/libcricketbase.la -lexpat -lpthread -lssl -lcrypto Undefined symbols: "_BIO_clear_flags", referenced from: socket_read(bio_st*, char*, int)in libcricketbase.a(openssladapter.o) socket_write(bio_st*, char const*, int)in libcricketbase.a(openssladapter.o) "_BIO_set_flags", referenced from: socket_read(bio_st*, char*, int)in libcricketbase.a(openssladapter.o) socket_write(bio_st*, char const*, int)in libcricketbase.a(openssladapter.o) Any ideas? I couldn't find an answer... Thanks!

    Read the article

  • How do I find out what objects points to another object i Xcode Instruments

    - by Arlaharen
    I am trying to analyze some code of mine, looking for memory leaks. My problem is that some of my objects are leaking (at least as far as I can see), but the Leaks tool doesn't detect the leaks. My guess is that some iPhone OS object still holds pointers to my leaked objects. The objects I am talking about are subclasses of UIViewController that I use like this: MyController *controller = [[MyController alloc] initWithNibName:@"MyController" bundle:nil]; [self.navigationController pushViewController:controller animated:YES]; When these objects are no longer needed I do: [self.navigationController popViewControllerAnimated:YES]; Without a [controller release] call right now. Now when I look at what objects that gets created I see a lot of MyController instances that never gets destroyed. To me these are memory leaks, but to the Leaks tool they are not. Can someone here tell me if there is some way Instruments can tell me what objects are pointing to my MyController instances and thereby making them not count as memory leaks?

    Read the article

  • I'v installed NetBeans 6.8 on my MacOS X MacBook and the logs say it cannot be run, any ideas?

    - by codezealot
    I've installed NetBeans 6.8 on my MacBook, and the installation results indicated success. However, every single time I attempt to run the application is shuts down. I monitored the process and noticed the following entries in the console that imply the application cannot be found? 3/19/10 10:20:20 PM [0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168] /Applications/NetBeans/NetBeans 6.8.app/Contents/MacOS/netbeans: line 57: dirname: command not found 3/19/10 10:20:20 PM [0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168] Cannot read cluster file: /../etc/netbeans.clusters 3/19/10 10:20:20 PM com.apple.launchd.peruser.501[77] ([0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168]) Exited with exit code: 1 I started researching how to set the default JDK for use by NetBeans, and found repeated use of the following command line entry; netbeans --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home -- from http://wiki.netbeans.org/JDKVersionAndMacOS When I attempt the command line above, I receive "netbeans command not found". So do I ... 1.) Need to create a command called "netbeans" that points to my install location for NetBeans 6.8? If so how do I do that? 2.) How do I get to the netbeans.conf file for NetBeans 6.8, does one even exist for it? It gets even more interesting, the above happens with Eclipse as well. Yippie.

    Read the article

  • XAMPP or MAMP on Mac OS X 10.6.2 (Snow Leopard)

    - by Steve
    I just bought a new MacBook Pro which comes with Snow Leopard 10.6.2 (Mac OS X 10.6.2). I am used to using XAMPP as my local development server on XP. Since Mac OS X is based on Unix, I was thinking on activating/installing all the necessary stuff as I would normally do on Linux. However, I am not quite ready to be playing around with the system at this point so having an external package would be a nice temporary solution I think. The question is whether I should go with MAMP or XAMPP. Does anybody have any suggestions? The Pro and Cons I suppose. As far as I know, Mac OS X comes with Apache2 and PHP5. Would MAMP or XAMPP modify the existing Apache and PHP installation? Any comments on how I should proceed? PS: Eventually I would use the default installation of Apache and PHP, and install a binary package of MySQL but time for development is an essence and I don't have time to familiarize myself with Mac OS X.

    Read the article

  • OpenCV, Python (ctypes), and OS X 10.5: dylib errors/confusion

    - by Jeff
    I have tried two brands of ctypes (ctypes-opencv and another) wrappers for OpenCV (2.0 from svn head), can use Python and OpenCV in the Python console, but whenever I try to import the packages (from ctypes_opencv import *) from another Python file, I get the following error message: OSError: dlopen(/usr/local/lib/libcv.dylib, 6): Symbol not found: __ZN2cv10fastMallocEm Referenced from: /usr/local/lib/libcv.dylib Expected in: flat namespace And some more Python errors: module body in __init__.py at line 18 from ctypes_opencv.cxcore import * module body in cxcore.py at line 80 _cxDLL, _cvDLL, _hgDLL = detect_opencv() function detect_opencv in cxcore.py at line 59 cvDLL = cdll.LoadLibrary(find_lib('cv')) function LoadLibrary in __init__.py at line 431 return self._dlltype(name) function __init__ in __init__.py at line 353 self._handle = _dlopen(self._name, mode) I most recently built OpenCV using flags the ctypes_opencv wiki recommended: ENABLE_SSE(2) OFF and BUILD_NEW_PYTHON_SUPPORT OFF. I've tried a number of flag combinations though. I also tried using the MacPorts install of OpenCV, got the same messages, uninstalled it, and now it errors out as well. :P And if that wasn't enough, I tried using the latest ctypes wrapper, but get boost-jam errors. Any help would be very much appreciated.

    Read the article

  • How do I actually use Authorization Services?

    - by abrahamvegh
    I've been searching and experimenting for nearly four hours now, so I'm gonna just ask straight up: How can I correctly use the Authorization Services API to show the user a system-level authorization window, the same one you see when you click a lock icon in System Preferences? From what I can tell, there is no way to do it using Cocoa if you want to do it programmatically, and if your goal is to call an executable that normally needs to be called via sudo (in my case, /usr/bin/pmset) you're up a creek without a paddle. I challenge you, I implore you: Please, enlighten me. Thank you. :)

    Read the article

  • File-level filesystem change notification in Mac OS X

    - by Paul J. Lucas
    I want my code to be notified when any file under (either directly or indirectly) a given directory is modified. By "modified", I mead I want my code to be notified whenever a file's contents are altered, it's renamed, or it's deleted; or if a new file is added. For my application, there can be thousands of files. I looked as FSEvents, but its Technology Overview says, in part: The important point to take away is that the granularity of notifications is at a directory level. It tells you only that something in the directory has changed, but does not tell you what changed. It also says: The file system events API is also not designed for finding out when a particular file changes. For such purposes, the kqueues mechanism is more appropriate. However, in order to use kqueue on a given file, one has to open the file to obtain a file descriptor. It's impractical to manage thousands of file descriptors (and would probably exceed the maximum allowable number of open file descriptors anyway). Curiously, under Windows, I can use the ReadDirectoryChangesW() function and it does precisely what I want. So how can one do what I want under Mac OS X? Or, asked another way: how would one go about writing the equivalent of ReadDirectoryChangesW() for Mac OS X in user-space (and do so very efficiently)?

    Read the article

  • Mac OS X pygame input goes to Terminal instead of Python

    - by Parappa
    I'm having trouble running a pygame based app on Mac OS X via Terminal. Input events such as keystrokes go to the Terminal instead of my Python app, and are detected by pygame. For example, I have the following test script: import pygame pygame.init() screen = pygame.display.set_mode((640, 480)) done = False while not done: pygame.event.pump() keys = pygame.key.get_pressed() if keys[pygame.K_ESCAPE]: done = True if keys[pygame.K_SPACE]: print "got here" Neither K_ESCAPE nor K_SPACE will be handled by this script when I run it from a Mac OS X Terminal, but Terminal will echo back the spaces. I'm running the MacPorts port of pygame (py-game), which depends on Python 2.4, and I've also used python_select to make python24 the active version.

    Read the article

  • Finder plugin in 10.6

    - by Girish Kolari
    I want to color badge files and folders based on the some condition in finder, what is the approach to achieve this in Mac OS X 10.6 I have checked this question: This only talk about the context menu in finder http://stackoverflow.com/questions/1651075/finder-plugin-in-snow-leopard I have even checked: http://scplugin.tigris.org/ even they don't do color badging in 10.6 which is pending task. Thanks in advance for your all help

    Read the article

  • How do I specify the block object / predicate required by NSDictionary's keysOfEntriesPassingTest ?

    - by Todd
    For learning (not practical -- yet) purposes, I'd like to use the following method on an NSDictionary to give me back a set of keys that have values using a test I've defined. Unfortunately have no idea how to specify the predicate. NSDictionary keysOfEntriesPassingTest: - (NSSet *)keysOfEntriesPassingTest:(BOOL (^)(id key, id obj, BOOL *stop))predicate Let's say for example all my values are NSURLs, and I'd like to get back all the URLs that are on port 8080. Here's my stab at coding that -- though it doesn't really make sense to me that it'd be correct: NSSet * mySet = [myDict keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) { if( [[obj port] isEqual: [NSNumber numberWithInt: 8080]]) { return key; }] And that's because I get back the following compiler error: incompatible block pointer types initializing 'void (^)(struct objc_object *, struct objc_object *, BOOL *)', expected 'BOOL (^)(struct objc_object *, struct objc_object *, BOOL *)' What am I missing? I'd appreciate a pointer at some docs that go into more detail about the "Block object" that the predicate is supposed to be. Thanks!

    Read the article

  • NSTableView handling edititng cells correctly

    - by Martins
    Hi All, I have an NSTableView working correctly except when I'm editing one of the table items. If the user is still in edit mode, and it presses the Sheet OK button, the tableiew doesn't update. How do I force the tableview to commit the changes when the user press the ok button (closesheet). Also, how do I handle the ESC Key to cancel the editing? Sorry if the questions looks absurd, but I've been only on developing on Mac for a month.

    Read the article

  • Mac OS X linker error in Qt; CoreGraphics & CGWindowListCreate

    - by Jake Petroules
    Here is my .mm file #include "windowmanagerutils.h" #ifdef Q_OS_MAC #import </System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h> QRect WindowManagerUtils::getWindowRect(WId windowId) { CFArrayRef windows = CGWindowListCreate(kCGWindowListOptionOnScreenOnly, kCGNullWindowID); return QRect(); } QRect WindowManagerUtils::getClientRect(WId windowId) { return QRect(); } QString WindowManagerUtils::getWindowText(WId windowId) { return QString(); } WId WindowManagerUtils::rootWindow() { QApplication::desktop()->winId(); } WId WindowManagerUtils::windowFromPoint(const QPoint &p, WId parent, bool(*filterFunction)(WId)) { return NULL; } void WindowManagerUtils::setTopMostCarbon(const QWidget *const window, bool topMost) { if (!window) { return; } // Find a Cocoa equivalent for this Carbon function // [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] // OSStatus ret = HIViewSetZOrder(this->winId(), kHIViewZOrderAbove, NULL); } #endif The linker is telling me "_CGWindowListCreate" is undefined. What libraries must I link to? Apple's documentation is not very helpful on telling what to include or link to, like MSDN is. Also I couldn't just do #import <CGWindow.h>, I had to specify the absolute path to it... any way around that?

    Read the article

  • GDB not breaking on breakpoints set on object creation in C++

    - by Drew
    Hi all, I've got a c++ app, with the following main.cpp: 1: #include <stdio.h> 2: #include "HeatMap.h" 3: #include <iostream> 4: 5: int main (int argc, char * const argv[]) 6: { 7: HeatMap heatMap(); 8: printf("message"); 9: return 0; 10: } Everything compiles without errors, I'm using gdb (GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)), and compiled the app with gcc (gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)) with the commands "-c -g". When I add breakpoints to lines 7, 8, and 9, and run gdb, I get the following... (gdb) break main.cpp:7 Breakpoint 1 at 0x10000177f: file src/main.cpp, line 8. (gdb) break main.cpp:8 Note: breakpoint 1 also set at pc 0x10000177f. Breakpoint 2 at 0x10000177f: file src/main.cpp, line 8. (gdb) break main.cpp:9 Breakpoint 3 at 0x100001790: file src/main.cpp, line 9. (gdb) run Starting program: /DevProjects/DataManager/build/DataManager Reading symbols for shared libraries ++. done Breakpoint 1, main (argc=1, argv=0x7fff5fbff960) at src/main.cpp:8 8 printf("message"); (gdb) So, why of why, does anyone know, why my app does not break on the breakpoints for the object creation, but does break on the printf line? Drew J. Sonne.

    Read the article

  • File system to choose for NAS box based on FreeNAS or OpenFiler [closed]

    - by Chris
    I'm a photographer and I have a requirement find a better method of storing my photos other than multiple USB2 drives via USB hubs. Currently I use a Macbook Pro and 6 external drives connected via USB2 or FW800. 3 are a copy of the first three, kept up to day manually by running an rsync backup. I'd like to run a FreeNAS or OpenFiler NAS box using 2TB drives mirrored via software RAID. But - I would like to have the flexibility of also plugging into the drive physically for the faster throughput when necessary. So. My question is, is there a file system that both *nix and Mac OSX will play nice with? Many thanks, Chris.

    Read the article

  • How to make a custom NSFormatter work correctly on Snow Leopard?

    - by Nathan
    I have a custom NSFormatter attached to several NSTextFields who's only purpose is to uppercase the characters as they are typed into field. The entire code for my formatter is included below. The stringForObjectValue() and getObjectValue() implementations are no-ops and taken pretty much directly out of Apple's documentation. I'm using the isPartialStringValid() method to return an uppercase version of the string. This code works correctly in 10.4 and 10.5. When I run it on 10.6, I get "strange" behaviour where text fields aren't always render the characters that are typed and sometimes are just displaying garbage. I've tried enabling NSZombie detection and running under Instruments but nothing was reported. I see errors like the following in "Console": HIToolbox: ignoring exception '*** -[NSCFString replaceCharactersInRange:withString:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x917ca58a __raiseError + 410 1 libobjc.A.dylib 0x94581f49 objc_exception_throw + 56 2 CoreFoundation 0x917ca2b8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x917ca22a +[NSException raise:format:] + 58 4 Foundation 0x9140f528 mutateError + 218 5 AppKit 0x9563803a -[NSCell textView:shouldChangeTextInRange:replacementString:] + 852 6 AppKit 0x95636cf1 -[NSTextView(NSSharing) shouldChangeTextInRanges:replacementStrings:] + 1276 7 AppKit 0x95635704 -[NSTextView insertText:replacementRange:] + 667 8 AppKit 0x956333bb -[NSTextInputContext handleTSMEvent:] + 2657 9 AppKit 0x95632949 _NSTSMEventHandler + 209 10 HIToolbox 0x93379129 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 11 HIToolbox 0x933783f0 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 12 HIToolbox 0x9339aa81 SendEventToEventTarget + 52 13 HIToolbox 0x933fc952 SendTSMEvent + 82 14 HIToolbox 0x933fc2cf SendUnicodeTextAEToUnicodeDoc + 700 15 HIToolbox 0x933fbed9 TSMKeyEvent + 998 16 HIToolbox 0x933ecede TSMProcessRawKeyEvent + 2515 17 AppKit 0x95632228 -[NSTextInputContext handleEvent:] + 1453 18 AppKit 0x9562e088 -[NSView interpretKeyEvents:] + 209 19 AppKit 0x95631b45 -[NSTextView keyDown:] + 751 20 AppKit 0x95563194 -[NSWindow sendEvent:] + 5757 21 AppKit 0x9547bceb -[NSApplication sendEvent:] + 6431 22 AppKit 0x9540f6fb -[NSApplication run] + 917 23 AppKit 0x95407735 NSApplicationMain + 574 24 macsetup 0x00001f9f main + 24 25 macsetup 0x00001b75 start + 53 ) Can anybody shed some light on what is happening? Am I just using NSFormatter incorrectly? -(NSString*) stringForObjectValue:(id)object { if( ![object isKindOfClass: [ NSString class ] ] ) { return nil; } return [ NSString stringWithString: object ]; } -(BOOL)getObjectValue: (id*)object forString: string errorDescription:(NSString**)error { if( object ) { *object = [ NSString stringWithString: string ]; return YES; } return NO; } -(BOOL) isPartialStringValid: (NSString*) cStr newEditingString: (NSString**) nStr errorDescription: (NSString**) error { *nStr = [NSString stringWithString: [cStr uppercaseString]]; return NO; }

    Read the article

  • Free-as-in-beer binary file format inspector

    - by fbrereto
    I am looking for a utility that gives me the ability to specify a binary file format and then interpret a file of bytes according to that format. (Something along the lines of the 010 Editor, but infinitely more cost-effective). Something that runs on Mac OS X would be preferred, but I'm interested to see what all is out there in general (while more of a hassle I'd be willing to run a tool on Windows if it were superior.) What's your preference?

    Read the article

  • unix at command pass variable to shell script?

    - by Andrew
    Hi, I'm trying to setup a simple timer that gets started from a Rails Application. This timer should wait out its duration and then start a shell script that will start up ./script/runner and complete the initial request. I need script/runner because I need access to ActiveRecord. Here's my test lines in Rails output = `at #{(Time.now + 60).strftime("%H:%M")} < #{Rails.root}/lib/parking_timer.sh STRING_VARIABLE` return render :text => output Then my parking_timer.sh looks like this #!/bin/sh ~/PATH_TO_APP/script/runner -e development ~/PATH_TO_APP/lib/ParkingTimer.rb $1 echo "All Done" Finally, ParkingTimer.rb reads the passed variable with ARGV.each do|a| puts "Argument: #{a}" end The problem is that the Unix command "at" doesn't seem to like variables and only wants to deal with filenames. I either get one of two errors depending on how I position "s If I put quotes around the right hand side like so ... "~/PATH_TO_APP/lib/parking_timer.sh STRING_VARIABLE" I get, -bash: ~/PATH_TO_APP/lib/parking_timer.sh STRING_VARIABLE: No such file or directory I I leave the quotes out, I get, at: garbled time This is all happening on a Mac OS 10.6 box running Rails 2.3 & Ruby 1.8.6 I've already messed around w/ BackgrounDrb, and decided its a total PITA. I need to be able to cancel the job at any time before it is due.

    Read the article

  • can't run a scala script on Mac OS X

    - by wataradio
    Running a scala script on Mac OS X results in the following error: Unable to establish connection to compilation daemon I googled and found a page reported the same problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576568 To solve the problem, the page said: Can you please tell what does /etc/sysctl.d/bindv6only.conf contain? If the value is 1, can you try to: 1) sudo sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' \ /etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart 2) Then, run scala/fsc as usual and see if the bug is still there. But I can't find a bindv6only.conf in my Mac OS X. How can I solve the problem? -- System Information: Scala version 2.7.7.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20) Mac OS X 10.6.3

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >