keep Running Jupyter notebook with VSCode on remote server (SSH) after disconnecting - visual-studio-code

i'm working with VSCode on remote server via ssh with the jupyter notebook extension.
but when im disconnect from the session the process of the code is stopped.
is there a way to run the notebook from the VSCode with a backgroung process with tools like tmux.
cause i'm far of being a linux expert and i cant figure out how can i run the notebook process with tmux via the VSCode.
thanks a lot in advance.

Simply start a tmux process in the remote terminal start Jupyter in the tmux session. You can go out of the tmux session without closing it.
In VSC you can choose the tmux session as the host.

Related

Using tmux in VS Remote SSH session

I am currently starting to work with SNNs on a GPU server. I am working with VS Code Remote-SSH package. Thereby, I'd like to use the tmux package to be able to start multiple processes which don't terminate when I disconnect the terminal from the server.
So far I used the https://cppdev.medium.com/vs-code-and-tmux-intergation-for-reliable-remote-development-e26594e6757a Tutorial. It already helps me that the process, I run doesn't shut down when I close the terminal but I didn't manage to start a second process on the server because each time, I open a new terminal, the already running process appears. What are your thoughts on that?
Thanks

Jupyter server not working while using WSL2 and conda env

Whenever I try to run a jupyter notebook via WSL2 , I seem to be unable to connect to a kernel when running a VSCODE. The Vscode is running in Ubuntu, but I cannot connect to the remote jupyter server. I was able to do so for the last couple of months but suddenly, without me recalling channging anything, this process stopped working.
After typing 'jupyter notebook' in the terminal, I geth the following error in red, which (I think?) I received before and the jupyter was working nonetheless. However what's different is the 'forbidden' message. (see picture below)
My usual process was in WSL: conda activate env -> jupyter notebook > open another terminal -> conda activate env -> code . -> (vscode opens up running in wsl) -> copy paste one of the URLS to jupyter server -> viola it's working.
Thank you
It seems simply restarting the computer somehow solved the issue, interesting.

VSCode SSH auto-open terminal and run commands

I use VSCode with the Remote - SSH extension to connect to a remote dev enviroment.
During development on the remote machine, I use integrated terminal to view application logs. At this moment, I have to open new terminals and run commands manually, which is too much work for my lazy hands ;)
Questions are:
When I connect, I want VScode to open terminal tabs for me and run some commands (like tail ./logs/whatever). Is that possible?
If (1) is possible, can I also configure the terminals to open in VSCode Split Terminal mode?

Remote running of python file X11 issue

i'm using remote-ssh VSC extension to run python files from windows on remote Ubuntu VPS
The problem is, i cant run code with tinkter or some commands like xeyes
They seems running, but there is no window displaying the result appearing.
What should i look at Local and server sides to fix this?
Got it. I need to run Xming on local machine in parallel with vscode. This way xming open window with graphic content in it

How do i open a local terminal from a remote session in VScode?

When i open my workspace in VScode i go directly into my SSH work area, which is what i want. But i want to have a split terminal with access to both my SSH-work area and a terminal for my local computer, but i cant access the local one without making an explicitly new terminal from the dropdown window. And if i try to split the new local terminal i get the error "The terminal shell CWD "/Users/asd/work/" does not exist" as if its being looked for in my SSH work directory. Is there any way of specifying the default terminal to be on my local computer? If i do so in the terminal preferences in VScode i get the CWD-error on startup instead.
This should have been resolved with microsoft/vscode-remote-release issue 1479
Both of you don't have C:\Windows\System32 on your path, I don't understand why that is.
But I will change this to not rely on the PATH.
Even if this was for Windows originally, opening a local shell, (Mac or Windows) should now be possible while having a remote session.
Wtih ctrl+shift+p or cmd+shift+p(Command Palette), you have:
Terminal: Create New Integrated Terminal (local)
Bonus, with VSCode 1.53 (Jan. 2021), there is now:
Remote layout persistence
Terminal layout is restored on remote terminal reconnection. In the video below, the terminal layout is restored when reloading VS Code and reconnecting to a Windows Subsystem for Linux (WSL) remote instance.