Configure default browser

Hi I am using a command line tool from the gitpod terminal that opens the default browser for authentication.

However it seems to be starting the gitpod preview browser but for some reason this browser is not able to properly render the page.

I have tried some options to configure the browser or do something like gp preview --external but it always opens inside the preview browser.

IS thre any option to configure this. Openning the window on another tab browser window will be the ideal.

Did you try to set the BROWSER environment variable

export BROWSER=gp-preview --external
1 Like

Nope it doesn’t help. Some other interesting error is that this app I am testing is using Azure AD and when I copy the URL from the preview browser to the external browser it reports something like invalid base64 encoding.

Is there a way to reproduce? Example repo?

The following trick works for gcloud to open an external browser for authentication:

cat > /workspace/browse.sh << EOF
#!/bin/sh
/usr/bin/gp-preview --external \$@
EOF
chmod +x /workspace/browse.sh
export BROWSER=/workspace/browse.sh

Maybe it works for you as well.

Thanks. This tip helped. I am still struggling because the tool tries to return to localhost and it doesn’t find that port.