Environment not being loaded (Dotfiles)

Hello, amazing Hubbers and GitHub users! How y’all doing?

I’m facing some problems with Codespaces (:see_no_evil:).

I followed the VS Codespaces tutorial for setting up a Dotfiles repository (https://github.com/ovflowd/dotfiles).

And every time I initialize my Codespace (Tried to re-create it), the Environment is not loaded (The bash script for setting up the environment is not executed), although the repository files are definitely there.

So I imagine that the script is just not being executed. If I manually execute the script on Codespaces terminal, everything goes well.

Also, I’m not able to load any Monospace font at all. On my setup script I’m trying to install some Nerd Fonts for OhMyZSH, I see the command succeeding, but when I change the settings to use that font, it just doesn’t work :cry:

So these are my only issues right now with Codespaces! Cool job!

Nitpick: It would be cool to have a terminal button directly on the bottom bar.

1 Like

It looks like you may have some git clones going on in your dotfiles. Are any of these in private repos? GitHub tokens are scoped to the repo, so I’m wondering if something like that might be going on.

In terms of fonts, the fonts need to be accessible from the browser if you are using the web client which is harder than it sounds. If you use the VS Code extension to access the Codespace, then your fonts can be local - that would be the easiest path to access them.

1 Like

Yes, there are repositories being cloned… But all public! Just the normal ZSH repositories (plugins and oh-my-zsh).

You can definitely see them by opening my dotfiles repository.

As I said, when I run the setup.sh directly on Codespace terminal, it works.

About the fonts, it makes perfectly sense, how I didn’t figured it out.

Maybe I could inject the fonts via script on browser level… I already have the fonts installed on my local machine, so I believe the browser does has access to the fonts of my machine, doesn’t?

Just to double check, I assume you mean install.sh? Or is there another setup script too?

Does the setup get all the way through the creation and fail to load the folders, or do you see an error in the log?

If you do get an error log, it would be great to see it. Otherwise if you’re seeing it just fail, we typically see that if bash itself is bombing, which I could see happening with a .bashrc update of some sort… tracking down what is the trick. I’m wondering if it is somehow cloning your dotfiles repo as root.

Well, yes, I meant install.sh

Nope, there are no errors, as I said if I run it manually it works.

I did not find any errors log by searching /var/logs or other log files on the GitHub Codespaces Terminal :sweat_smile:

Also, as I said the install script isn’t being executed at all on the initialize of the Codespace, although it’s being cloned :eyes: (the dotfiles repo)

Ah! Sorry, thought “the environment is not loaded” meant that the Codespace didn’t start.

I’m actually unsure why you’re not seeing it work. I tried myself and I see the fonts were copied to ~/.fonts and when I start zsh I see your customized prompt – all of which indicates install.sh was fired. Is there a particular repo you are trying Codespaces with?

I see!

This is very interesting, since I’m sure it did not run. I tried it with one of my personal repositories, https://github.com/ovflowd/ovflowd.github.io

I will test it definitively again!

Thanks for the help, tho! :wink:

Issue fixed. As you said, I just had to install the font locally on my System and ask to Codespaces to use it. It totally makes sense, since it is after all being displayed by my browser.

I also made several updates in the repository :slight_smile:

@ovflowd how did you configure your browser to use nerdfonts? for me fonts in desktop client works fine, but not able to display correctly in browser.

Just install the Nerd font on your computer :slight_smile:

If I recall correctly, Safari does not pick up desktop fonts if you are using that. Try Chrome/Edge and see if that resolves it.

Safari does pick them up, if you install them as a “Web” font :stuck_out_tongue: