I want to do this so I can forward commands to gnuplot from a shell script i have on cygwin, the steps where taken from the web[1,2].
Make sure you have the x11 packages installed in your cygwin and go to step 3, if not start from 1
- Run the Cygwin installer (You can obtain cygwin from here: http://www.cygwin.com/setup.exe .
- At the package list, select to install all packages that are under the X11 category. Click next, accept all the dependencies, and install.
- In the Cygwin shell, run startxwin
- In your Cygwin shell, run
export DISPLAY=:0.0
.
You'll need to repeat step 3 every time you reboot your computer, and step 4 every time you open a new Cygwin shell (or just run
echo "export DISPLAY=:0.0" >>~/.bash_profile
to have it run automatically whenever you create a new shell).