_partials/windows_browser.md
To be sure that you can interact with your browser installed on Windows from your Ubuntu terminal, we need to set it as your default browser there.
:warning: You need to execute at least one of the following commands below:
<details> <summary>Google Chrome as your default browser</summary>Run the command:
ls /mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe
Did you get an error like ls: cannot access...?
Run the following commands:
echo "export BROWSER=\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'\"" >> ~/.zshrc
Run the following commands:
echo "export BROWSER=\"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'\"" >> ~/.zshrc
Run the command:
ls /mnt/c/Program\ Files\ \(x86\)/Mozilla\ Firefox/firefox.exe
Did you get an error like ls: cannot access...?
Run the following commands:
echo "export BROWSER=\"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files/Mozilla Firefox/firefox.exe'\"" >> ~/.zshrc
Run the following commands:
echo "export BROWSER=\"/mnt/c/Program Files (x86)/Mozilla Firefox/firefox.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files (x86)/Mozilla Firefox/firefox.exe'\"" >> ~/.zshrc
Run the commands:
echo "export BROWSER=\"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'\"" >> ~/.zshrc
Restart your terminal.
Then please make sure that the following command returns "Browser defined 👌":
[ -z "$BROWSER" ] && echo "ERROR: please define a BROWSER environment variable ⚠️" || echo "Browser defined 👌"
If it does not,
:heavy_check_mark: If you got this message, you can continue :+1:
:x: If not, choose a browser in the list above and execute the corresponding command. Then don't forget to reset your terminal:
exec zsh
Do not hesitate to contact a teacher.