w0lfschild / cDock

:lollipop: Basic dock customization for macOS
https://cdock.macenhance.com/
152 stars 19 forks source link

Login items bug #47

Closed ghost closed 8 years ago

ghost commented 8 years ago

Why do i have to fill in my password for 4 times each time when I log in?

screenshot 2015-10-21 20 47 46

ghost commented 8 years ago

This issue also occurs when I run cDock 2 manually.

w0lfschild commented 8 years ago

Because it's trying to install SIMBL and SIP is preventing it from doing so and the maximum times it asks before giving up is 4.

ghost commented 8 years ago

@w0lfschild but I have SIMBL installed and there is a bundle there (visible via EasySIMBL app).

w0lfschild commented 8 years ago

https://github.com/w0lfschild/cDock2/blob/master/cDock/cDock-GUI/cDock-Agent.app/Contents/Resources/simbl.sh

#! /bin/bash

myvar=1

simbl_check() {
    echo "SIMBL check #$myvar"
    if [[ $myvar < 5 ]]; then
        locSIMBL=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" /System/Library/ScriptingAdditions/SIMBL.osax/Contents/Info.plist)
        curSIMBL=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$simbl_inst"/Contents/Resources/SIMBL.osax/Contents/Info.plist)
        # echo -e "loc: $locSIMBL\ncur: $curSIMBL" > ~/Desktop/test.txt
        if [[ -e /Library/ScriptingAdditions/SIMBL.osax || ! -e /System/Library/ScriptingAdditions/SIMBL.osax || ! -e /System/Library/LaunchAgents/net.culater.SIMBL.Agent.plist || ! -e /Library/Application\ Support/SIMBL/Plugins || -h /Library/Application\ Support/SIMBL/Plugins ]]; then
            open "$simbl_inst"
            install_simbl
        elif [[ "$locSIMBL" != "$curSIMBL" ]]; then
            open "$simbl_inst"
            install_simbl
        fi
    fi
}

install_simbl() {
    # echo "But Beyonce had the greatest albumn of all time"
    inst_id1=$(ps ax | grep [c]Dock-Installer | sed -e 's/^[ \t]*//' | cut -f1 -d" ")

    # If dock has been restarted it will have a new ID
    while [[ $inst_id1 != "" ]]; do
        inst_id1=$(ps ax | grep [c]Dock-Installer | sed -e 's/^[ \t]*//' | cut -f1 -d" ")
        sleep .5
    done

    myvar=$(( myvar + 1 ))
    simbl_check
}

You can view the logs of the agent at "$HOME"/Library/Application\ Support/cDock/logs/agent.log

ghost commented 8 years ago

Sorry, this issue is with cDock 2.