6be709c0
6be709c0

Reputation: 8441

Vscode on ParrotOS : ERR_INTERNET_DISCONNECTED

I just installed ParrotOS and installed VSCODE from the documentation :

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > 
microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install code

But I can't load any extensions. If I open the Developer Tools, I can see the following error :

ERR net::ERR_INTERNET_DISCONNECTED: Error: net::ERR_INTERNET_DISCONNECTED

How can I authorize vscode to connect ?

Upvotes: 2

Views: 3702

Answers (3)

Stuart Gray
Stuart Gray

Reputation: 79

Updated: vscode has been added to the official repo for a long while now and is installable with the usual: apt update && apt dist-upgrade && apt install code

You always want to use dist-upgrade to keep your packages harmonious.

You should be able to run it with:
firejail --noprofile
BUT YOU SHOULD NOT ADD REPOS TO PARROTOS
ParrotOS is a rolling release distribution and you will break your system.

https://community.parrotsec.org/t/apt-add-repository-error/1517/2

It is highly recommended you use a virtual machine for this type of thing (ParrotOS ships with VirtualBox and an appropriate firejail profile for VirtualBox as well).
https://wiki.debian.org/DontBreakDebian

Upvotes: 3

basebandit
basebandit

Reputation: 97

In parrotsec os most applications started from launchers (GUI Menu) do so sandboxed.If you wish to start an application unsandboxed with no restrictions posed just launch them from the terminal like so

/usr/bin/<appname>

Upvotes: 0

Alesanco
Alesanco

Reputation: 1900

When you install VSCode you can see that the last two lines are:

Configuring sandbox profiles...
Sandbox profiles updated!

From Parrot 3.9 there is the sandbox feature using firejail. This system creates a profile file under /etc/firejail for every installation. The file contains rules to protect your application, such as Networking rules.

As you can see in the documentation:

–net=none creates a network namespace unconnected to the real network. The sandbox looks like a computer without any network interfaces.

So you have to comment (or delete) in /etc/firejail/code.profile the line

net none

Your VSCode will load the extensions list now! (I had the same problem)

EDIT: Pay attention to updates, because the Firejail profile files are overwritten, as you can see in the profile file:

# This file is overwritten after every install/update

If you update/upgrade your system for example, check something like this:

 Configuration file '/etc/firejail/code.profile'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** code.profile (Y/I/N/O/D/Z) [default=N] ? 

Upvotes: 0

Related Questions