Console settings not applied when running program via shortcut

0

I have already configured my Windows Subsystem for Linux (bash.exe) to use a color table and a font like this:

A

And it looks OK when I type bash.exe in "Run" dialog (Win+R) or manually navigate to %SystemRoot%\System32\ and double-click bash.exe.

But when I launch it via a shortcut, default settings are applied and it looks like this:

B

Which of course is not what I want.

Specifically, I'm clicking this item in my start menu:

C

Windows 10 Enterprise version 1703 (Build 15063.608) x64. Just in case, the settings in the shortcut looks fine:

D

iBug

Posted 2017-10-17T08:22:47.777

Reputation: 5 254

Answers

0

I found a working solution and it's stable, albeit not the ideal.

Create a VBScript with the following content:

Option Explicit

Dim Shell
Set Shell = CreateObject("WScript.Shell")

Shell.Run "%SystemRoot%\system32\bash.exe"

Save it as BashStart.vbs and put it inside %SystemRoot%\System32. Then manually edit all shortcuts that you use so they point to %SystemRoot%\System32\BashStart.vbs instead of %SystemRoot%\System32\bash.exe. Now the Windows Subsystem for Linux shows up with the correct color palette and font.

iBug

Posted 2017-10-17T08:22:47.777

Reputation: 5 254