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
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
After struggling a lot. I downgraded my VSCode to 1.65. No need to change owner or permission.
Follow these steps –
Uninstall vscode by running below command
Download vs 1.65 from here –
https://update.code.visualstudio.com/1.65.2/linux-deb-x64/stable
Double-click and install
Once installed, launch vscode from the code repository( considering I am at my code repo directory so using ".")