--- Holger Krull ha scritto:
Holger Krull schrieb:
Holger Krull schrieb:
I was to fast on my last email. I tested it now:
You need (on windows):
set DISPLAY=127.0.0.1:0.0 c:\cygwin\bin\bash.exe
-l /home/krull/test.sh
(it is important that there is no space between
0.0 and )
As someone pointed out in another post the sequence ps |grep has a risk of
finding grep itself in the list. The command pgrep combines both and hasn't
that risk.
Thanks Holger. Now this works perfectly. It does open
up a Windows cmd window – which remains open until I
finish with my app –
On Mon, Oct 01, 2007 at 05:33:12PM +0100, Phil Betts wrote:
It's probably not the cause of your problem, but you should
never use ps | grep xxx to detect if a process is running.
This is because the grep process will (sometimes) detect
itself and give you a false positive, and your xterm will
[EMAIL PROTECTED] wrote on Tuesday, October 02, 2007 4:21 PM:
On Mon, Oct 01, 2007 at 05:33:12PM +0100, Phil Betts wrote:
It's probably not the cause of your problem, but you should
never use ps | grep xxx to detect if a process is running.
This is because the grep process will (sometimes)
--- Holger Krull ha scritto:
As someone pointed out in another post the sequence
ps |grep has a risk of finding grep itself in the
list. The command pgrep combines both and hasn't
that risk.
Thanks for this tip.
That can be avoided by dual nested start like:
C:\cygwin\bin\bash.exe -c
O. Olson schrieb:
--- Holger Krull [EMAIL PROTECTED] ha scritto:
Teach your email program to not include the full email adress while quoting!
#!/bin/sh
if `ps | grep XWin /dev/null`
I suggest using grep -i
to make it case ignoring. I found a cygwin installation that has Xwin and not
Holger Krull schrieb:
I was to fast on my last email. I tested it now:
You need (on windows):
set DISPLAY=127.0.0.1:0.0 c:\cygwin\bin\bash.exe -l /home/krull/test.sh
(it is important that there is no space between 0.0 and )
test.sh:
#!/bin/sh
ps |grep -i /xwin /dev/null
if [ $? -eq 0 ]
then
Holger Krull schrieb:
Holger Krull schrieb:
I was to fast on my last email. I tested it now:
You need (on windows):
set DISPLAY=127.0.0.1:0.0 c:\cygwin\bin\bash.exe -l /home/krull/test.sh
(it is important that there is no space between 0.0 and )
test.sh:
#!/bin/sh
ps |grep -i /xwin
O. Olson wrote on Monday, October 01, 2007 1:49 AM::
I still don't think I can get this to work. I tried
this from the command line (and my file is in
/usr/local/bin/sd.sh)
C:\cygwin\bin\bash --login /usr/local/bin/sd.sh
This still brings up the Fatal Error Window.
It's probably
O. Olson schrieb:
Is there any way of checking if the X Server is
currently running? Because if you try this again, it
gives you “A fatal error” … which does not crash your
computer – but is a bit annoying to me.
There probably is a more elegant solution but doing
ps |grep Xwin
O. Olson wrote:
Is there any way of checking if the X Server is
currently running? Because if you try this again, it
gives you a fatal error which does not crash your
computer, but is a bit annoying to me.
When XWin starts it writes a lock file /tmp/.X11-unix/X0.
When XWin ends
O. Olson wrote:
Is there any way of checking if the X Server is
currently running? Because if you try this again, it
gives you “A fatal error” … which does not crash your
computer – but is a bit annoying to me.
The checkX program is written specifically to do this.
#!/bin/sh
if
--- Charles Wilson [EMAIL PROTECTED] ha
scritto:
O. Olson wrote:
Is there any way of checking if the X Server is
currently running? Because if you try this again,
it
gives you A fatal error
which does not crash
your
computer but is a bit annoying to me.
The checkX
--- Holger Krull [EMAIL PROTECTED] ha scritto:
There probably is a more elegant solution but doing
ps |grep Xwin /dev/null || run Xwin -your options
here
will only start Xwin if it is not running already.
(Assuming you will only start one Xwin)
Dear Holger,
I dont think I
O. Olson wrote:
--- Holger Krull [EMAIL PROTECTED] ha scritto:
There probably is a more elegant solution but doing
ps |grep Xwin /dev/null || run Xwin -your options
here
will only start Xwin if it is not running already.
(Assuming you will only start one Xwin)
Dear Holger,
On 2007-09-30, O. Olson wrote:
Thanks Chuck. This looks like what I need - but how do
I get this checkX program. It does not seem to be
there in my path.
Any pointers on where it would be installed.
You can use 'cygcheck' to find the Cygwin package the contains a
particular program.
O. Olson schrieb:
--- Holger Krull [EMAIL PROTECTED] ha scritto:
There probably is a more elegant solution but doing
ps |grep Xwin /dev/null || run Xwin -your options
here
will only start Xwin if it is not running already.
(Assuming you will only start one Xwin)
I don’t think I
--- Gary Johnson [EMAIL PROTECTED] ha
scritto:
You can use 'cygcheck' to find the Cygwin package
the contains a
particular program. For example,
$ cygcheck -p checkX
Found 2 matches for checkX.
checkx/checkx-0.1.0-1 checks to see if Xserver
is usable
O. Olson wrote:
--- Gary Johnson [EMAIL PROTECTED] ha
scritto:
You can use 'cygcheck' to find the Cygwin package
the contains a
particular program. For example,
$ cygcheck -p checkX
Found 2 matches for checkX.
checkx/checkx-0.1.0-1 checks to see if Xserver is usable
--- Bengt-Arne Fjellner [EMAIL PROTECTED]
ha scritto:
Just run setup click next until your in the
categories window.
Click view till you reach not installed.
scroll down till you see checkX
select it and then next.
--
tel 0920 49 1894
Bengt-Arne Fjellner
Thanks Bengt-Arne for your
--- Holger Krull [EMAIL PROTECTED] ha scritto:
I misstyped XWin, it is W not w. Sorry, i didn't
test it.
Dear Holger,
I can get your suggestion of
ps |grep XWin /dev/null ||XWin -multiwindow
-clipboard -silent-dup-error
to work from the Cygwin Command Prompt as well as from
a
O. Olson schrieb:
ps |grep XWin /dev/null ||XWin -multiwindow
-clipboard -silent-dup-error
to work from the Cygwin Command Prompt as well as from
a script file (.sh). I am now trying to copy and
modify my startxwin.bat file – to see if it can do
I suggest you start the shell script from a
On 2007-09-30, O. Olson wrote:
Thanks Bengt-Arne for your quick reply. I think I got
this installed. I now put the following into a file
and am trying to execute it from the cygwin prompt. I
get the error
/usr/X11R6/bin/sd.sh: line 8: syntax error near
unexpected token `fi'
--- Gary Johnson [EMAIL PROTECTED] ha
scritto:
My guess is that you created that file with DOS line
endings. Try
converting it to use Unix line endings,
cd /usr/X11R6/bin
d2u sd.sh
then try executing it again.
Also, I would recommend putting such scripts that
you create
--- Holger Krull [EMAIL PROTECTED] ha scritto:
I suggest you start the shell script from a
batchfile.
Like:
C:\cygwin\bin\bash.exe -l yourstartscript.sh
Or make an Windows Icon with that command.
If yourstartscript.sh is not found you have to give
the full path to it in cygwin
--- Holger Krull [EMAIL PROTECTED] ha scritto:
I suggest you start the shell script from a
batchfile.
Like:
C:\cygwin\bin\bash.exe -l yourstartscript.sh
Or make an Windows Icon with that command.
If yourstartscript.sh is not found you have to give
the full path to it in cygwin
On 2007-10-01, O. Olson wrote:
--- Gary Johnson [EMAIL PROTECTED] ha
scritto:
My guess is that you created that file with DOS line
endings. Try
converting it to use Unix line endings,
cd /usr/X11R6/bin
d2u sd.sh
then try executing it again.
Also, I would recommend
--- Gary Johnson [EMAIL PROTECTED] ha
scritto:
You're welcome.
I've written a few batch files that call Bash
scripts, but to be
honest, I seldom get these right the first
time--there is usually
some aspect of the transition from Windows/DOS to
Cygwin that I
overlook. Since you're
28 matches
Mail list logo