空白窗口VSCODE作为root
我很长一段时间以这种命令(ubuntu 20.04.4 lts)将VSCODE作为root运行已有很长一段时间:
> sudo code --user-data-dir="~/.vscode-root"
今天,我使用相同的命令执行VSCODE作为root,但我没有相同的结果。 这次,我有一个空白的窗口。
我尝试将其删除 +删除 /$ home /code和.vscode文件夹 再次安装,但我有同样的问题, 我试图将同一命令与其他标志一起使用,而无需解决它。
Flags tried : --disable-gpu /// --disable-features=CalculateNativeWinOcclusion
有没有办法删除(软件包 +配置)和VSCODE的所有数据可以再次正确安装它?
有什么想法吗? 谢谢祝你今天过得愉快
it's been a long time that i run vscode as root via this command (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.
in this time, i have a blank 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.
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 ?
Any idea ?
Thank you & have a nice day
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在这里找到了一个解决方案:
nofollow noreferrer“二手:
- no-and-andbox -disable-gpu-sandbox -user-data-data-dir
例如:
sudo代码-NO-SANDBOX - DISABLE-GPU-SANDBOX -USER-DATA-DATA =/root/.vscode/.vscode/
I found a solution here:
https://github.com/microsoft/vscode/issues/151187
keys must be used:
--no-sandbox --disable-gpu-sandbox --user-data-dir
for example:
sudo code --no-sandbox --disable-gpu-sandbox --user-data-dir=/root/.vscode/
这对我有用
vscodium
:出于某种原因,
vscode
不以sudo
开始,但它与su -c -c平静地工作
ps:我不知道它是否可以更容易。我需要它与vscode中的git一起工作
That works for me on
VSCodium
:For some reason,
vscode
does not start withsudo
, but it works calmly withsu -c
PS: I do not know if it can be done easier. I needed this to work with git in vscode
如果您面临问题以打开 /root下存在的代码。
然后更好地添加权限为根。
例如:
chmod -r 755/root/
现在,您可以轻松地使用VSCODE打开root File
if you are facing the issue to open a code that is present under /root.
then better add permission to root.
For example:
chmod -R 755 /root/
Now, you can easily open the root file with vscode