Giter Site home page Giter Site logo

Comments (10)

fititnt avatar fititnt commented on June 23, 2024

Ow fuck. I deleted by mistake the docs/vscode-setup.sh (so, around 30min of work lost). VSCode even warned about not be able to move files to trash.

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Hummmm...

From https://code.visualstudio.com/docs/setup/linux#_debian-and-moving-files-to-trash

Debian and moving files to trash#

If you see an error when deleting files from the VS Code Explorer on the Debian operating system, it might be because the trash implementation that VS Code is using is not there.

Run these commands to solve this issue:

sudo apt-get install gvfs-bin

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

The first option was explicitly the portable option of VSCode. But tails also allows to install deb files. Not sure which one would be better.

I'm doing a draft of docs/vscode-deb-setup.sh and at some point this error show up

docs/vscode-deb-setup.sh

amnesia@amnesia:~$ wget https://go.microsoft.com/fwlink/?LinkID=760868 -O /home/amnesia/Persistent/downloads/vscode.deb
(...)

amnesia@amnesia:~$ sudo apt install /home/amnesia/Persistent/downloads/vscode.deb
[sudo] password for amnesia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'code' instead of '/home/amnesia/Persistent/downloads/vscode.deb'
The following package was automatically installed and is no longer required:
  libpcre2-posix0
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  code
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 0 B/64.5 MB of archives.
After this operation, 276 MB of additional disk space will be used.
Get:1 /home/amnesia/Persistent/downloads/vscode.deb code amd64 1.50.1-1602600906 [64.5 MB]
[INFO] Saving package changes
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 297, in __getitem__
    rawpkg = self._cache[key]
KeyError: 'code'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/sbin/tails-additional-software", line 672, in <module>
    apt_hook_pre()
  File "/usr/local/sbin/tails-additional-software", line 459, in apt_hook_pre
    if not apt_cache[package_name].is_installed:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 299, in __getitem__
    raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'code'"
N: Download is performed unsandboxed as root as file '/home/amnesia/Persistent/downloads/vscode.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Sub-process /usr/local/sbin/tails-additional-software apt-pre returned an error code (1)
E: Failure running script /usr/local/sbin/tails-additional-software apt-pre

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

The current vscode-portable-setup.sh have the link to vscode .deb, not the .tar.gz. Needs update later.

vscode-portable-setup.sh

# (...)
# @see https://code.visualstudio.com/docs/editor/portable
wget https://go.microsoft.com/fwlink/?LinkID=620884 -O /tmp/vscode.tar.gz
cd /home/amnesia/Persistent
tar -vzxf /tmp/vscode.tar.gz
# (...)

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Interesting. I'm testing the vscode.deb alternative install via the root terminal and Tails by default deny connect via tor. Maybe it's an security hardening. makes sense.

root@amnesia:~# wget https://go.microsoft.com/fwlink/?LinkID=760868 -O /tmp/vscode.deb
--2020-10-23 15:45:01--  https://go.microsoft.com/fwlink/?LinkID=760868
Resolving go.microsoft.com (go.microsoft.com)... 1603467902 PERROR torsocks[1584]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)
failed: Non-recoverable failure in name resolution.
wget: unable to resolve host address ‘go.microsoft.com’
root@amnesia:~# wget https://go.microsoft.com/fwlink/?LinkID=760868 -O /tmp/vscode.deb
--2020-10-23 15:45:30--  https://go.microsoft.com/fwlink/?LinkID=760868
Resolving go.microsoft.com (go.microsoft.com)... 1603467931 PERROR torsocks[1646]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)
failed: Non-recoverable failure in name resolution.
wget: unable to resolve host address ‘go.microsoft.com’

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Humm... I think I found an bug on Tails

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

With the hotfix from here #12 (comment) we can install the vscode.deb

amnesia@amnesia:~$ sudo apt install /tmp/vscode.deb
[sudo] password for amnesia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'code' instead of '/tmp/vscode.deb'
The following package was automatically installed and is no longer required:
  libpcre2-posix0
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  code
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/64.5 MB of archives.
After this operation, 276 MB of additional disk space will be used.
Get:1 /tmp/vscode.deb code amd64 1.50.1-1602600906 [64.5 MB]
[INFO] Saving package changes
Selecting previously unselected package code.
(Reading database ... 138407 files and directories currently installed.)
Preparing to unpack /tmp/vscode.deb ...
Unpacking code (1.50.1-1602600906) ...
Setting up code (1.50.1-1602600906) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for shared-mime-info (1.10-1) ...
Processing triggers for desktop-file-utils (0.23-4.0tails1) ...
[INFO] Examining package changes
amnesia@amnesia:~$ [INFO] New packages manually installed: {'code'}
[INFO] Adding to additional packages list: {'code'}

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Good. Not great. Not terrible.

