Script to run only if group exists.

Hello,
I've done a few searches in the forums, but didn't locate what I was looking for.  Also tried Google with no luck.  Anyway, it's probably a simple request, but I can't seem to get it to work for anything.  What I'm looking for is an if statement that will check to see if a specific group exists in the default document before running it's script to bring in layers from another document.  Additionally, if there is also a way to check if a specific group (name) does not exist before running the code, as well.  Thanks in advance for any help.
dgolberg

This might help...
if( layerExist("Layer 1")){
    alert("Layer/Group Exists");
    }else{
        alert("Layer/Group does not exist");
function layerExist(lyrName){
      var desc = new ActionDescriptor();
      var ref = new ActionReference();
      ref.putName( charIDToTypeID( "Lyr " ), lyrName);
      desc.putReference( charIDToTypeID( "null" ), ref );
      desc.putBoolean( charIDToTypeID( "MkVs" ), false );
      try{
      executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
      }catch(e){return false;}
      return true;

Similar Messages

  • Script to export a script as run-only via AppleScript Editor

    Hi,
    I have written a script that's creating a new script and than save it to the desktop as run-only.
    Now Apple has re-written the rules of AppleScript Editor so the run-only command had to go via 'Export' (and not 'Save' anymore).
    I can't figure out how to script it now... I even tried to script the menu's but that's only possible for all menu's without '...' ending it. For example: 'File > New' is scriptable, but 'File > Export...' is not.
    Script 1 is the script I want to get working, but if scripting the Export of AppleScript Editor is not possible, I want to get de workaround of Script 2
    Script 1:
    ==================================================
    set myScript to "
    set studentnumber to \"" & studentnumber & "\"
    set password to \"" & password & "\"
    tell application \"Safari\"
    tell application "AppleScript Editor"
    activate
    make new document with data myScript
              save document 1 as "application" in file ((path to desktop as Unicode text) & "Automatisch Inloggen op GLR.app") with run only
    -- save doesn't work anymore and has to be EXPORT...
              return
    close document 1
    end tell
    =================================================
    Script 2 (workaround, but doesn't work either)
    tell application "AppleScript Editor" to activate
    menu_click({"AppleScript Editor", "File", "Export..."})
    -- 'File > New' works but 'File > Export... not'
    on menu_click(mList)
              local appName, topMenu, r
    -- Validate our input
              if mList's length < 3 then error "Menu list is not long enough"
    -- Set these variables for clarity and brevity later on
              set {appName, topMenu} to (items 1 through 2 of mList)
              set r to (items 3 through (mList's length) of mList)
    -- This overly-long line calls the menu_recurse function with
    -- two arguments: r, and a reference to the top-level menu
              tell application "System Events" to my menu_click_recurse(r, ((process appName)'s ¬
                        (menu bar 1)'s (menu bar item topMenu)'s (menu topMenu)))
    end menu_click
    on menu_click_recurse(mList, parentObject)
              local f, r
    -- `f` = first item, `r` = rest of items
              set f to item 1 of mList
              if mList's length > 1 then set r to (items 2 through (mList's length) of mList)
    -- either actually click the menu item, or recurse again
              tell application "System Events"
                        if mList's length is 1 then
      click parentObject's menu item f
                        else
                                  my menu_click_recurse(r, (parentObject's (menu item f)'s (menu f)))
                        end if
              end tell
    end menu_click_recurse

    Applescript has changed a little. You can now save uncompiled scripts, but it would make no sense to save an uncompiled script as read-only, so trying to do that fails. Add a compile command before the save:
    tell application "AppleScript Editor"
      activate
              set doc to make new document with data myScript
      compile doc
              save doc as "application" in ((POSIX path of (path to desktop)) & "Automatisch Inloggen op GLR.app") with run only
              return
      close doc
    end tell

  • Removing "Run Only" attribute on AppleScript?

    So, let's say I wrote a killer script. Now I want to use it as the base for another script, but i inadvertently saved my script as "run only".
    Is there a way to change the attribute of this file (Sort of like a dos attrib command on a pc?)

    You either misunderstand "Andreas's hope" or misrepresent it. It has nothing whatsoever to do with "open source", and whether or not you know how to crack into someone's deliberately hidden scripting does not in the remotest way affect your learning of AppleScript. It has to do with data protection. I am sure you are not in favour of making piracy easier.
    I have spent many years encouraging people to learn AppleScript and helping them with their scripting. A decompiler could conceivably give information to someone with good scripting abilities, but what use it could possibly be to someone learning scripting is beyond me. If you are sincere in wishing to improve your scripting then I can assure you that if you found a suitable decompiler it would - unless you were very expert - only give you incomprehensible gobbledegook. A decompiler is most assuredly NOT a learning tool.
    My apologies for upsetting you. Happy scripting!
     

  • Edit a run only script

    Can I (And how in the world do I?) edit a script that someone has made as a run only file?

    Folder Actions needs to be enabled in order for you to use them. I think by default this is not. If you open AppleScript Utility App you can click the 'Set UP Actions…' button. From here you can manage which folders have what Action Scripts Attached to them. You can also do this via 'ctrl' clicking a folder. Folders with Action Scripts will just sit there until an adding item or removing item event is triggered the script then processes these items. There are also a set of sample scripts that should get you started… You can also put the default scripts into your finder menubar while your there…

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • "Run only allowed" GP prevents zen apps

    I've just started to experiment with restricted Windows Group Policies an ZMC 10.3. I cant seem to get any restricted applications to run from the nal window like they did in zen 4, 6, or 7 while using the "Run only allowed windows applications" group policy setting.
    Before I only had to allow nalwin.exe and nalshell.dll but this no longer appears to work. Other people have posted this issue with versions as new as 10.2 and the "fix" was to allow nalshell.dll but I've already done that.
    What am I missing? I dont actually get the usual restriction message like if i tried to run an program from the start menu that isnt allowed, but instead zen give an unspecified error. The apps run just fine using a GP that doesnt have "run only allowed" set.
    Any help is appreciated.

    I think it would be difficult to get a bug created that said:
    "ZCM honors Windows Security Policies"
    It was certainly never the intentional design to allow this.
    Rogue Process Mgmt was the tool to perform the feature you are
    describing in lieu of using the Microsoft GPO.
    I'm not aware of any products that do or would advertise this feature,
    since a security patch could fix it at any time.
    The best bet would be to use file rights to actually control what user's
    launch in combination with limiting where programs can be launched.
    (Such as from %ProgramFiles%, etc..)
    On 6/14/2010 1:56 PM, jkillebrew wrote:
    >
    > Does this still have something to do with changes in 10.2?
    >
    > Im not sure how its a security issue, but it certainly works well for
    > us, allowing us to restrict users to only run applications from within
    > the application window and nothing outside other than a very limited
    > list of applications defined by the GP which would include things like
    > nalwin.exe, antivirus related items, and maybe office applications that
    > would need to be opened by file association.
    >
    > The greater security hole is that this policy can be defeated by
    > renaming a program to the same as something allowed since it works by
    > the file name, but students dont know that and dont know what files I
    > have allowed so it hasnt been a problem so far.
    >
    > Thanks for any help you can provide. I'd really like to use ZCM but
    > this is going to be a deal breaker for us if we cant get it working. We
    > are already struggling to remove duplicate usernames across different
    > OUs to support ZCM (makes no sense not to support this if edir allows
    > it) so this is just another major stumbling block.
    >
    > BTW, there are numerous examples of this type of use of GP and zen all
    > over the place. People have posted examples on their blogs and I even
    > read a cool solutions article suggesting this setup, though this was all
    > with 7 or older.
    >
    >
    > craig_wilson;1987251 Wrote:
    >> I actually misread your earlier posting.
    >>
    >> I thought you were having an issue launching the ZEN Components
    >> themselves, rather than the the Windows Policy Locking preventing the
    >> launch of Apps from NAL.
    >>
    >> I was not aware that ever worked and am a little surprised it ever
    >> did.
    >> In fact, I would consider it a fairly significant security hole in the
    >> Windows policy that I did not know existed and would be concerned
    >> about
    >> trying to exploit it.
    >>
    >> I know ZDM had it's own version, called Rogue Process Management, but
    >> that does not exist in ZCM. It may be possible to try and create an
    >> enhancement request to get this feature re-added.
    >>
    >> In 10.0 that shipped, this feature would not really have worked the
    >> way
    >> ZCM was designed, but could at least work in theory now.
    >>
    >>
    >>
    >> On 6/14/2010 11:46 AM, jkillebrew wrote:
    >>>
    >>> I cannot get approval to open a SR because this isnt in production.
    >> We
    >>> are just trying to migrate our existing policies over from zen 4& 7
    >>> with XP to similar policies using zen 10.3 and Windows 7 to see if
    >> we
    >>> can possible stick with Novell or if we have to move to a new
    >> product.
    >>> We must keep restricted policies in place because we use this for
    >> K-12
    >>> schools where students are malicious.
    >>>
    >>> So far the only fix is to add the application to the allowed list in
    >>> the GP every time we create a new app which would be a huge pain the
    >>> butt and would cause great delays in getting new apps deployed since
    >>> have to wait for the GP to propogate at login while the app would
    >> often
    >>> arive ahead of the new GP. This would also allow everyone to run the
    >>> application even if they dont have that bundle, unless we are going
    >> to
    >>> start managing more granular GPs, maybe hundreds of separate ones,
    >> and
    >>> we would have to keep notes on what GPs have access to what
    >>> applications. I'd move to another product before I'd go that route.
    >>>
    >>> It should be fairly easy to recreate i think.
    >>>
    >>>
    >>> craig_wilson;1987169 Wrote:
    >>>> There was a change in ZCM 10.3 in how some of the ZCM Processes
    >> Launch.
    >>>> They are no longer child processes under explorer and they are
    >>>> actually
    >>>> started by one of the other ZCM services.
    >>>>
    >>>> It is possible that this could be related to the issue you are
    >> seeing.
    >>>>
    >>>> Just be sure to let me know if you can't create an SR, because I
    >> may
    >>>> use
    >>>> spare time to try and dupe and follow this up.
    >>>>
    >>>> However, my preference would be me to try and follow an SR you have
    >>>> created.
    >>>>
    >>>> Just let me know.
    >>>>
    >>>> On 6/14/2010 10:26 AM, jkillebrew wrote:
    >>>>>
    >>>>> Thanks for the suggestion. At least one person with 10.2 had it
    >>>> working
    >>>>> according to another thread on this forum so I was hoping it was
    >>>> just
    >>>>> something simple. Unfortunately I think we have to pay per
    >> incident
    >>>> so I
    >>>>> cant open a CSR.
    >>>>>
    >>>>> I tried Procmon on both a pc with and without restrictions and
    >>>> compared
    >>>>> line by line but they seem to be identical. Something is happening
    >>>>> within Zen that isnt showing up on procmon and i dont know how
    >> else
    >>>> to
    >>>>> see what is going on by hind the scenes.
    >>>>>
    >>>>>
    >>>>> craig_wilson;1987046 Wrote:
    >>>>>> If you are able to open a Service Request, I would recommend
    >> doing
    >>>>>> this.
    >>>>>> I am not sure if the Agent is tested with that policy, but I
    >> think
    >>>> it
    >>>>>> would be a good idea to get an official method documented.
    >>>>>>
    >>>>>> In the mean time, I would recommend trying the following........
    >>>>>>
    >>>>>> Disable the Policy and configure PROCOMON to run from startup.
    >>>>>> Use this to see what processes and items launch and run.
    >>>>>>
    >>>>>> Try adding those items to your list.
    >>>>>>
    >>>>>> (Note: If you can and do make an SR, please drop me a note at
    >>>>>> Craig_d_Wilson at Yahoo, and I will make sure it gets into the
    >>>> hands
    >>>>>> of
    >>>>>> somebody who understands the issue.)
    >>>>>>
    >>>>>> --
    >>>>>> Craig Wilson - MCNE, MCSE, CCNA
    >>>>>> Novell Knowledge Partner
    >>>>>>
    >>>>>> Novell does not officially monitor these forums.
    >>>>>>
    >>>>>> Suggestions/Opinions/Statements made by me are solely my own.
    >>>>>> These thoughts may not be shared by either Novell or any rational
    >>>>>> human.
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>> --
    >>>> Craig Wilson - MCNE, MCSE, CCNA
    >>>> Novell Knowledge Partner
    >>>>
    >>>> Novell does not officially monitor these forums.
    >>>>
    >>>> Suggestions/Opinions/Statements made by me are solely my own.
    >>>> These thoughts may not be shared by either Novell or any rational
    >>>> human.
    >>>
    >>>
    >>
    >>
    >> --
    >> Craig Wilson - MCNE, MCSE, CCNA
    >> Novell Knowledge Partner
    >>
    >> Novell does not officially monitor these forums.
    >>
    >> Suggestions/Opinions/Statements made by me are solely my own.
    >> These thoughts may not be shared by either Novell or any rational
    >> human.
    >
    >
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.

  • Event 917 Console Crash when attempting to modify Disk Only Protection Group

    Primary DPM 2012 R2 4.2.1254.0 running on Server 2012 -
    In the process of decommissioning a number of old servers - I found that I am no longer able to modify a disk only protection group on one of my primary DPM servers. Console crash - noting error 917. I've seen a number of work around in relation to protection
    groups with long term storage, but none noting disk only. Notably, kb 2905631 - long term only protection may cause this issue.
    Another thread mentioned that re-syncing / consistency checks on the entire server resolved the issue for them, but I find that rather unnecessary. I've over 13Tb of data on this server, and am trying to remove the last 30GB of an old protection group.
    Recap-
    Error 917 when removing member from protection group
    MMC crash with a 999 marked when modifying the protection group
    The event log is not noting any service crashes, or the 917 error in the event log. 999 is getting recorded in the event log.
    The description for Event ID 999 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    An unexpected error caused a failure for process 'mmc'.  Restart the DPM process 'mmc'.
    Problem Details:
    <FatalServiceError><__System><ID>19</ID><Seq>0</Seq><TimeCreated>12/2/2014 5:40:14 PM</TimeCreated><Source>DpmThreadPool.cs</Source><Line>163</Line><HasError>True</HasError></__System><ExceptionType>SqlNullValueException</ExceptionType><ExceptionMessage>Data
    is Null. This method or property cannot be called on Null values.</ExceptionMessage><ExceptionDetails>System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
       at System.Data.SqlClient.SqlBuffer.get_String()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup.ReadBackupAndCCWindow()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup.get_BackupWindow()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup.GetPerformanceString()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ProtectedGroupUIElement.AddPerformanceData()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ProtectedGroupUIElement.ConstructDetailsPaneContent()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.CommonControls.UISearchableElement.get_DetailNameValuePairs()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ProtectedGroupUIElement.DisplayDetails()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ProtectionViewInternal.FillGroupDetails(GroupingListHeaderItem group)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ProtectionViewInternal.UpdateDetailsPane()
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Microsoft.Internal.EnterpriseStorage.UI.CommonControls.GroupingListView.EndUpdate()
       at Microsoft.Internal.EnterpriseStorage.UI.CommonControls.GroupingListViewBody.ProcessClick()
       at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message&amp; m)
       at Microsoft.Internal.EnterpriseStorage.UI.CommonControls.GroupingListViewBody.WndProc(Message&amp; m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</ExceptionDetails></FatalServiceError>
    the message resource is present but the message is not found in the string/message table

    Hi Mike,
    That appears to be the case. A row shows NULL for IMCatalogXML. I'm looking at your script to update the value now based on the following thread - thread .
    So far, no rows have been modified.
    Since I really don't care about this protected member, is this a row I could just delete from the DB, or how to properly update the data so I can remove it from within the confines of the GUI?
    Marketing 2011-05-19 18:59:41.917
    B7073B10-DDE6-4EA3-BD8C-1E1497C218D5 NULL
    NULL 0
    0 0 NULL
    2 0
    NULL
    This PG was definitely around back when this server was DPM 2010.
    Regards

  • "Your script uses objects from a non-existent collection"

    I have a multiple page form with a barcode on each form.  I created a separate collection for each barcode.  The auto generated code looks fine and has the correct collection created, however I still get the error, Paper Forms Barcode error "Your script uses objects from a non-existent collection".
    I'm not sure what is wrong and I don't know how to fix it.  Anyone else run into this?

    You will need to create a shared folder in Dropbox, then populate that with what ever folders you need to organize the files. It appears the DropBox app,will not handle this, but you can do, it by logging in to you account via Safari. Once the folders are created, they will show up in the app. Likewise with designating the folders as shared. Anyone you wish to share with will need a Dropbox account. (using the public folder will not work since links out it are for files only, not folders. An odd restriction, but it is what it is).
    IF you have copies of the files on a PC, you will find that will be the easiest place to upload them from. If they are only in iBooks on the iPad, you will need to synch and use the file management function to copy them off. not sure if you can synch them back over to DropCopy within iTunes (never tried it).
    DEpending on your needs, a couple of apps to look into are iCab Mobile (a browser), and GoodReader (doc viewing and management app). Both integrate well with DropBox.

  • AJAX truclient for IE, script cannot run in load mode

    I have LR 11.5 Ajax truclient for IE script which runs fine in script mode. In load mode the script starts but remains showing the status 'running'. In the task manager, it shows that the TruClient for IE Browser task is not responding.
    I have already added in the HIPS file to make exclusions for :
    C:\HP Loadrunner\bin\LrWebIELauncher.exe
    C:\HP Loadrunner\bin\Vugen.exe
    C:\HP Loadrunner\bin\wlrun.exe
    C:\HP Loadrunner\bin\mdrv.exe
    C:\HP Loadrunner\bin\HP.Utt.StandaloneDebugger.exe
    Any suggestions how to fix this. Thanks

    Hi,
    To trap error message from Forte log, I usually do this
    egrep '(EXCEPTION|Exception|exception|ERROR|Error|error)' filename
    This takes a regular expression to 'egrep' all occurrences of "exception" or
    "error" not matter they are in upper case or lower case.
    Hope this help.
    Regards,
    Peter Sham.
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, March 17, 1999 12:58 AM
    To: Forte-Users (Adresse de messagerie)
    Subject: Reporting after many forte tasks run in
    batch mode ?
    Hi,
    I would like to know if overnight builds went okay, and
    therefore need to parse the log(s).
    The issue is that I don't have a proper string to look for
    (i.e. for grep).
    If I consider 'ERROR", then the following message won't be
    understandable.
    There might a way to cheat with the indentation (i.e. the
    lines with only two first blank chars)..
    Has anyone experimented such a need ?
    J-Paul Gabrielli
    DTS
    SYSTEM ERROR: Service object
    MySuperApplicationServer.MySuperMgrSO has
    not been partitioned. Therefore, you cannot move it to an
    existing partition.
    Class: qqsp_UsageException
    Error #: [1602, 606]
    Detected at: qqcf_StandardConfig::MoveServiceObject at 3
    Error Time: Tue Mar 16 17:39:26
    Exception occurred (locally) on partition
    "Fscript_cl9_Client",
    (partitionId =
    B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1, taskId =
    [B84E6180-D639-11D2-82F2-1863030AAA77:0x244:0x1.1]) in
    application
    "fscript", pid 22713 on node rambo in environment
    SuperEnv.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Scan-vip running only on one RAC node

    Hi ,
    While setting up RAC11.2 on Centos 5.7 , I was getting this error during the grid installation:
    PRCR-1079 : Failed to start resource ora.scan1.vip
    CRS-5005: IP Address: 192.168.100.208 is already in use in the network
    CRS-2674: Start of 'ora.scan1.vip' on 'falcen6b' failed
    CRS-2632: There are no more servers to try to place resource 'ora.scan1.vip' on that would satisfy its placement policy
    PRCR-1079 : Failed to start resource ora.scan2.vip
    CRS-5005: IP Address: 192.168.100.209 is already in use in the network
    CRS-2674: Start of 'ora.scan2.vip' on 'falcen6b' failed
    CRS-2632: There are no more servers to try to place resource 'ora.scan2.vip' on that would satisfy its placement policy
    PRCR-1079 : Failed to start resource ora.scan3.vip
    CRS-5005: IP Address: 192.168.100.210 is already in use in the network
    CRS-2674: Start of 'ora.scan3.vip' on 'falcen6b' failed
    CRS-2632: There are no more servers to try to place resource 'ora.scan3.vip' on that would satisfy its placement policy
    I figured that the scan service is able to run only on one node at a time. When I stopped the service on rac1 and started it on rac2 the service is starting.
    But I think for the grid installation the scan service has to simultaneously run on both the nodes.
    How do I resolve it?
    Any suggestions please.
    PS - I am planning to try with the patch 11.0.2.3 but it will be a while till i get access to it.
    Till then can someone suggest a workaround?

    Hi Balazs Papp and onedbguru,
    I was able to resolve that error by running the following command on rac2, now that part of the installer passed.
    crsctl start res ora.scan1.vip
    However the cluster verification utility is failing at the end of installer.
    When I executed the below command, this is my output:
    [oracle@falcen6a grid]$ ./runcluvfy.sh stage -post crsinst -n falcen6a,falcen6b -verbose
    Performing post-checks for cluster services setup
    Checking node reachability...
    Check: Node reachability from node "falcen6a"
    Destination Node Reachable?
    falcen6a yes
    falcen6b yes
    Result: Node reachability check passed from node "falcen6a"
    Checking user equivalence...
    Check: User equivalence for user "oracle"
    Node Name Comment
    falcen6b passed
    falcen6a passed
    Result: User equivalence check passed for user "oracle"
    Checking time zone consistency...
    Time zone consistency check passed.
    Checking Cluster manager integrity...
    Checking CSS daemon...
    Node Name Status
    falcen6b running
    falcen6a running
    Oracle Cluster Synchronization Services appear to be online.
    Cluster manager integrity check passed
    UDev attributes check for OCR locations started...
    Result: UDev attributes check passed for OCR locations
    UDev attributes check for Voting Disk locations started...
    Result: UDev attributes check passed for Voting Disk locations
    Check default user file creation mask
    Node Name Available Required Comment
    falcen6b 0022 0022 passed
    falcen6a 0022 0022 passed
    Result: Default user file creation mask check passed
    Checking cluster integrity...
    Cluster is divided into 2 partitions
    Partition 1 consists of the following members:
    Node Name
    falcen6b
    Partition 2 consists of the following members:
    Node Name
    falcen6a
    Cluster integrity check failed. Cluster is divided into 2 partition(s).
    Checking OCR integrity...
    Checking the absence of a non-clustered configuration...
    All nodes free of non-clustered, local-only configurations
    ERROR:
    PRVF-4193 : Asm is not running on the following nodes. Proceeding with the remaining nodes.
    Checking OCR config file "/etc/oracle/ocr.loc"...
    OCR config file "/etc/oracle/ocr.loc" check successful
    ERROR:
    PRVF-4195 : Disk group for ocr location "+DATA" not available on the following nodes:
    Checking size of the OCR location "+DATA" ...
    Size check for OCR location "+DATA" successful...
    OCR integrity check failed
    Checking CRS integrity...
    ERROR:
    PRVF-5316 : Failed to retrieve version of CRS installed on node "falcen6b"
    The Oracle clusterware is healthy on node "falcen6b"
    The Oracle clusterware is healthy on node "falcen6a"
    CRS integrity check failed
    Checking node application existence...
    Checking existence of VIP node application
    Node Name Required Status Comment
    falcen6b yes unknown failed
    falcen6a yes unknown failed
    Result: Check failed.
    Checking existence of ONS node application
    Node Name Required Status Comment
    falcen6b no unknown ignored
    falcen6a no online passed
    Result: Check ignored.
    Checking existence of GSD node application
    Node Name Required Status Comment
    falcen6b no unknown ignored
    falcen6a no does not exist ignored
    Result: Check ignored.
    Checking existence of EONS node application
    Node Name Required Status Comment
    falcen6b no unknown ignored
    falcen6a no online passed
    Result: Check ignored.
    Checking existence of NETWORK node application
    Node Name Required Status Comment
    falcen6b no unknown ignored
    falcen6a no online passed
    Result: Check ignored.
    Checking Single Client Access Name (SCAN)...
    SCAN VIP name Node Running? ListenerName Port Running?
    falcen6-scan unknown false LISTENER 1521 false
    WARNING:
    PRVF-5056 : Scan Listener "LISTENER" not running
    Checking name resolution setup for "falcen6-scan"...
    SCAN Name IP Address Status Comment
    falcen6-scan 192.168.100.210 passed
    falcen6-scan 192.168.100.208 passed
    falcen6-scan 192.168.100.209 passed
    Verification of SCAN VIP and Listener setup failed
    OCR detected on ASM. Running ACFS Integrity checks...
    Starting check to see if ASM is running on all cluster nodes...
    PRVF-5137 : Failure while checking ASM status on node "falcen6b"
    Starting Disk Groups check to see if at least one Disk Group configured...
    Disk Group Check passed. At least one Disk Group configured
    Task ACFS Integrity check failed
    Checking Oracle Cluster Voting Disk configuration...
    Oracle Cluster Voting Disk configuration check passed
    Checking to make sure user "oracle" is not in "root" group
    Node Name Status Comment
    falcen6b does not exist passed
    falcen6a does not exist passed
    Result: User "oracle" is not part of "root" group. Check passed
    Checking if Clusterware is installed on all nodes...
    Check of Clusterware install passed
    Checking if CTSS Resource is running on all nodes...
    Check: CTSS Resource running on all nodes
    Node Name Status
    falcen6b passed
    falcen6a passed
    Result: CTSS resource check passed
    Querying CTSS for time offset on all nodes...
    Result: Query of CTSS for time offset passed
    Check CTSS state started...
    Check: CTSS state
    Node Name State
    falcen6b Observer
    falcen6a Observer
    CTSS is in Observer state. Switching over to clock synchronization checks using NTP
    Starting Clock synchronization checks using Network Time Protocol(NTP)...
    NTP Configuration file check started...
    The NTP configuration file "/etc/ntp.conf" is available on all nodes
    NTP Configuration file check passed
    Checking daemon liveness...
    Check: Liveness for "ntpd"
    Node Name Running?
    falcen6b yes
    falcen6a yes
    Result: Liveness check passed for "ntpd"
    Checking NTP daemon command line for slewing option "-x"
    Check: NTP daemon command line
    Node Name Slewing Option Set?
    falcen6b yes
    falcen6a yes
    Result:
    NTP daemon slewing option check passed
    Checking NTP daemon's boot time configuration, in file "/etc/sysconfig/ntpd", for slewing option "-x"
    Check: NTP daemon's boot time configuration
    Node Name Slewing Option Set?
    falcen6b yes
    falcen6a yes
    Result:
    NTP daemon's boot time configuration check for slewing option passed
    NTP common Time Server Check started...
    NTP Time Server "133.243.236.19" is common to all nodes on which the NTP daemon is running
    NTP Time Server "133.243.236.18" is common to all nodes on which the NTP daemon is running
    NTP Time Server "210.173.160.86" is common to all nodes on which the NTP daemon is running
    NTP Time Server ".LOCL." is common to all nodes on which the NTP daemon is running
    Check of common NTP Time Server passed
    Clock time offset check from NTP Time Server started...
    Checking on nodes "[falcen6b, falcen6a]"...
    Check: Clock time offset from NTP Time Server
    Time Server: 133.243.236.19
    Time Offset Limit: 1000.0 msecs
    Node Name Time Offset Status
    falcen6b 15.332 passed
    falcen6a -1.503 passed
    Time Server "133.243.236.19" has time offsets that are within permissible limits for nodes "[falcen6b, falcen6a]".
    Time Server: 133.243.236.18
    Time Offset Limit: 1000.0 msecs
    Node Name Time Offset Status
    falcen6b 15.115 passed
    falcen6a -1.614 passed
    Time Server "133.243.236.18" has time offsets that are within permissible limits for nodes "[falcen6b, falcen6a]".
    Time Server: 210.173.160.86
    Time Offset Limit: 1000.0 msecs
    Node Name Time Offset Status
    falcen6b 15.219 passed
    falcen6a -1.527 passed
    Time Server "210.173.160.86" has time offsets that are within permissible limits for nodes "[falcen6b, falcen6a]".
    Time Server: .LOCL.
    Time Offset Limit: 1000.0 msecs
    Node Name Time Offset Status
    falcen6b 0.0 passed
    falcen6a 0.0 passed
    Time Server ".LOCL." has time offsets that are within permissible limits for nodes "[falcen6b, falcen6a]".
    Clock time offset check passed
    Result: Clock synchronization check using Network Time Protocol(NTP) passed
    Oracle Cluster Time Synchronization Services check passed
    Post-check for cluster services setup was unsuccessful on all the nodes.
    [oracle@falcen6a grid]$
    Any suggestions?

  • Checking if script is running

    I need to find out if a script is not running. When I do the "ps -afe | grep nameOfScript" it gives me no output if the "nameOfScript" is not running. How can I get an output or get a message to say "nameOfScript" is not running. Is there some sort of grep or something I can use to get this to work

    The fact that nothing comes back means the script isn't running - usually. Your script logic is what takes care of saying "Thar ain't nuttin' here honey".
    But using your ps -afe example you need to make sure you only get back instances of the running script. With your example, if I run "vi nameOfScript", your ps -afe command will show my vi command in the list and your script logic may incorrect assumely the script is running when it really isn't.
    You need to make your logic that looks for the script running a bit more specific. The way you run the script will dictate how it shows up in a ps listing. Like this:
    cd /path/to/script
    ./nameOfScript &
    In a "ps -afe", this will show up as the string:
    /bin/ksh ./nameOfScript
    But if you execute it with the full path:
    /path/to/script/nameOfScript &
    It will show up as:
    /bin/ksh /path/to/script/nameOfScript
    So you can see, your logic has to handle all fo these cases. From practical experience, its usually better to have the script create a temporary PID file somewhere. When the script dies, it automagically deletes this file or something. When you check to see if the script is running, you read contents of PID file (assuming it exists), and check a ps listing to see if PID 1234 (or whatever the PID is) is really your script. Kinda a pain in the arse I know but this is usually the best way to handle this.
    Probably more then you asked for ;>

  • Is there a way to have an iPad run only 1 app at a time?

    I am a tech support person and teachers are asking me if we can have a students iPad run only one app at a time. For instance, a group of students in biology would be allowed to run only the app for their biology book.
    Students have gotten so distracted during classtime with iMessage, web browsing, videos and games that it becomes virtually impossible to keep them on task in the classroom.
    I am aware of adding profiles to the devices, but this profile would only be for the biology class. It would then have to be removed or deactivated upon leaving the class.

    You can restrict iPads running iOS 6 to a single app via Guided Access:
    http://support.apple.com/kb/HT5509
    but that requires reconfiguration of the iPads whenever you want to set it up or deactivate or change it. There may be a mobile device management (MDM) system that would allow you to push out such changes "on the fly" but I can't say with certainty. Someone else here or in the iPad in the Enterprise forum may know.
    Otherwise it may be necessary to implement an administrative solution such as banning use of iPads in class or enforcing consequences should a student be using the iPad for inappropriate functions.
    Regards.

  • How to get lauchctl daemons/agents to run only once a day

    How do you get a daemons/agents to run only once a day regardless of the error code of the .sh you are running?
    (not I'm not looking for run once or run on reboot. I want a job to run at 3am every day and it has several bash commands in it. Regardless of the returns by any of the commands in the script, I only want this to run once - NO RESPAWN).

    Ok still not working.. here is the plist
    the .sh file does file processing and then uploads xml files to my server and should run once a day. Here I have it running at 11:45am. It completes and then runs again and again and again.
    The plist is placed in LaunchAgents and loaded with $launchctl load com.iclassicnu.crontabtest.plist
    ideas?
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>label</key>
    <string>com.iclassicnu.crontabtest</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Users/dan/Desktop/iClassicNu/Idea/Forexite/ForexUpdate.sh</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/dan/Desktop/iClassicNu/Idea/Forexite</string>
    <key>OnDemand</key>
    <false/>
    <key>Nice</key>
    <integer>1</integer>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Hour</key>
    <integer>11</integer>
    <key>Minute</key>
    <integer>45</integer>
    </dict>
    <key>StandardErrorPath</key>
    <string>/Users/dan/tmp/icnTest1.err</string>
    <key>StandardOutPath</key>
    <string>/Users/dan/tmp/icnTest1.out</string>
    </dict>
    </plist>

  • Dropping a table only if it exists

    Does anyone have the sql code to drop a table
    only if it exists in dba_tables? We build
    temporary tables for the run of a job. Before we start the job we want to make sure that none of those tables were accidentally left around, so we check for their existence, and if they are present, we drop them. If you try to drop a table that does NOT exist, you get an error and are kicked out of the batch job.

    Just trap the error at drop time and ignore it.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ():
    Does anyone have the sql code to drop a table
    only if it exists in dba_tables? We build
    temporary tables for the run of a job. Before we start the job we want to make sure that none of those tables were accidentally left around, so we check for their existence, and if they are present, we drop them. If you try to drop a table that does NOT exist, you get an error and are kicked out of the batch job.<HR></BLOCKQUOTE>
    null

  • [FIXED] Compiz runs only with emerald and crashes with metacity

    Hey,
    I currently try to use a metacity theme and have compiz enabled but apparently that's something compiz doesn't really like.
    One think i noticed in fusion-icon is that the entire metacity option under: "Select Window Devorator" is just not there.. (or was that always the case?)
    Oke, things i have done so far:
    - Search this forum (obviously) nothing found with a solution
    - Searched the wiki (same results)
    - in gconf-editor /desktop/gnome/session/required_components/windowmanager set to compiz (like said in the Compiz wiki page on archlinux.org
    - disabled metacity as compositing manager (tried with enabled as well but the same results)
    - right now i have the compiz bash script from ubuntu (tweaked a little) and that starts up compiz just fine but not with metacity
    And incase you want the script:
    #!/bin/sh
    # Compiz Manager wrapper script
    # Copyright (c) 2007 Kristian Lyngstøl <[email protected]>
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or
    # (at your option) any later version.
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    # Contributions by: Treviño (3v1n0) <[email protected]>, Ubuntu Packages
    # Much of this code is based on Beryl code, also licensed under the GPL.
    # This script will detect what options we need to pass to compiz to get it
    # started, and start a default plugin and possibly window decorator.
    COMPIZ_BIN_PATH="/usr/bin/" # For window decorators and compiz
    PLUGIN_PATH="/usr/lib/compiz/"
    GLXINFO="/usr/bin/glxinfo"
    KWIN="/usr/bin/kwin"
    METACITY="/usr/bin/metacity"
    XFWM="/usr/bin/xfwm"
    COMPIZ_NAME="compiz" # Final name for compiz (compiz.real)
    # For Xgl LD_PRELOAD
    LIBGL_NVIDIA="/usr/lib/nvidia/libGL.so.1.2.xlibmesa"
    LIBGL_FGLRX="/usr/lib/fglrx/libGL.so.1.2.xlibmesa"
    # Minimum amount of memory (in kilo bytes) that nVidia cards need
    # to be allowed to start
    # Set to 262144 to require 256MB
    NVIDIA_MEMORY="65536" # 64MB
    NVIDIA_SETTINGS="nvidia-settings" # Assume it's in the path by default
    # For detecting what driver is in use, the + is for one or more /'s
    XORG_DRIVER_PATH="/usr/lib/xorg/modules/drivers/+"
    FALLBACKWM="xterm"
    if [ x"$KDE_FULL_SESSION" = x"true" ]; then
    FALLBACKWM="${KWIN}";
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then
    FALLBACKWM="${METACITY}"
    elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then
    FALLBACKWM="${XFWM}"
    fi
    FALLBACKWM_OPTIONS="--replace $@"
    # Driver whitelist
    WHITELIST="nvidia intel ati radeon i810 fglrx"
    # blacklist based on the pci ids
    # See http://wiki.compiz-fusion.org/Hardware/Blacklist for details
    #T=" 1002:5954 1002:5854 1002:5955" # ati rs480
    #T="$T 1002:4153" # ATI Rv350
    #T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965
    T="$T 8086:2a02 " # Intel GM965
    T="$T 8086:3577 8086:2562 " # Intel 830MG, 845G (LP: #259385)
    BLACKLIST_PCIIDS="$T"
    unset T
    COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
    COMPIZ_PLUGINS="core"
    ENV=""
    # Use emerald by default if it exist
    USE_EMERALD="yes"
    # No indirect by default
    INDIRECT="no"
    # Default X.org log if xset q doesn't reveal it
    XORG_DEFAULT_LOG="/var/log/Xorg.0.log"
    # Set to yes to enable verbose
    VERBOSE="yes"
    # Echos the arguments if verbose
    verbose()
    if [ "x$VERBOSE" = "xyes" ]; then
    printf "$*"
    fi
    # abort script and run fallback windowmanager
    abort_with_fallback_wm()
    if [ "x$SKIP_CHECKS" = "xyes" ]; then
    verbose "SKIP_CHECKS is yes, so continuing despite problems.\n"
    return 0;
    fi
    if [ "x$CM_DRY" = "xyes" ]; then
    verbose "Dry run failed: Problems detected with 3D support.'n"
    exit 1;
    fi
    verbose "aborting and using fallback: $FALLBACKWM \n"
    if [ -x $FALLBACKWM ]; then
    exec $FALLBACKWM $FALLBACKWM_OPTIONS
    else
    printf "no $FALLBACKWM found, exiting\n"
    exit 1
    fi
    # Check if we run with the Software Rasterizer, this happens e.g.
    # when a second screen session is opened via f-u-a on intel
    check_software_rasterizer()
    verbose "Checking for Software Rasterizer: "
    if glxinfo 2> /dev/null | egrep -q '^OpenGL renderer string: Software Rasterizer' ; then
    verbose "present. \n";
    return 0;
    else
    verbose "Not present. \n"
    return 1;
    fi
    # Check for non power of two texture support
    check_npot_texture()
    verbose "Checking for non power of two support: "
    if glxinfo 2> /dev/null | egrep -q '(GL_ARB_texture_non_power_of_two|GL_NV_texture_rectangle|GL_EXT_texture_rectangle|GL_ARB_texture_rectangle)' ; then
    verbose "present. \n";
    return 0;
    else
    verbose "Not present. \n"
    return 1;
    fi
    # Check for presence of FBConfig
    check_fbconfig()
    verbose "Checking for FBConfig: "
    if [ "$INDIRECT" = "yes" ]; then
    $GLXINFO -i | grep -q GLX.*fbconfig
    FB=$?
    else
    $GLXINFO | grep -q GLX.*fbconfig
    FB=$?
    fi
    if [ $FB = "0" ]; then
    unset FB
    verbose "present. \n"
    return 0;
    else
    unset FB
    verbose "not present. \n"
    return 1;
    fi
    # Check for TFP
    check_tfp()
    verbose "Checking for texture_from_pixmap: "
    if [ $($GLXINFO 2>/dev/null | grep -c GLX_EXT_texture_from_pixmap) -gt 2 ] ; then
    verbose "present. \n"
    return 0;
    else
    verbose "not present. \n"
    if [ "$INDIRECT" = "yes" ]; then
    unset LIBGL_ALWAYS_INDIRECT
    INDIRECT="no"
    return 1;
    else
    verbose "Trying again with indirect rendering:\n";
    INDIRECT="yes"
    export LIBGL_ALWAYS_INDIRECT=1
    check_tfp;
    return $?
    fi
    fi
    # Check wether the composite extension is present
    check_composite()
    verbose "Checking for Composite extension: "
    if xdpyinfo -queryExtensions | grep -q Composite ; then
    verbose "present. \n";
    return 0;
    else
    verbose "not present. \n";
    return 1;
    fi
    # Detects if Xgl is running
    check_xgl()
    verbose "Checking for Xgl: "
    if xvinfo | grep -q Xgl ; then
    verbose "present. \n"
    return 0;
    else
    verbose "not present. \n"
    return 1;
    fi
    # Check if the nVidia card has enough video ram to make sense
    check_nvidia_memory()
    if [ ! -x "$NVIDIA_SETTINGS" ]; then
    return 0
    fi
    MEM=$(${NVIDIA_SETTINGS} -q VideoRam | egrep Attribute\ \'VideoRam\'\ .*: | cut -d: -f3 | sed 's/[^0-9]//g')
    if [ $MEM -lt $NVIDIA_MEMORY ]; then
    verbose "Less than ${NVIDIA_MEMORY}kb of memory and nVidia";
    return 1;
    fi
    return 0;
    # Check for existence if NV-GLX
    check_nvidia()
    if [ ! -z $NVIDIA_INTERNAL_TEST ]; then
    return $NVIDIA_INTERNAL_TEST;
    fi
    verbose "Checking for nVidia: "
    if xdpyinfo | grep -q NV-GLX ; then
    verbose "present. \n"
    NVIDIA_INTERNAL_TEST=0
    return 0;
    else
    verbose "not present. \n"
    NVIDIA_INTERNAL_TEST=1
    return 1;
    fi
    # Check if the max texture size is large enough compared to the resolution
    check_texture_size()
    # Check how many screens we've got and iterate over them
    N=$(xdpyinfo | grep -i "number of screens" | sed 's/.*[^0-9]//g')
    for i in $(seq 1 $N); do
    verbose "Checking screen $i"
    TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed -n "$i s/^.*=[^0-9]//g p")
    RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed -n -e "$i s/^ *dimensions: *\([0-9]*x[0-9]*\) pixels.*/\1/ p")
    VRES=$(echo $RESOLUTION | sed 's/.*x//')
    HRES=$(echo $RESOLUTION | sed 's/x.*//')
    verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): ";
    if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
    verbose "Failed.\n"
    return 1;
    fi
    verbose "Passed.\n"
    done
    return 0
    # check driver whitelist
    running_under_whitelisted_driver()
    LOG=$(xset q|grep "Log file"|awk '{print $3}')
    if [ "$LOG" = "" ]; then
    verbose "xset q doesn't reveal the location of the log file. Using fallback $XORG_DEFAULT_LOG \n"
    LOG=$XORG_DEFAULT_LOG;
    fi
    if [ -z "$LOG" ];then
    verbose "AIEEEEH, no Log file found \n"
    verbose "$(xset q) \n"
    return 0
    fi
    for DRV in ${WHITELIST}; do
    if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
    ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG;
    then
    return 0
    fi
    done
    verbose "No whitelisted driver found\n"
    return 1
    # check pciid blacklist
    have_blacklisted_pciid()
    OUTPUT=$(lspci -n)
    for ID in ${BLACKLIST_PCIIDS}; do
    if echo "$OUTPUT" | egrep -q "$ID"; then
    verbose "Blacklisted PCIID '$ID' found \n"
    return 0
    fi
    done
    OUTPUT=$(lspci -vn | grep -i VGA)
    verbose "Detected PCI ID for VGA: $OUTPUT\n"
    return 1
    build_env()
    if check_nvidia; then
    ENV="__GL_YIELD=NOTHING "
    fi
    if [ "$INDIRECT" = "yes" ]; then
    ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 "
    fi
    if check_xgl; then
    if [ -f ${LIBGL_NVIDIA} ]; then
    ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}"
    verbose "Enabling Xgl with nVidia drivers...\n"
    fi
    if [ -f ${LIBGL_FGLRX} ]; then
    ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}"
    verbose "Enabling Xgl with fglrx ATi drivers...\n"
    fi
    fi
    ENV="$ENV FROM_WRAPPER=yes"
    if [ -n "$ENV" ]; then
    export $ENV
    fi
    build_args()
    if [ "x$INDIRECT" = "xyes" ]; then
    COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering "
    fi
    if [ ! -z "$DESKTOP_AUTOSTART_ID" ]; then
    COMPIZ_OPTIONS="$COMPIZ_OPTIONS --sm-client-id $DESKTOP_AUTOSTART_ID"
    fi
    if check_nvidia; then
    if [ "x$INDIRECT" != "xyes" ]; then
    COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
    fi
    fi
    # Execution begins here.
    # Read configuration from XDG paths
    if [ -z "$XDG_CONFIG_DIRS" ]; then
    test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager
    for f in /etc/xdg/compiz/compiz-manager.d/*; do
    test -e $f && . $f
    done
    else
    OLD_IFS=$IFS
    IFS=:
    for CONFIG_DIR in $XDG_CONFIG_DIRS
    do
    test -f $CONFIG_DIR/compiz/compiz-manager && . $CONFIG_DIR/compiz/compiz-manager
    for f in $CONFIG_DIRS/compiz/compiz-manager.d/*; do
    test -e $f && . $f
    done
    done
    IFS=$OLD_IFS
    unset OLD_IFS
    fi
    if [ -z "$XDG_CONFIG_HOME" ]; then
    test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager
    else
    test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager
    fi
    # Don't use compiz when running the failsafe session
    if [ "x$GNOME_DESKTOP_SESSION_ID" = "xFailsafe" ]; then
    abort_with_fallback_wm
    fi
    if [ "x$LIBGL_ALWAYS_INDIRECT" = "x1" ]; then
    INDIRECT="yes";
    fi
    # if we run under Xgl, we can skip some tests here
    if ! check_xgl; then
    # if vesa or vga are in use, do not even try glxinfo (LP#119341)
    if ! running_under_whitelisted_driver || have_blacklisted_pciid; then
    abort_with_fallback_wm
    fi
    # check if we have the required bits to run compiz and if not,
    # fallback
    if ! check_tfp || ! check_npot_texture || ! check_composite || ! check_texture_size; then
    abort_with_fallback_wm
    fi
    # check if we run with software rasterizer and if so, bail out
    if check_software_rasterizer; then
    verbose "Software rasterizer detected, aborting"
    abort_with_fallback_wm
    fi
    if check_nvidia && ! check_nvidia_memory; then
    abort_with_fallback_wm
    fi
    if ! check_fbconfig; then
    abort_with_fallback_wm
    fi
    fi
    # load the ccp plugin if present and fallback to plain gconf if not
    if [ -f ${PLUGIN_PATH}libccp.so ]; then
    COMPIZ_PLUGINS="$COMPIZ_PLUGINS ccp"
    elif [ -f ${PLUGIN_PATH}libgconf.so ]; then
    COMPIZ_PLUGINS="$COMPIZ_PLUGINS glib gconf"
    fi
    # enable gnomecompat if we run under gnome
    if [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ] && [ ! -e ~/.compiz-gnomecompat ]; then
    verbose "running under gnome seesion, checking for gnomecompat\n"
    if ! gconftool -g /apps/compiz/general/allscreens/options/active_plugins|grep -q gnomecompat; then
    verbose "adding missing gnomecompat\n"
    V=$(gconftool -g /apps/compiz/general/allscreens/options/active_plugins|sed s/mousepoll,/mousepoll,gnomecompat,/)
    if ! echo $V|grep -q gnomecompat; then
    verbose "can not add gnomecompat, reseting\n"
    gconftool --unset /apps/compiz/general/allscreens/options/active_plugins
    else
    gconftool -s /apps/compiz/general/allscreens/options/active_plugins --type list --list-type=string $V
    fi
    touch ~/.compiz-gnomecompat
    fi
    fi
    # get environment
    build_env
    build_args
    if [ "x$CM_DRY" = "xyes" ]; then
    verbose "Dry run finished: everything should work with regards to Compiz and 3D.\n"
    verbose "Execute: ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS \n"
    exit 0;
    fi
    ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS
    That's it so far.
    So again what i try to do is running compiz with metacity decorations.
    I hope someone can help me here,
    Mark.
    Last edited by markg85 (2009-06-28 00:26:04)

    whoops wrote:
    Wait, what, I thought metacity isn't as window decorator, it is a window manager, right? I don't really get what you're trying to do... maybe install compiz-decorator-gtk and use it instead of emerald?
    edit: aaah, yes, I think you're missing compiz-decorator-gtk, try that, look at fusion icon "window decorator" option again.
    Strange.. i was under the impression that pacman -S compiz-fusion would install GTK and QT decorators... guess not.
    This issue is fixed now. Running metacity decorations now WITH compiz.

Maybe you are looking for

  • 2 iphones, 1 itunes library?

    Can I sync 2 iphones to my itunes library on my iMac? My wife and I both have new iphones and I'm assuming that we can, but I want to be sure.

  • The Built-in iSight Camera in my 13" MBA is ALWAYS blurry ... see sample

    Surely I'm not the only one? Lens is clean. Lots of light. Different apps. It just always looks blurry. See screenshot http://cl.ly/040g2E383V142U272R1S Stefan

  • More Sound Bugs

    OS 10.5.1 doesn't recognize the onboard speakers on my Powerbook G4. Headphones work fine. This is new since upgrading.

  • Having trouble viewing USA subscription service be...

    I'm planning to be in Europe for the next month and wanted to buy a subscription(s) that would: 1) enable me to call the USA cheaply (landlines and mobile), 2) enable me to call USA mobile numbers cheaply when mobiles are also in Europe 3) call Europ

  • Wont play audio cds

    Hi, this issue has been going on for a while but I decided to take another stab at hopefuly resolving it. Whenever I insert a audio CD in my iMac it ejects the CD after approximatley 10 seconds, DVDs work fine. Any ideas what's causing this issue are