vscode-42-norminette-3-highlighter icon indicating copy to clipboard operation
vscode-42-norminette-3-highlighter copied to clipboard

Norminette in flatpack container of vscode

Open CarloCattano opened this issue 2 years ago • 4 comments

In Berlin the clusters run via flatpack on a container version of vscode , and some funcionalities dont get access:

"....This version is running inside a container and is therefore not ableto access SDKs on your host system!"

So in order to even run our zsh terminal we have to:

 "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
      "bash": {
        "path": "/usr/bin/flatpak-spawn",
        "args": ["--host", "--env=TERM=xterm-256color", "zsh"]
      }
    },

Im wondering if there is away to bypass this issue in some similar way, since the extension cant find the norminette installed on our computer, similarly how vscode cant find our zsh without this tweaks.

It works perfectly well at home but would love to run it on the clusters

I tried all the workarounds that came to my mind like giving the absolute norminette path /nfs/homes/ccattano/.local/bin/norminette with no avail

https://stackoverflowteams.com/c/42network/questions/2134

CarloCattano avatar Dec 02 '22 19:12 CarloCattano

Due to the flatpak sandbox, vscode can read your home but not the system binaries. Here is a solution to install the norminette inside the sandbox:

$ flatpak run --command=sh com.visualstudio.code
[📦 com.visualstudio.code ~]$ python3 -m pip install --user norminette

Norminette in now installed at /var/data/python/bin/norminette, you can point the extension to this location.

Another solution would be to use --filesystem=host and access the norminette via /run/host/xxx (but it kinda defeats the point of flatpak sandboxing ^^)

alexandregv avatar Dec 03 '22 21:12 alexandregv

Could not succeed, it installs but there is still not a way to access it

WARNING: The script norminette is installed in '/nfs/homes/ccattano/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

And after adding it to PATH as suggested I get

Traceback (most recent call last):
  File "/nfs/homes/ccattano/.local/bin/norminette", line 5, in <module>
    from norminette.__main__ import main
ModuleNotFoundError: No module named 'norminette'

CarloCattano avatar Dec 03 '22 22:12 CarloCattano

Could not succeed, it installs but there is still not a way to access it

WARNING: The script norminette is installed in '/nfs/homes/ccattano/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

And after adding it to PATH as suggested I get

Traceback (most recent call last):
  File "/nfs/homes/ccattano/.local/bin/norminette", line 5, in <module>
    from norminette.__main__ import main
ModuleNotFoundError: No module named 'norminette'

I have the same issue, any solution to fix this issue?

jdkeke142 avatar Jan 26 '23 21:01 jdkeke142

@jdkeke142 the only workaround I got is to download vscode binaries from tulhe official page(x86 64 Linux tar) and then adding it to you PATH. Instructions here in the last comment https://stackoverflowteams.com/c/42network/a/2145/15336

CarloCattano avatar Jan 27 '23 11:01 CarloCattano