Jupyter open files as tabs using in-built terminal prompt - terminal

I want to navigate using the terminal inside jupyter-lab to open up different notebooks from different locations. At the moment using $jupyter-lab file.ipynb opens up a new port in a different window, is there a way to open this within the current port?
Or even how to navigate through the terminal to a file location and then open the UI file manager in that location?
(side note) If vsCode or a different ide provides better functionality please mention as well.

Related

How to make my browser (such as Firefox) open a custom File Manager?

My system is Windows 11 build 22621. Now I use Tablacus Explorer to manage my files instead of Explorer.exe, however, many apps (such as Firefox or Control Panel) will still use Explorer.exe when I try to open directory or other something in those apps,even though I used some Tablacus's plugins such as Shell Execute Hook.
Are there better methods to let other apps to auto open Tablacus as more as possible?
Add "Open Instead" and "System Tray" plugin to solve the problem.

Persistent jupyterlab page on web browser

In linux, there can be dedicated jupyter lab port that is always available. User does not need to launch Jupyter Lab from terminal.
How can something similar be achieved in windows. So that even if I restart my machine I still can visit the page and expect jupyter lab to be running.
Kindly note I don't want to use jupyter-lab desktop instead.
Basically I want a bookmark saved and when I open the page it automatically triggers a live jupyter lab workspace as is the case in linux ports.
Probably in Linux kernel based OS, JupyterLab is converted to a service. You can check all services with systemctl --type=service --state=active command. In Windows, if you want a similar experience to enabled services of a Linux kernel based OS, you can easily create a new startup item. To do that:
1- Create a shortcut with the command that you use to start JupyterLab:
a. Right click to an empty part of your desktop -> New -> Shortcut
New shortcut creation
b. Write "C:\Windows\System32\cmd.exe" /k <terminal_command_for_jupyterlab> to shortcut's location.
JupyterLab command shortcut
This shortcut will run the command for JupyterLab. Give an appropriate name to your shortcut.
2- Add this shortcut to startup items:
a. Press Win+R buttons.
b. Write shell:startup to Run window.
c. Copy your shortcut and paste your shortcut to folder that is opened with previous step.
After all these steps, JupyterLab should be started automatically without user interaction on each startup of Windows.

Mac terminal/bash open only one instance of application

I setup some bash functions that will open applications. The code runs subl . to open the current directory in Sublime Text editor. If Sublime is already open it will open another instance of the application. Is it possible to open only that instance of the application, and close all the others? That way there are not multiple instances to juggle between.
Use the open command:
open -a 'Sublime Text' .
This uses the same LaunchServices mechanism as Finder when you click on an application, so it will only open one instance of the application.

Opening up iTerm / Terminal with commands by default.

My current use of iTerm is the following everytime:
- Open up
- cd into my project folder
- open up another tab
- cd into my project folder
- Grunt Watch
- open up another tab
- SSH into live server
This is getting a bit tedious now, is there a simple way to make a one click for all of this to be done? I remember back in the windows days you could create custom command prompt files so it would open up and you could just double click it like an app.
Is there anyway I can do this? I have looked at the profiles and I don't think I can do what I am after with that.
Just need pointing in the right direction.
If you're using iTerm2, there is a feature called Arrangements (see the last entry on the page). With this, you can set iTerm to open a series of profiles (which can be set to run a command at startup, start in a specific directory, run a certain shell, etc.).
It seems that creating one profile for working in a directory, a second for the Grunt Watch, and a third to SSH should be trivial, and once the arrangement is saved, it can be recalled with the press of a hotkey (Cmd⇧R on my install). You can also set this to save split-pane windows if you don't want a separate window for each of these tasks.

New OSX User: Opening up a new terminal window in current space(?)

I'm just meddling with OSX after a few years on Linux. There's a lot that I'm liking, but one thing that's slowing me down is that if I run the 'terminal' command via shortcut/spotlight/quicksilver, it whisks me off to any existing terminal in whatever space already has a terminal instance open.
I regularly like to pop up a terminal, run a quick command and then close it again, all the while staying in whatever desktop space I happen to be on.
...So, how do I do that on Mac?
Cheers...
Go to System Preferences -> Exposé & Spaces -> Spaces and check When switching to an application, switch to...
Download this tool called Visor
It lets you quickly get a tabbed drop down terminal using a hotkey like Ctrl-`.
Insanely convenient for working in the shell.
Try this tool: https://github.com/nmadhok/OpenInTerminal
This is a really handy tool for programmers on Mac as it lets you open the folder directly in Terminal. You can select multiple folders to open them in multiple terminal windows. You can also select files to open the parent directory in Terminal. This application works with Finder as well as without Finder which is a plus!

Resources