[BUG]: "Error: program not found" when running enable-autostart #299

Closed
opened 2026-01-05 14:49:34 +01:00 by adam · 6 comments
Owner

Originally created by @psi00 on GitHub (Feb 16, 2024).

Describe the bug
Whenever attempting to enable Komorebi's autostart through komorebic enable-autostart and providing the needed config file (--config C:\Users\James\komorebi.json is mine), Komorebi throws an error saying that the 'program was not found' and shows what seems to be a directory.

To Reproduce
Steps to reproduce the behavior:

  1. Open Powershell or equivalent terminal
  2. Run komorebic enable-autostart and provide your config file directory
  3. Komorebi throws an error

Expected behavior
I expected Komorebi to enable itself to auto-start upon receiving said command.

Screenshots and Videos

image

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

komorebic check Output

KOMOREBI_CONFIG_HOME detected: C:\Users\James\.config\komorebi

Looking for configuration files in C:\Users\James\.config\komorebi

No komorebi configuration found in C:\Users\James\.config\komorebi

If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration

Additional context
I also tried the command with C:\Users\James\.config\komorebi\komorebi.generated.ps1 incase I had the wrong file, but that created the same result.

Originally created by @psi00 on GitHub (Feb 16, 2024). **Describe the bug** Whenever attempting to enable Komorebi's autostart through `komorebic enable-autostart` and providing the needed config file (`--config C:\Users\James\komorebi.json` is mine), Komorebi throws an error saying that the 'program was not found' and shows what seems to be a directory. **To Reproduce** Steps to reproduce the behavior: 1. Open Powershell or equivalent terminal 2. Run `komorebic enable-autostart` and provide your config file directory 3. Komorebi throws an error **Expected behavior** I expected Komorebi to enable itself to auto-start upon receiving said command. **Screenshots and Videos** ![image](https://github.com/LGUG2Z/komorebi/assets/160246921/bcdb39a6-2f5c-4155-a8e4-22825ec3bab5) **Operating System** ``` OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22631 N/A Build 22631 ``` **`komorebic check` Output** ``` KOMOREBI_CONFIG_HOME detected: C:\Users\James\.config\komorebi Looking for configuration files in C:\Users\James\.config\komorebi No komorebi configuration found in C:\Users\James\.config\komorebi If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration ``` **Additional context** I also tried the command with `C:\Users\James\.config\komorebi\komorebi.generated.ps1` incase I had the wrong file, but that created the same result.
adam added the bug label 2026-01-05 14:49:34 +01:00
adam closed this issue 2026-01-05 14:49:34 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Feb 16, 2024):

Looks like you may be running an older version of komorebi here. Can you check both binaries with the --version flag?

0.1.21 is now available both on WinGet and Scoop so if you're on a version earlier than that on either of the binaries this should be fixed with a quick upgrade to the latest version!

@LGUG2Z commented on GitHub (Feb 16, 2024): Looks like you may be running an older version of komorebi here. Can you check both binaries with the `--version` flag? 0.1.21 is now available both on WinGet and Scoop so if you're on a version earlier than that on either of the binaries this should be fixed with a quick upgrade to the latest version!
Author
Owner

@psi00 commented on GitHub (Feb 16, 2024):

Hello, thanks for the quick reply! Komorebi was on version 0.1.19 beforehand. After updating to 0.1.21, the same issue is still arising. Perhaps the location may be something to do with it? But I don't know, I'm not the guy who wrote the program lol.

@psi00 commented on GitHub (Feb 16, 2024): Hello, thanks for the quick reply! Komorebi was on version 0.1.19 beforehand. After updating to 0.1.21, the same issue is still arising. Perhaps the location may be something to do with it? But I don't know, I'm not the guy who wrote the program lol.
Author
Owner

@LGUG2Z commented on GitHub (Feb 16, 2024):

ef61239580/komorebic/src/main.rs (L1119)

It looks like the program that can't be found here is "powershell.exe" 🤔

Are you able to run "powershell" successfully as a command from a plain old Command Prompt? 👀

@LGUG2Z commented on GitHub (Feb 16, 2024): https://github.com/LGUG2Z/komorebi/blob/ef612395800fa5df58fb3d0a4c8b915a6c55a664/komorebic/src/main.rs#L1119 It looks like the program that can't be found here is "powershell.exe" 🤔 Are you able to run "powershell" successfully as a command from a plain old Command Prompt? 👀
Author
Owner

@psi00 commented on GitHub (Feb 16, 2024):

Bingo!
C:\Users\James>powershell

'powershell' is not recognized as an internal or external command, operable program or batch file.

@psi00 commented on GitHub (Feb 16, 2024): Bingo! `C:\Users\James>powershell` `'powershell' is not recognized as an internal or external command, operable program or batch file.`
Author
Owner

@LGUG2Z commented on GitHub (Feb 16, 2024):

This is a little beyond the scope of the software as it's a system environment configuration issue, but you should be able to ensure that the PowerShell binary is available on your system PATH by following these instructions: https://confluence.atlassian.com/bamkb/powershell-is-not-recognized-as-an-internal-or-external-command-1095246216.html#:~:text=Search%20for%20%22environment%20variables%22%20in,folder%20where%20PowerShell%20is%20located.

@LGUG2Z commented on GitHub (Feb 16, 2024): This is a little beyond the scope of the software as it's a system environment configuration issue, but you should be able to ensure that the PowerShell binary is available on your system PATH by following these instructions: https://confluence.atlassian.com/bamkb/powershell-is-not-recognized-as-an-internal-or-external-command-1095246216.html#:~:text=Search%20for%20%22environment%20variables%22%20in,folder%20where%20PowerShell%20is%20located.
Author
Owner

@psi00 commented on GitHub (Feb 16, 2024):

The above didn't work for me - however, setting the path to %SYSTEMROOT%\System32\WindowsPowerShell\v1.0> did work. Now Komorebi autostarts with no issues when I boot up the system. Thanks for your help! :)

@psi00 commented on GitHub (Feb 16, 2024): The above didn't work for me - however, setting the path to %SYSTEMROOT%\System32\WindowsPowerShell\v1.0> did work. Now Komorebi autostarts with no issues when I boot up the system. Thanks for your help! :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#299