Setting the default browser when using EYK CLI on WSL


Attempting to log in using eyk ssologincommand or executing eyk open on the EYK CLI tool on WSL (Windows Subsystem for Linux) to connect to your application's URL fails to open the application in your default browser.


The ssologin command uses your default browser to authenticate.

In order for the authentication process to succeed, a default browser needs to be specified on the WSL. 
This can be achieved using the wslview utility and setting the $BROWSER environment variable to  'BROWSER=wslview'. wslview is a WSL browser emulator that can help you open links in the default Windows browser or open files on Windows from WSL.

The utility is pre-installed by default when using the latest Ubuntu releases on WSL but can also be added/updated on other Linux distros by installing wslu which provides a collection of utilities for Windows 10 Linux Subsystem.

Refer to the Github repository at wslu - A collection of utilities for WSL for the installation instructions applicable to your WSL Linux environment.


Use the EYK ssologin command to login:

  1. Open a CLI command line sesison.
  2. Obtain the CLI login URL for your application and execute the command from the CLI. See Getting Started with Engine Yard Kontainers for more information on this step.
  3. Expected result:
    1. Logged user <user-name> (<email-address>) in.
    2. At the same time your default browser should automatically be launched and display the following on a new tab, confirming successful authentication:


Article is closed for comments.