Macos – Stop Pulse Secure from opening at startup

junipermacosvpn

I have installed Juniper's Pulse Secure VPN utility and it automatically opens at startup. Unfortunately, the app doesn't behave like any other, i.e., I cannot disable it through:

System Preferences → Users & Groups → Login Items

I've done some research on the Internet and I found that the file that is responsible for the startup opening is:

/Library/LaunchAgents/net.pulsesecure.pulsetray.plist

If I delete the file, Pulse Secure doesn't open at startup, but whenever I open it, it won't work as expected (won't connect to any VPN).

Does anyone know how to prevent it from opening at startup AND make it work at the same time?

I attach the content of the file if it's of some aid:

<?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>net.pulsesecure.pulsetray</string>
    <key>LimitLoadToSessionType</key>
    <array>
        <string>Aqua</string>
    </array>
    <key>ProgramArguments</key>
    <array>
        <string>/Applications/Pulse Secure.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    <key>Disabled</key>
    <false/>
</dict>
</plist>

Best Answer

https://kb.pulsesecure.net/articles/Pulse_Secure_Article/KB26679

Using Automater, create an app to run the following script during boot:

launchctl unload –w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist

This prevents Pulse from launching at boot.

Save this .app file, and add it to your Login Items