-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify "Launching as sudo" #292
Comments
It is not recommended to do so, but you can still use it at your own risk. It's the only way you can edit root-owned files, for example. We should just provide functionality within the workbench to escalate privileges in order to save said files... but for now, this is it. Leaving it to you for comments @Tyriar |
The fix I did was making it not crash so that vscode can edit these files. You actually can't edit user-owned files when running as The ideal behavior we should strive for is popping up an admin dialog when there are no write permissions for the current user. I think Sublime does this. |
The reason it's in the notes is because people were asking for it, and it was impossible to edit root-owned files with vscode, forcing people to fallback on other editors. microsoft/vscode#3068 @joaomoreno feel free to change if you disagree, I'll be out for another week or so. |
@Tyriar I talked to @joaomoreno about this today and there are some concerns we have. For one, we do not recommend to run as sudo user for several reasons (files you create are owned by sudo, your data directory would be potentially created as sudo user, etc.). As such, we think you should not explicitly shout out about support for running as sudo at all. Then, you advertise the user-data-dir option. I wonder if we should really do that, because reality is that there are more data directories where stuff is put (e.g. extensions) and people might misinterpret this option as a way to have portable VS Code. Finally, wouldn't it make more sense to automatically change the user-data-dir when we detect that VS Code is being run as sudo? Why would a user have to explicitly change the user-data-dir in that condition? |
I've remove this section from the releasenotes for the 1.1 release. Once Dan is back, he can weigh in if he'd like to add back some portion of that section. |
@bpasero yes the user data dir will automatically be set eventually, it didn't make it in for April microsoft/vscode#5570 |
@joaomoreno @Tyriar @gregvanl fyi
I find https://github.com/Microsoft/vscode-docs/blob/vnext/release-notes/latest.md#run-vs-code-using-sudo a bit weird because it explicitly says how to launch on Mac OS X as sudo, though if you do that you get a message right inside the workbench telling you that it is not recommended to launch VS Code as sudo.
If that is true, we should not advertise how to run with sudo on Mac OS. Not sure about Linux.
The text was updated successfully, but these errors were encountered: