Ouvrir un .jar en root

Dabz

Membre enregistré
27 Février 2012
3
0
Guten Tag !

J'ai un programme java que je peux lancer sans problème avec le compte root, mais que j'aimerais faire marcher avec mon compte habituel.

J'ai trouvé cette petite commande :

Bloc de code:
mac:~ Moi$ sudo su -
mac:~ root# open /Users/Moi/Desktop/TM/tm.jar

Problème : ça marche seulement si le compte root a été ouvert au préalable !

Si je lance la commande avec mon compte sans avoir le compte root d'ouvert en parallèle, j'obtiens cette erreur :

Bloc de code:
LSOpenURLsWithRole() failed with error -10810 for the file /Users/Moi/Desktop/TM/tm.jar

Que faire ?
 
le program essaye d'acceder a une URL que ton utilisateur n'a pas le droit d'acceder ou d'executer une commande qui a besoin de certains privileges

Bloc de code:
grep -R 10810 /System/Library/Frameworks/CoreServices.framework

LaunchServices/LSInfo.h

enum {
  kLSAppInTrashErr              = -10660, /* The app cannot be run when inside a Trash folder*/
  kLSExecutableIncorrectFormat  = -10661, /* No compatible executable was found*/
  kLSAttributeNotFoundErr       = -10662, /* An item attribute value could not be found with the specified name*/
  kLSAttributeNotSettableErr    = -10663, /* The attribute is not settable*/
  kLSUnknownErr                 = -10810, /* Unexpected internal error*/
  kLSNotAnApplicationErr        = -10811, /* Item needs to be an application, but is not*/
  kLSNotInitializedErr          = -10812, /* Not used in 10.2 and later*/
  kLSDataUnavailableErr         = -10813, /* E.g. no kind string*/
  kLSApplicationNotFoundErr     = -10814, /* E.g. no application claims the file*/
  kLSUnknownTypeErr             = -10815, /* Don't know anything about the type of the item*/
  kLSDataTooOldErr              = -10816, /* Not used in 10.3 and later*/
  kLSDataErr                    = -10817, /* Not used in 10.4 and later*/
  kLSLaunchInProgressErr        = -10818, /* E.g. launching an already launching application*/
  kLSNotRegisteredErr           = -10819, /* Not used in 10.3 and later*/
  kLSAppDoesNotClaimTypeErr     = -10820, /* Not used in 10.3 and later*/
  kLSAppDoesNotSupportSchemeWarning = -10821, /* Not used in 10.2 and later*/
  kLSServerCommunicationErr     = -10822, /* The server process (registration and recent items) is not available*/
  kLSCannotSetInfoErr           = -10823, /* The extension visibility on this item cannot be changed*/
  kLSNoRegistrationInfoErr      = -10824, /* The item contains no registration info*/
  kLSIncompatibleSystemVersionErr = -10825, /* The app cannot run on the current OS version*/
  kLSNoLaunchPermissionErr      = -10826, /* User doesn't have permission to launch the app (managed networks)*/
  kLSNoExecutableErr            = -10827, /* The executable is missing*/
  kLSNoClassicEnvironmentErr    = -10828, /* The Classic environment was required but is not available*/
  kLSMultipleSessionsNotSupportedErr = -10829 /* The app cannot run simultaneously in two different sessions*/
};
 
Dernière édition: