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
this.

Note the use of db2cmd /w /i

@echo off

SET DISPLAY=127.0.0.1:0.0
SET CYGWIN_ROOT=\cygwin
SET
PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\b in;%PATH%;%C:/Program
Files/IBM/SQLLIB/BIN%
if exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto STARTXTERM
if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto STARTXSERVER

: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

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

@echo on
exit

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.