Skip to content

Instantly share code, notes, and snippets.

@nelsonjchen
Last active July 4, 2021 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelsonjchen/5fdbe872e33c26cb53d3301889f323f8 to your computer and use it in GitHub Desktop.
Save nelsonjchen/5fdbe872e33c26cb53d3301889f323f8 to your computer and use it in GitHub Desktop.

Code-Server is a text editor server you can install and run on your EON/C2 to get a nicer GUI for editing files. It is a fork of Microsoft's Visual Studio Code.

.. insert screenshot here of code server ..

This is particularly useful for devices such as the EON or Comma Two where a GUI on the device isn't available.

Obtain SSH access to your EON/C2 first at https://github.com/commaai/openpilot/wiki/SSH .

Installing Code-Server

Run these commands on your EON/C2 via SSH:

curl -fsSL https://code-server.dev/install.sh | XDG_CACHE_HOME=/data/cache sh -s -- --method standalone --prefix=/data/code-server

Running Code-Server

Run this command on your EON/C2 via SSH when you want to use the installed code-server installation :

/data/code-server/bin/code-server --auth none --bind-addr 0.0.0.0:8080 --user-data-dir /data/.local/share/code-server --config /data/.config/code-server/config.yaml

Then visit your device in your web browser at http://<device ip address here>:8080 and get a text editor from which you can open the folder of /data/openpilot from the File menu.

Note that this is not official VS Code and not everything works, is available, or solid. But it should be a lot more comfortable to edit files in this for those who are not used to the terminal.

Uninstalling Code-Server

For when you want to uninstall code-server off your EON/C2 via SSH:

rm -rf /data/code-server/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment