简体   繁体   English

空白 window vscode 作为 root

[英]Blank window vscode as root

it's been a long time that i run vscode as root via this command (ubuntu 20.04.4 LTS):我通过这个命令以 root 身份运行 vscode 已经很长时间了 (ubuntu 20.04.4 LTS):

> sudo code --user-data-dir="~/.vscode-root"

Today, i used the same command to execute vscode as root, but i don't have the same result.今天,我使用相同的命令以 root 身份执行 vscode,但我没有得到相同的结果。 in this time, i have a blank window.这一次,我有一个空白window。

i tried to remove it + remove /$Home/Code and.vscode folder install it again but i have the same problem, i tried to use the same command with other flags without being able to solve it.我试图删除它 + 删除 /$Home/Code 和 .vscode 文件夹再次安装它但我有同样的问题,我试图对其他标志使用相同的命令但无法解决它。

Flags tried : --disable-gpu    ///  --disable-features=CalculateNativeWinOcclusion

is there a way to delete (package + config) and all data of vscode to install it properly again?有没有办法删除(包+配置)和vscode的所有数据以重新正确安装?

screen shot截屏

Any idea?任何的想法? Thank you & have a nice day感谢您有一个愉快的一天

That works for me on VSCodium :这对我适用于VSCodium

sudo su -c "codium --user-data-dir="/root" --no-sandbox && sleep infinity"

For some reason, vscode does not start with sudo , but it works calmly with su -c出于某种原因, vscode不以sudo开头,但它可以从容地与su -c一起工作

PS: I do not know if it can be done easier. PS:我不知道它是否可以做得更容易。 I needed this to work with git in vscode我需要这个才能在 vscode 中使用 git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM