Skip to content

Instantly share code, notes, and snippets.

@Bnux256
Last active December 26, 2023 09:04
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bnux256/733cd8fd0e29e02144a300e03438d834 to your computer and use it in GitHub Desktop.
Save Bnux256/733cd8fd0e29e02144a300e03438d834 to your computer and use it in GitHub Desktop.
Chromebook Crostini Python Development Setup

Chromebook Crostini Python Development Setup

Updating the Debian container

sudo apt update
sudo apt dist-upgrade

Installing Nano

sudo apt install nano

Installing Python

sudo apt-get install python3 python3-dev python3-pip
After installing Python, you need to add ~/.local/bin/ to your Bash PATH: To open ~/.profile, run: nano ~/.profile and add these lines to the end of the file.

# Add local bin to PATH
export PATH="$PATH:$HOME/.local/bin"

To save and exit, press ctrl + x, y, and then Enter. Then run source ~/.profile to load the new environment variable to the current terminal session.

Installing VSCode - Non native version - Instructions from Microsoft's website.

"Go to the Visual Studio Code Download page. From there, you need to pick the right package for your Chromebook:

  • For Chromebooks running an Intel or AMD chip, pick the .deb in variant 64 bit.
  • If your Chromebook is running on an ARM64 chip (like the one I'm testing with), pick the .deb package in the variant ARM64 instead.
    After you've downloaded VS Code, you'll find the package in your Downloads folder. Double-click on the package to launch the installer."

Installing Code-Server - Faster, Touch Friendly and Native VSCode

Code-Server decouples VSCode from Electron. Instead, it runs headlessly with a web server. So you can use it through the browser. This works very nicely with ChromeOS and Crostini since it completely bypasses the Wayland proxy and VGPU. Instead, you get a faster and responsive UI in a browser/PWA app.

To install Code-Server run this command: curl -fsSL https://code-server.dev/install.sh | sh. To start it run code-server. If you wish to start it automatically everytime Crostini is open, run: sudo systemctl enable --now code-server@$USER. To open Code-Server go to: localhost:8080 \

To disable the password run nano ~/.config/code-server/config.yaml and change the auth to 'none'. (See image)
To turn the Code-Server tab into a PWA native web app, follow the instructions in the image.

@Bnux256
Copy link
Author

Bnux256 commented Aug 10, 2021

configScreenshot

@Bnux256
Copy link
Author

Bnux256 commented Aug 10, 2021

PWAApplication

@Arafat-B
Copy link

This was helpful for me. I use a chrome book for most of my programming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment