OneIdentity / SCALUS

SCALUS -- Session Client Application Launch Uri System
Apache License 2.0
11 stars 3 forks source link

Scalus Window Stays Open #58

Closed CodyBatt closed 1 year ago

CodyBatt commented 3 years ago

I've configured scalus to launch visual studio code with vscode://. But I noticed that when it launches vs code the scalus window stays open in the background. I can close it manually and this doesn't affect visual studio code. Is it possible to automatically exit after launching?

image

MiriamMcMahon commented 3 years ago

@CodyBatt Could you share your configuration from scalus.json for this application please, so that I can reproduce it

CodyBatt commented 3 years ago

Okay. Here it is.

To launch do: explorer vscode://C:/path/to/file

{
  "protocols": [
    {
      "protocol": "rdp",
      "appId": "windows-rdp"
    },
    {
      "protocol": "ssh",
      "appId": "windows-openssh"
    },
    {
      "protocol": "telnet",
      "appId": null
    },
    {
      "protocol": "vscode",
      "appId": "vs-code"
    }
  ],
  "applications": [
    {
      "id": "vs-code",
      "name": "Visual Studio Code",
      "description": "Launch VS Code",
      "platforms": [
        0,
        1,
        2
      ],
      "protocol": "vscode",
      "parser": {
        "parserId": "url",
        "options": null,
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd",
      "args": [
        "%Path%"
      ]
    },
    {
      "id": "windows-rdp",
      "name": "Windows RDP Client",
      "description": "Run MS Windows RDP Client with a default connection file, which can be customized by the examplePlugin.pl perl script ",
      "platforms": [
        0
      ],
      "protocol": "rdp",
      "parser": {
        "parserId": "rdp",
        "options": [
          "waitForInputIdle"
        ],
        "useDefaultTemplate": true,
        "useTemplateFile": null,
        "postProcessingExec": "C:/strawberry/perl/bin/perl.exe",
        "postProcessingArgs": [
          "%AppData%/examplePlugin.pl"
        ]
      },
      "exec": "C:\\windows\\system32\\mstsc.exe",
      "args": [
        "%GeneratedFile%"
      ]
    },
    {
      "id": "windows-rdp-withtemplate",
      "name": "Windows RDP Client with template",
      "description": "Run MS Windows RDP Client with a user-supplied connection file: exampleRdpTemplate.rdp",
      "platforms": [
        0
      ],
      "protocol": "rdp",
      "parser": {
        "parserId": "rdp",
        "options": [
          "waitForInputIdle"
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": "%AppData%\\exampleRdpTemplate.rdp",
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "C:\\windows\\system32\\mstsc.exe",
      "args": [
        "%GeneratedFile%"
      ]
    },
    {
      "id": "freerdp",
      "name": "FreeRDP",
      "description": "Run FreeRdp client with the supplied connection settings",
      "platforms": [
        1
      ],
      "protocol": "rdp",
      "parser": {
        "parserId": "rdp",
        "options": [
          ""
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/xfreerdp",
      "args": [
        "/u:%User%",
        "/v:%host%:%Port%",
        "/p:Safeguard"
      ]
    },
    {
      "id": "windows-openssh",
      "name": "Windows OpenSSH",
      "description": "Run the Windows OpenSSH client. An auth key can be provided by adding the '-i, keypath' arguments.",
      "platforms": [
        0
      ],
      "protocol": "ssh",
      "parser": {
        "parserId": "ssh",
        "options": [
          ""
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "C:\\Windows\\System32\\OpenSSH\\ssh.exe",
      "args": [
        "-l",
        "%User%",
        "%Host%"
      ]
    },
    {
      "id": "gnome-terminal-ssh",
      "name": "Gnome Terminal SSH",
      "description": "Run Open Gnome Terminal on Linux to connect to SSH. An SSH key can be provided by adding the '-i, keyfile' args",
      "platforms": [
        1
      ],
      "protocol": "ssh",
      "parser": {
        "parserId": "ssh",
        "options": [
          ""
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/gnome-terminal",
      "args": [
        "-x",
        "ssh",
        "-t",
        "-l",
        "%User%",
        "%Host%"
      ]
    },
    {
      "id": "mac-ssh",
      "name": "MAC TerminalSSH",
      "description": "Run Open Terminal on Mac OS with the SSH connection information",
      "platforms": [
        2
      ],
      "protocol": "ssh",
      "parser": {
        "parserId": "ssh",
        "options": [
          "waitforexit"
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/open",
      "args": [
        "-b",
        "com.apple.terminal",
        "%OriginalURL%"
      ]
    },
    {
      "id": "mac-rdp",
      "name": "Mac RDP",
      "description": "Run MS Windows RDP on MAC using default connection settings",
      "platforms": [
        2
      ],
      "protocol": "rdp",
      "parser": {
        "parserId": "rdp",
        "options": [
          "wait:60"
        ],
        "useDefaultTemplate": true,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/open",
      "args": [
        "-nb",
        "com.microsoft.rdc.macos",
        "%GeneratedFile%"
      ]
    },
    {
      "id": "putty-ssh",
      "name": "Putty",
      "description": "Run the Putty client to connect using SSH. An SSH key can be provided by adding the '-i, keyfile' args",
      "platforms": [
        0
      ],
      "protocol": "ssh",
      "parser": {
        "parserId": "ssh",
        "options": [
          ""
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "C:\\Program Files\\PuTTY\\putty.exe",
      "args": [
        "-ssh",
        "%user%@%host%"
      ]
    },
    {
      "id": "putty-telnet",
      "name": "Putty Telnet",
      "description": "Run the Putty client to connect using telnet",
      "platforms": [
        0
      ],
      "protocol": "telnet",
      "parser": {
        "parserId": "telnet",
        "options": [
          ""
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": null,
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "C:\\Program Files\\PuTTY\\putty.exe",
      "args": [
        "-telnet",
        "%user%@%host%"
      ]
    },
    {
      "id": "remmina-rdp",
      "name": "remmina Rdp client",
      "description": "Run Remmina client on linux to connect to RDP using a user-supplied template:rdp.remmina",
      "platforms": [
        1
      ],
      "protocol": "rdp",
      "parser": {
        "parserId": "rdp",
        "options": [
          "waitforexit"
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": "%AppData%/rdp.remmina",
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/remmina",
      "args": [
        "%GeneratedFile%"
      ]
    },
    {
      "id": "remmina-ssh",
      "name": "remmina SSH client",
      "description": "Run Remmina client on Linux to connect to SSH using a user-supplied template:ssh.remmina",
      "platforms": [
        1
      ],
      "protocol": "ssh",
      "parser": {
        "parserId": "ssh",
        "options": [
          "waitforexit"
        ],
        "useDefaultTemplate": false,
        "useTemplateFile": "%AppData%/ssh.remmina",
        "postProcessingExec": null,
        "postProcessingArgs": null
      },
      "exec": "/usr/bin/remmina",
      "args": [
        "%GeneratedFile%"
      ]
    }
  ]
}