By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,227 Members | 1,025 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,227 IT Pros & Developers. It's quick & easy.

How to use cygwin xterm and db2

P: n/a
I spent about an hour getting this today ...

For you cygwin users who want to run db2 commands
like you'd run them from a UNIX environment ....

Create a C:/cygwin/usr/X11R6/bin/startlocalxterm.bat
script like this one and start your xterm session using

Note the use of db2cmd /w /i

@echo off

PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\b in;%PATH%;%C:/Program
if exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto STARTXTERM
if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto STARTXSERVER

if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
start XWin -clipboard -multiwindow -emulate3buttons

REM SLEEP for a second to make sure the server has time to start up
echo "Starting X Windows Server..."
sleep 2

db2cmd /w /i run xterm -ls -sb -title %COMPUTERNAME%-%USERNAME% -font
9x15 -fg black -cr purple -bg PaleGoldenrod

@echo on

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.