cygwin’s mkshortcut creates Windows shortcut icons on
the Desktop or in StartUp to invoke cygwin (or msys2) programs the
Windows way.
C:/Users/Public/Desktop, for all users, or
C:/Users/<me>/Desktop, for one user, me, with
mkshortcut --desc="mintty C:/cygwin64 terminal" --allusers --desktop --name="Cygwin64 Terminal" --icon=/cygdrive/c/cygwin64/Cygwin.ico /cygdrive/c/cygwin64/Cygwin.bat
For a msys2 shortcut there,
mkshortcut --arguments="-ucrt64" -A -D -n "MSYS2 UCRT64 terminal" -i /cygdrive/c/ghcup/msys64/ucrt64.ico /cygdrive/c/ghcup/msys64/msys2_shell.cmd
for e in msys2 mingw64 ucrt64 clang64 ; do mkshortcut -a "-$e" -A -D -n "MSYS2 ${e^^} terminal" -i /cygdrive/c/msys64/$e.ico /cygdrive/c/msys64/msys2_shell.cmd ; done
C:/ProgramData/Microsoft/Windows/Start Menu/Programs/StartUp
for all users, orC:/Users/<me>/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup
for me, withmkshortcut -a "/usr/bin/bash -l -c 'tt web_-w_sdf qb_-w_qt mastodon' &" -A -P -n "StartUp/web,qb,mastodon" /usr/bin/mintty
The shortcuts exist as .lnk files.
for e in UCRT64 CLANG64 CLANGARM64 MSYS2 MINGW64 ; do ls $APPDATA/Microsoft/Windows/Start\ Menu/Programs/Startup/MSYS2\ $e.lnk ; done
They can be copied/moved from Desktop to StartUp.
To experiment with color-coded backgrounds, create a desktop shortcut as me, manipulate it with the Desktop properties GUI terminal tab, then save it (as Administrator, perhaps) somewhere.
But consider using a mSYS2 launcher A helper for launching MSYS2 shells. Features blink-less launching and correct taskbar/start pinning.
https://www.msys2.org/docs/terminals/
Check man mkshortcut
Back to HomePage