public void StartCygwinSocket()
{
var pagent = agent as PageantAgent;
if (pagent == null)
return;
try {
pagent.StopCygwinSocket();
pagent.StartCygwinSocket(Environment.ExpandEnvironmentVariables(
Options.CygwinSocketPath));
} catch (Exception ex) {
MessageService.ShowWarning("Failed to start Cygwin socket:",
ex.Message);
// TODO: show better explanation of common errors.
}
}