4

I'm running Cygwin under Windows 7. How can I create a start menu entry (or desktop shortcut) to start xterm?

Currently, I have to start the Cygwin/X server, and each time I want a new xterm, I have to right click on the X server icon in the tray, and go to Applications->xterm, which is a pain. I tried to execute C:\cygwin\bin\xterm.exe after setting DISPLAY=:0.0. This brings up xterm, but gives a lot of errors on startup, and my environment (env variables, etc.) seems to be completely different from an xterm started up by using the X server tray icon.

PonyEars
  • 957

3 Answers3

4

You need to start a bash login shell in the new xterm as well:

mkshortcut -D -n xterm -a "xterm -display :0 -e /bin/bash -l" /usr/bin/run

This works for me.

suspectus
  • 5,008
Johan
  • 56
2

Presuming you always use DISPLAY=:0, try the following:

mkshortcut -D -n xterm -a "xterm -display :0" /usr/bin/run

This will create a shortcut on your Desktop. Removing the -D flag will add the shortcut to the Start Menu toplevel instead. See man mkshortcut for more options.

Yaakov
  • 793
0

The mkshortcut works, but the PATH is missing /usr/local/bin:/usr/bin: at its beginning. To solve it, you can either edit /etc/bashrc or ~/.bashrc and add the following at the end of the file:

PATH=/usr/local/bin:/usr/bin:$PATH
Jawa
  • 3,679