Skip to content

Instantly share code, notes, and snippets.

@darkdreamingdan
Created September 2, 2017 23:13
Show Gist options
  • Save darkdreamingdan/2b3356142ad734b78fb7637a0fc04bcc to your computer and use it in GitHub Desktop.
Save darkdreamingdan/2b3356142ad734b78fb7637a0fc04bcc to your computer and use it in GitHub Desktop.
Adds 'Open Bash here' to your Windows Context menu for WSL. Based on a registry key from winaero, only this opens `bash.exe` natively so that it appears in the same program group in the start menu as when using `bash.exe` in Start->Run, and also inherits the Ubuntu taskbar icon.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openbashhere]
@="Open Bash here"
"Icon"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
6f,00,63,00,61,00,6c,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,\
00,68,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openbashhere\command]
@="cmd.exe /c start /d \"%V\" bash.exe"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\openbashhere]
@="Open Bash here"
"Icon"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
6f,00,63,00,61,00,6c,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,\
00,68,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\openbashhere\command]
@="cmd.exe /c start /d \"%V\" bash.exe"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\openbashhere]
@="Open Bash here"
"Icon"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
6f,00,63,00,61,00,6c,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,\
00,68,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\openbashhere\command]
@="cmd.exe /c start /d \"%V\" bash.exe"
[HKEY_CURRENT_USER\SOFTWARE\Classes\DesktopBackground\shell\openbashhere]
@="Open Bash here"
"Icon"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
6f,00,63,00,61,00,6c,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,\
00,68,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CURRENT_USER\SOFTWARE\Classes\DesktopBackground\shell\openbashhere\command]
@="cmd.exe /c start /d \"%V\" bash.exe"
@Mixie-12
Copy link

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment