Closed SebiBasti closed 1 year ago
Just adding that this is very common now, not only for the setup session that Sebi is commenting on. The students end up pasting all the commands and then when they reach the step of Github CLI, it is impossible to open a browser from the terminal. Data students too, but for them is more crucial because they use Jupyter notebook.
👋 Thanks for flagging! Which partial, in you opinion, should we update? What would be the wording?
PR welcomed 🙇 🙂
@ssaunier I created a PR 👌
Now the setting the browser section is before the dotfiles section so it will undo the changes.
First the browser step sets the EDITOR in the zshrc here
Then the dotfiles step replaces the current zshrc with the lewagon zshrc and undos the EDITOR change.
@ElvisDot I'm not sure I follow, could you please open a PR and have @sebibasti + @ogiles1999 as reviewer? Thanks!
@ElvisDot I'm not sure I follow, could you please open a PR and have @SebiBasti + @ogiles1999 as reviewer? Thanks!
Im a bit too lazy to do that now sorry :stuck_out_tongue_winking_eye:
Its a chicken egg situation :chicken: :egg: . So the browser setup step is before the gh setup step so it opens the browser when authenticating with github. The gh is needed to clone the dotfiles. The dotfiles step then replaces the zshrc edit which added the EDITOR variable.
# https://github.com/ElvisDot/setup/blob/8eb7d0cc6b7bd6514b26fd9949791cc22135fe05/windows.md#linking-your-default-browser-to-ubuntu
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
# https://github.com/lewagon/setup/blob/8eb7d0cc6b7bd6514b26fd9949791cc22135fe05/windows.md#github-cli
# we login expecting the BROWSER to be set in the zshrc
gh auth login -s 'user:email' -w
# https://github.com/lewagon/dotfiles/blob/adf05d5bffffc08ad040fb9c491ebea0350a5ba2/install.sh#L9
# now the lewagon dotfiles step undoes the EDITOR set in the zshrc
# which now causes the common data issue that jupyter notebook is not opening the browser
mv ~/.zshrc ~/.zshrc.backup
The way I see it either the browser setup step has to be done twice. Or the student has to manually click the link on the github auth step. Or the dotfiles script has to also copy over the BROWSER variables when setting up the zshrc.
I guess updating the dotfiles script with the correct browser variables should do the trick.
In the current implementation of the setup the section
Linking your default browser to Ubuntu
causes a lot of tickets. In yesterdayswindows setup day
for Germany we had many problems with this because students collapse the section for their specific browser and then execute all the commands and unfortunately often don't realise theIf you get an error like
condition. We've been discussing different ways of formating this:if you get an error like
section in another collapsableI wanted to open this issue to start a discussion on how we could make this section better. @v-natalia, @mdik & @ElvisDot anything you want to add?