Open ctaggart opened 8 years ago
VSCode-linux-x64-stable.zip doesn't run as root https://github.com/Microsoft/vscode/issues/5679
With the insiders build, it does run with a warning:
sudo code-insiders --user-data-dir=~/root-data-dir ~/perms-test
I think the solution is to allow it to be run via sudo
by adding vscode
user to sudo
group.
apt-get install -y sudo
adduser vscode sudo
echo 'vscode ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
Shouldn't be used gksudo
to run GUI programs as root?
You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=/root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root.
It would be nice to be able to run vscode as root. When experimenting on this image, it is nice to be able to install software as root and edit root config files in vscode.