Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

run vscode as root #9

Open
ctaggart opened this issue May 7, 2016 · 3 comments
Open

run vscode as root #9

ctaggart opened this issue May 7, 2016 · 3 comments

Comments

@ctaggart
Copy link
Owner

ctaggart commented May 7, 2016

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.

@ctaggart
Copy link
Owner Author

ctaggart commented May 7, 2016

VSCode-linux-x64-stable.zip doesn't run as root microsoft/vscode#5679

@ctaggart
Copy link
Owner Author

ctaggart commented May 7, 2016

With the insiders build, it does run with a warning:

sudo code-insiders --user-data-dir=~/root-data-dir ~/perms-test

image

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

@evandrocoan
Copy link

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.

  1. What is the difference between “gksudo nautilus” and “sudo nautilus”?
  2. running vscode with gksudo or sudo permission microsoft/vscode#3068 running vscode with gksudo or sudo permission

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants