Enabling DISPLAY environment variable for X11 forwarding from cygwin

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 here and there

Make sure you have the x11 packages installed in your cygwin and go to step 3, if not start from 1

  1. Run the Cygwin installer (You can obtain cygwin from here: http://www.cygwin.com/setup.exe

  2. At the package list, select to install all packages that are under the X11 category. Click next, accept all the dependencies, and install

  3. In the Cygwin shell,

    run startxwin
  4. 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 do

echo "export DISPLAY=:0.0" >>~/.bash_profile

to have it run automatically whenever you create a new shell


Comments powered by Disqus