-
Notifications
You must be signed in to change notification settings - Fork 37
/
ssh-askpass.plist
23 lines (23 loc) · 947 Bytes
/
ssh-askpass.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.github.theseal.ssh-askpass</string>
<key>LimitLoadToSessionType</key>
<string>Aqua</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-pc</string>
<string>#!/bin/sh
launchctl setenv SSH_ASKPASS "${SSH_ASKPASS:=/usr/local/bin/ssh-askpass}"
launchctl setenv SUDO_ASKPASS "${SUDO_ASKPASS:=/usr/local/bin/ssh-askpass}"
launchctl list org.xquartz.startx >/dev/null || launchctl setenv DISPLAY "${DISPLAY:=ssh-askpass}" # only if not already set by Xquartz
launchctl stop com.openssh.ssh-agent # to make sure it picks up environment
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>