| « Wall Mount Android Tablet for Home Assistant | OpenVPN Certificates » |
Open Cygwin at a specific folder
The easiest way to do this is open up a Cygwin terminal (as an administrator) and type the command:
chere -i -t mintty -s bash
If the icon doesn't show, you can use the following (Windows 10) from within a cygwin window:
regtool -w -s set /HKCU/Software/Classes/Drive/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Drive/Background/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Directory/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
regtool -w -s set /HKCU/Software/Classes/Directory/Background/Shell/cygwin64_bash/Icon 'C:\cygwin64\Cygwin-Terminal.ico'
And to remove the icon:
regtool -w unset /HKCU/Software/Classes/Directory/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Directory/Background/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Drive/Shell/cygwin64_bash/Icon
regtool -w unset /HKCU/Software/Classes/Drive/Background/Shell/cygwin64_bash/Icon
If you don't have admin privileges, you can do the following:
Go to your "Send To" folder
C:\Users\<your_user_name>\AppData\Roaming\Microsoft\Windows\SendTo
Create a shortcut "Bash Here" with this target:
C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin\bin\bash.exe -l -c "cd \"$0\" ; exec bash"