473,796 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use cygwin xterm and db2

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=\cy gwin
SET
PATH=.;%CYGWIN_ ROOT%\bin;%CYGW IN_ROOT%\usr\X1 1R6\bin;%PATH%; %C:/Program
Files/IBM/SQLLIB/BIN%
if exist %CYGWIN_ROOT%\t mp\.X11-unix\X0 goto STARTXTERM
if not exist %CYGWIN_ROOT%\t mp\.X11-unix\X0 goto STARTXSERVER

:STARTXSERVER
if exist %CYGWIN_ROOT%\t mp\.X11-unix rmdir %CYGWIN_ROOT%\t mp\.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
0 1262

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2924
by: Leonardo Henrique Machado | last post by:
Is is possible to create a link that opens a xterm window? The person clicks on the links and a funcion calls /usr/bin/X11/xterm -e ssh <IP> which gives the person a shell on that IP machine. How could I do it?
0
2339
by: dw | last post by:
Pehaba, does anyone knows how to install MySQLdb on cygwin? - test device: MySQLdb 0.9.2.0 targz + cygwin 1.5.7-cr-0x9e + python 2.3.3 on cygwin + mysql 4.0.17 win32 - modified setup.py's using thread library.. NO, library + include
0
1966
by: Stelios Xanthakis | last post by:
Hi. I'm trying to open an xterm in slave mode connected to a pseudo tty with an interactive python shell. This can be useful when working in a GUI to pop up xterm'd shells. The program below is a first attempt. It opens an xterm with an interactive python interpreter in which we can even run "os.system ('bash')" and call vi. However there are problems...
4
4191
by: Dennis | last post by:
Hi, I suppose this post could fall under comp.os.linux/comp.os.unix as well, but I figured since my end goal was control from C++ code I figured this group might be the place to start. As the subject states, is it possible to control an xterm running on a linux desktop from another standalone program? For example, suppose I have program running inside an xterm on the desktop. From another piece of software I would like to be able to...
4
13374
by: goberle | last post by:
I have installed the Cygwin package under WinXP. I am trying to insure that I have a reasonable development environment, and that things are working properly, by trying to compile and run the following classic program. $ cat hellow.cpp #include <iostream> int main (int argc, char *argv) { cout << "Hello, world" << endl;
16
2842
by: Michael | last post by:
Hi All, Why when I complile and run the following: #include "stdio.h" main(void) { printf("test test test\n"); }
20
3964
by: valpa | last post by:
I'm a net admin for about 20 unix servers, and I need to frequently telnet on to them and configure them. It is a tiring job to open a xterm and telnet, username, password to each server. Can I do it automatically by python? After that, there have 20 xterm consoles opened and telneted to their corresponding servers. Then I could start to type command in these xterms. Any suggestion appreciate. Much thanks.
0
1335
by: Roy, Anirban (Anirban) | last post by:
Hi, I am new to Pythion world. My Objective : I want to open an Xterm and try to send message to that xterm. I dont want to use Expect script. I have written a small program import os
4
3755
by: Gregory Bloom | last post by:
I'm running Python 2.5 under Windows. If I fire up IDLE and enter: it works like a champ, opening the page in Firefox. Same thing goes from a Windows cmd shell: it works as advertised. But if I open a cygwin bash shell and try the same thing from a python prompt, I get: Traceback (most recent call last):
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.