WSL: Firefox for Golang default browser

I used a tool called aws-okta. It’s implemented in Go language. ‘login’ command will open generated URL in browser.

Environments where aws-okta login and aws-okta exec are known to work include:


aws-okta/ at master · segmentio/aws-okta

The page above doesn’t say WSL as one of known to work env.

Indeed, it didn’t work. It complained about ‘xdg-open’ not found. I didn’t want to install this tool. This tool doesn’t have much value for WSL users. WSL has it’s own similar tool , for example wslstart, which will open specified file in appropriate Windows native app.

So, I searched alternative. Sadly, Go standard library doesn’t seem to read any environment variable for alternative browser(e.g. Firefox,Chrome)  as the thread below shows.

there’s OS-specific ways to open things in a browser

cmd/internal/browser: Open() shouldn’t rely on Commands() · Issue #33148 · golang/go

So, I installed xdg-open with ‘sudo apt install’ .  This is not the end of the story. I ended up using 2 environment variables like below.

$ sudo \
  PATH="$PATH:/mnt/c/Program Files/Mozilla Firefox" \
  BROWSER=firefox.exe \
  ~/go/bin/aws-okta login my_profile
[sudo] password for myWSLusername:
Enter passphrase to unlock /home/myWSLusername/.aws-okta/:
INFO[0006] Requesting MFA. Please complete two-factor authentication with your second device
INFO[0006] Select a MFA from the following list
INFO[0006] 0: OKTA (token:software:totp)
INFO[0006] 1: OKTA (push)
Select MFA method: 0

Enter MFA Code: abcdxxxxxxx

There’s related discussion below. But I don’t think the thread covers all solutions for various kinds of envs.

You can set the BROWSER variable.

bash – Open browser in host system from Windows Subsystem for Linux? – Super User

Hope this helps some Windows mate!

Another workaround is to have aws-okta to spit out the generated URL on stdout.

Miro: PDF or image export

最近Miro Realtime Boardを見る機会が増えました。日本語の記事は以下など見つかりましたがまだ少なそうです。








  1. 赤:ボードと同じ名前のPDFファイルが生成される。上ではAcrobat Readerで開いてます。
  2. 青:1枚目のフレームがPDFの1ページ目になります。
  3. 緑:2枚目の frame がPDFの2ページ目になります。
  4. フレームの外はPDFには含まれない。

なんか不思議ですが Miro のフレームって額縁みたいなもんでその中だけ見てくださいってものなんだと思います。

全体を保存(export)したいときはSave As Imageの方が良さそうです。


全体が含まれるようにボードを縮小後に Vector PDF で保存できます。上のような画面になりますが赤で示したコーナーの4つの枠は動かせません笑。


$ pdftotext エクスポートテスト-2.pdf - |head -4
If Yes, Action 1