Launch Jupyter Notebook in windows without command window - windows

Is it possible to launch jupyter notebook without command console, i.e, without typing jupyter notebook and having a command window in your opened programs. I have made a batch file which I double-click to open the jupyter notebook. However, this step opens a command window and prints all the communication between jupyter and python processes. I want to eliminate this commandline window.

Instead of a batch file, one can use a shortcut.
To hide terminal you can run python scripts with pythonw.exe instead of python.exe. So I changed the Jupyter shortcut which was created after Anaconda installation accordingly. Mind that shortcut's Target field may have multiple python.exe instances, like the following:
C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\cwp.py C:\ProgramData\Anaconda3 C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py "%USERPROFILE%/"
Shortcut window screenshot

This thread seems to be the first to appear when googling the problem.
My solution is for Anaconda users: Launch Jupyter from the Anaconda navigator. You won't have to keep an open CMD window, as upon exiting the navigator you are given the option to close or not close Jupyter.

It appears from the following questions that what you want to do is tricky in windows:
https://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way
How to call CMD without opening a window
Each of these questions has various work-arounds presented in the answers, each with their pros and cons. Perhaps one of them will meet your needs.

I use RBTray to right click the minimize button and have the window go hide in the system notification tray.

Related

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.

How do I change the prompt color of Anaconda Prompt (cmd) on Windows 10?

I've been trying to change the color of Anaconda Prompts(cmd), which is for now (base) E:\VSCodeProjects>.
I googled for this extensively but seems like:
There is no such option to do this in .condarc. I expected it to be able to change the prompt color like .zshrc.
Also, I can't find any definitive way to change the color of the prompt of native Windows' cmd. All I found were some old ANSI Escape codes someone wrote back in 2009.
The only viable and reliable way I came across is setting the %PROMPT% variable on terminal manually, by doing something like: set "PROMPT=$e[44m%PROMPT%$e[0m". This command explicitly change the color of the prompt instantly without any side-effects but the problem is that I have to execute this command everytime I open the new Anaconda Prompt instance.
At this point, it would be satisfactory enough if there's a way to just execute set "PROMPT=$e[44m%PROMPT%$e[0m" command everytime I open a new Anaconda Prompt instance. However, other more effective approaches are welcome.
Please note that I'm NOT trying to change the color of the whole Anaconda Prompt. I just want to change the color of the prompt. i.e, (base) E:\VSCodeProjects>
I realise this is an old post, but thought I'd respond in case anyone is still looking for an answer. If you right click on the top of the Anaconda Prompt window and then click 'properties' on the pop-up, you are able to access all the customisation options.
Screenshot of method explained above

Can I have multiple Powershell Consoles in one window?

So, now I have many open apps, often 3-4 powershell consoles. I'm able to order the powershell windows to watch them together (top left, top right, bottom left, bottom right).
So this means that if I switch to another app, when I switch back I have to restore all multiple powershell windows to see them all again.
What I want is, to create only one 'shared window' for many powershell, because when I need one, I need all of them to see.
Is there a way to do this?
Just to add more details about Windows Terminal approach:
Open a Windows Terminal
Type Alt+Shift+= or Alt+Shift+- to open a new Pane in the same tab
Type Shift+Ctrl+W to close the current Pane
If you need more details or modify the settings, go to next page Panes in Windows Terminal
ConEmu has this option.
You can also configure it to open as much consoles as you want when it starts.
ConEmu website
Enjoy!
VSCode can have Multiple Terminals which is the closest to this I've seen, quoted from documentaion:
You can create multiple terminals open to different locations and easily navigate between them. Terminal instances can be added by hitting the plus icon on the top-right of the TERMINAL panel or by triggering the Ctrl+Shift+` command. This creates another entry in the dropdown list that can be used to switch between them.
You can also split the terminal by triggering the Ctrl+\ command or via the right click context menu
Windows now provides the Windows Terminal.
Windows Terminal can split the terminal into panes and can also run different shells (i.e. cmd, powershell, and bash through the wsl)
You can install Windows Terminal directly from the Windows Store.
Create a virtual machine where you can run your PowerShell sessions uninterrupted. The PowerShell windows are always where I placed them when I come back.
It could be an expensive solution depending on your needs, but I have been doing this a long time. It's a robust solution since the only user processes on the VM are my PowerShell sessions.

How can I pop up the system property window in windows7

I want to open the system property window to change environment variable in Windows7. I know how to open that window, and used to use that window sometimes before, but today I opened the window as usual, It does not appear. How can I open it?
You should check why that command stopped to work in your environment, meanwhile try with this (from command line or from Run):
rundll32 sysdm.cpl,EditEnvironmentVariables
Also check this: https://msdn.microsoft.com/en-us/library/windows/desktop/cc144191%28v=vs.85%29.aspx

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