Vscode: Install on Linux as non-root user

Created on 19 Apr 2017  路  4Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.11.2
  • OS Version: Fedora 22

What's the reason I need to be root on Linux to install the rpm? I can download the .tar.gz and manually extract those files somewhere and it works. However it's clunky and there's no auto-update.

It would be good if there was a way to install the product without being root, which is not available on our work Linux desktops, as I'm sure is commonly the case.

*question linux

Most helpful comment

It seems like if VSCode can be installed and updated manually without root then it could be done automatically. Even Eclipse can auto-update in-place with no special permissions.

Does the fact that an editor app needs root privileges to install/update not seem slightly unecessary?

If you want to expand the reach of VSCode to more professional developers then this is a common scenario. Either you have a local workstation with no root permissions, and/or a shared dev server where you want software installed under your user home dir, not some shared location (e.g. some people may not want to take the latest update).

So IMHO the current install/update methods create significant friction to adoption in a professional environment, hence the feature request.

All 4 comments

The reason is we do the following which requires root:

  • Register an apt repo
  • Install the Microsoft signing key
  • Update alternatives
  • Install a bunch of things into /usr (vscode, bin command, desktop entry)

There is currently not a good story for auto-updating the tarball as the recommended approach is to use apt which installs the deb which registers a bin command and desktop entry.

Maybe you could write a shell script which downloads the latest tarball and replaces the old version with its contents? You can grab the latest stable tarball with https://vscode-update.azurewebsites.net/latest/linux-x64/stable

It seems like if VSCode can be installed and updated manually without root then it could be done automatically. Even Eclipse can auto-update in-place with no special permissions.

Does the fact that an editor app needs root privileges to install/update not seem slightly unecessary?

If you want to expand the reach of VSCode to more professional developers then this is a common scenario. Either you have a local workstation with no root permissions, and/or a shared dev server where you want software installed under your user home dir, not some shared location (e.g. some people may not want to take the latest update).

So IMHO the current install/update methods create significant friction to adoption in a professional environment, hence the feature request.

We decided to leverage the standard OS mechanism to deliver updates, and install in /usr like many other applications. I'm not sure anyone else has called this out as an issue since packages were added over a year ago.

I'm sure many people just give up when they see "sudo". Also I'm coming from using Visual Studio on Windows, so VSCode is a great thing compared to the standard Linux solution of using vim/emacs and gdb. So perhaps using MS tools on Linux is niche in itself (but which is what I'd like to help evangelise).

Ok if you're hands are tied by the package managers then fair enough.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

lukehoban picture lukehoban  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments

sirius1024 picture sirius1024  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments