skip to Main Content

I’ve installed vscode on my ubuntu and I’m trying to run it with root privileges.
I understand there is a problem with this version and root privileges.
I use this command from my terminal:

sudo code /my_fils –user-data-dir=’.’ –no-sandbox

but when running it vscode opens a blank and white screen with super-user definition on top but with nothing else.
I know there was a problem with this configuration and I found this issue in this link :
https://code.visualstudio.com/updates/v1_59#_progress-for-electron-sandbox-support

I’ve tried the following but the outcome is the same:

sudo chown root /chrome-sandbox
sudo chmod 4755 /chrome-sandbox

running vscode without the root privilege works.

I’m using ubuntu 20.04 and my vscode version is 1.70.2

is there a workaround for it?

thanks !!

2

Answers


  1. Yes, this seems to be an issue try 1.65.x it might run. encountered the same when installing a fluent theme.

    Checkout : https://github.com/microsoft/vscode/issues/146847

    Login or Signup to reply.
  2. After struggling a lot. I downgraded my VSCode to 1.65. No need to change owner or permission.

    Follow these steps –

    1. Uninstall vscode by running below command

      sudo apt purge code
      
    2. Download vs 1.65 from here –
      https://update.code.visualstudio.com/1.65.2/linux-deb-x64/stable

    3. Double-click and install

    4. Once installed, launch vscode from the code repository( considering I am at my code repo directory so using ".")

      sudo code . --user-data-dir='.' --no-sandbox
      
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search