2

When i open notion in cmd using

start notion

it opens with the command line enter image description here

How do i make it just open by itself without being tied to the command line? Notion also closes whenever i close the cmd window.

For example, if i were to open Firefox or Outlook using the start command, it will just open without any output from the command line.

Thanks for your help.

i have tried using

start /b notion

to no avail

elmo2000
  • 23
  • 3

1 Answers1

1

Notion is just an electron app. So it's possible to set nodejs and electron env variables to change behavior.

Snippet below when placed in batch .bat file will start notion app without logging anything to console and also will not block console such that when you close console window notion app will also close. I assume that notion.exe is in the default installation path.

For example: start_notion.bat content:

@echo off
setlocal
set ELECTRON_NO_ATTACH_CONSOLE=true
start "" C:\Users\%username%\AppData\Local\Programs\Notion\Notion.exe
endlocal

from documentation: https://www.electronjs.org/docs/latest/api/environment-variables#electron_no_attach_console-windows ELECTRON_NO_ATTACH_CONSOLE=true means "Don't attach to the current console session."

Alternatively you can use oneliner if you want to paste directly to the console:

set ELECTRON_NO_ATTACH_CONSOLE=true && start "" C:\Users\%username%\AppData\Local\Programs\Notion\Notion.exe

Tested on version: Notion 2.18.23.10.26.98

lww
  • 624
  • 1
  • 7
  • 14