Skip to content

Instantly share code, notes, and snippets.

@samdbmg
Created August 31, 2016 15:11
Show Gist options
  • Save samdbmg/97e0ece4df6387e589816f75983b3d13 to your computer and use it in GitHub Desktop.
Save samdbmg/97e0ece4df6387e589816f75983b3d13 to your computer and use it in GitHub Desktop.
Run the Cygwin gnome-terminal from a Windows shortcut (and start the keyring daemon)
#!/bin/bash
# Place this somewhere sensible - your Cygwin home directory should suffice
export DISPLAY=:0.0
#if [ -n "$DESKTOP_SESSION" ];then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
export GNOME_KEYRING_CONTROL
#fi
/usr/bin/gnome-terminal.exe
Create a shortcut in your Startup folder to run the XWin Server:
Target: C:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; /usr/bin/startxwin"
Start In: C:\cygwin64
Comment: /usr/bin/run.exe
Create a shortcut in the start menu to run the .startterminal.sh script (note the path following -c is a Cygwin path):
Target: C:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "/path/to/.startterminal.sh"
Start In: C:\cygwin64
Comment: /usr/bin/run.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment