Post

Setup VSCode for Linux GUI on Termux

Setup VSCode for Linux GUI on Termux

Prerequisition

  • Termux installed
  • Linux GUI installed(Debian or Ubuntu)
  • Browser Installed(recommend Firefox)

Installation

Download VSCode from official website: https://code.visualstudio.com/download

You should download arm-64 version of VSCode for Android Device

If downloaded, type following command in the terminal

1
sudo dpkg -i "{downloaded .dep file path}"

You may type below to open VSCode in your xfce or KDE environment

1
code --no-sandbox

but since the --no-sandbox option is not a default, we are not able to open vscode directly by click or command. we have to set it for easy-open.

Settings for VSCode

Make a command alias

Open terminal

1
vi ~/.bashrc

.zshrc for oh-my-zsh user, bash is the default.
paste the text at the end of lines

1
alias code 'code --no-sandbox'

reload it

1
source ~/.bshrc

Install kerying(for Xcfe-4 user, Optional)

KDE has the build-in keyring application called KWallet.
but xcfe desktop doesn’t have any built-in kerying, so we need to install one for VSCode Sign in.
I’ll use the gnome-keyring which is VSCode recommended.
Open the terminal

1
sudo apt install gnome-keyring

Now we can open the VSCode using the keyring via

1
code --password-store="gnome-libsecret"

combine with --no-sandbox option, apply it to the .bashrc file as described above. Screenshot_2025-03-03_23-47-42 see line 115

While you Signing in with github, you may stuck in the redirection page. if so, click cancel in the VSCode loading block, and let it signin through localhost(it will suggest it when you cancel)

for me, it happened both of KDE and Xcfe environment.

Make a desktop Shortcut

at the desktop.
right click -> Create a Launcher
fill as below:

  • Name: VSCode
  • Command: bash -c 'code --no-sandbox --password-store="gnome-libsecret"'
  • Icon: double click the empty square to open icon-search box, and type ‘code’ to find VSCode icon

It makes a clickable VSCode icon in the desktop

Result

Screenshot_2025-03-04_00-38-00 Now we got a VSCode for Coding! enjoy it :D

This post is licensed under CC BY 4.0 by the author.