The docs/vscode-portable-setup.sh v1.2 explain how to install. The helper bin/tails-code, that is mean to be added to the path, will automaticaly load installed portable VSCode to the memory and then run.

The docs/vscode-deb-setup.sh still unreliable (to not say it's shitty). Not only requires hotpatch (See #12) but also did not re-intall automaticaly after reboot and break other additional software to install correctly. On future this bug with docs/vscode-deb-setup.sh may not happens, but it does on Tails v4.12.

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Humm... maybe this could fix the network issue

https://code.visualstudio.com/docs/setup/network

from adhocsecurebox.

fititnt avatar fititnt commented on June 23, 2024

Not there... yet. But maybe would be someting like the curl #17

/home/amnesia/Desktop/VSCode-linux-x64/code --no-sandbox --proxy-server="socks5://127.0.0.1:9050" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1"

/home/amnesia/Desktop/VSCode-linux-x64/code --no-sandbox --proxy-server="socks5://127.0.0.1:9050" --verbose .

http_proxy=http://127.0.0.1:9050 https_proxy=http://127.0.0.1:9050 /home/amnesia/Desktop/VSCode-linux-x64/code --no-sandbox --proxy-auto-detect

amnesia@amnesia:~/Persistent/git/fititnt/TailsOS-for-non-whistleblowers$ /home/amnesia/Desktop/VSCode-linux-x64/code --no-sandbox --proxy-server="socks5://127.0.0.1:9050" --verbose .
Warning: 'sandbox' is not in the list of known options, but still passed to Electron/Chromium.
[main 2020-10-25T21:01:48.784Z] Starting VS Code
[main 2020-10-25T21:01:48.785Z] from: /home/amnesia/Desktop/VSCode-linux-x64/resources/app
[main 2020-10-25T21:01:48.785Z] args: {
  _: [


(...)
[main 2020-10-25T21:02:18.910Z] update#setState checking for updates
[main 2020-10-25T21:02:18.910Z] RequestService#request https://update.code.visualstudio.com/api/update/linux-x64/stable/d2e414d9e4239a252d1ab117bd7067f125afd80a
[main 2020-10-25T21:02:18.916Z] Error: net::ERR_PROXY_CONNECTION_FAILED
    at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:105:6395)
    at SimpleURLLoaderWrapper.emit (events.js:223:5)
[main 2020-10-25T21:02:18.917Z] update#setState idle
[main 2020-10-25T21:02:18.918Z] telemetry/update:notAvailable { explicit: false }

The error at least is different from the

amnesia@amnesia:~/Persistent/git/fititnt/TailsOS-for-non-whistleblowers$ /home/amnesia/Desktop/VSCode-linux-x64/code --no-sandbox --verbose .
Warning: 'sandbox' is not in the list of known options, but still passed to Electron/Chromium.
[main 2020-10-25T21:03:47.783Z] Starting VS Code
[main 2020-10-25T21:03:47.784Z] from: /home/amnesia/Desktop/VSCode-linux-x64/resources/app
[main 2020-10-25T21:03:47.784Z] args: {
  _: [

# (...)

[main 2020-10-25T21:06:47.594Z] update#setState checking for updates
[main 2020-10-25T21:06:47.595Z] RequestService#request https://update.code.visualstudio.com/api/update/linux-x64/stable/d2e414d9e4239a252d1ab117bd7067f125afd80a
[main 2020-10-25T21:06:47.599Z] Error: net::ERR_CONNECTION_REFUSED
    at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:105:6395)
    at SimpleURLLoaderWrapper.emit (events.js:223:5)
[main 2020-10-25T21:06:47.601Z] update#setState idle
[main 2020-10-25T21:06:47.601Z] telemetry/update:notAvailable { explicit: false }
[main 2020-10-25T21:06:47.821Z] menubarService#updateMenubar 1

from adhocsecurebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.