Re: RunningX revisited

2001-04-28 Thread Suresh Ramasubramanian

* Bob Bell <[EMAIL PROTECTED]>:

->On Sat, Apr 21, 2001 at 10:48:14AM +0800, Horace G. Friend III <[EMAIL PROTECTED]> wrote:
->> gcc -o RunningX RunningX.c -lX11
->> /usr/bin/ld: cannot find -lX11
->> collect2: ld returned 1 exit status
->> I'm on a RH7 box running kernel 2.2.16 and gcc-2.96-69. Can someone pls.
->> figure out why I can't compile and what needs to be done?

I hear that gcc on redhat 7.0 is an experimental (and rather broken) version.
You might want to try compiling RunningX using kgcc (if I'm not wrong).

->Try using the following:
->gcc -o RunningX RunningX.c -L/usr/X11R6/lib -lX11

-- 
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin  



Re: RunningX revisited

2001-04-25 Thread Bob Bell

On Wed, Apr 25, 2001 at 12:59:11PM +0800, Horace G. Friend III <[EMAIL PROTECTED]> wrote:
> One follow-up question if you don't mind. The RunningX binary is approx.
> 14K while the shell script is less than 1K. Is there any advantange of
> using the binary over the script considering it's huge size?

They are not equivalent.  Whether or not $DISPLAY is set is not
necessarily equivalent to whether or not X is running.  RunningX not
only checks to see if X is running, but checks to ensure that the
display can be opened.

-- 
Bob Bell <[EMAIL PROTECTED]>
-
 "Suppose I want to take over the world. Simplicity says I should
  just take over the world by myself."
   -- Larry Wall, creator of the Perl programming language



Re: RunningX revisited

2001-04-25 Thread Horace G. Friend III

On Mon, Apr 23, 2001 at 12:34:48PM -0400, Bob Bell wrote:
> On Sat, Apr 21, 2001 at 10:48:14AM +0800, Horace G. Friend III <[EMAIL PROTECTED]> wrote:
> > I also d/led the RunningX.c code from mutt.org and compiled it as
> > suggested in the code but I get a compile error. I run
> > 
> > gcc -o RunningX RunningX.c -lX11
> > 
> > but I get the error
> > 
> > /usr/bin/ld: cannot find -lX11
> > collect2: ld returned 1 exit status
> > 
> > I'm on a RH7 box running kernel 2.2.16 and gcc-2.96-69. Can someone pls.
> > figure out why I can't compile and what needs to be done?
> 
> Try using the following:
> gcc -o RunningX RunningX.c -L/usr/X11R6/lib -lX11
> 

Thanks Bob. This time it worked.

One follow-up question if you don't mind. The RunningX binary is approx.
14K while the shell script is less than 1K. Is there any advantange of
using the binary over the script considering it's huge size?

TIA.

-- 
Horace G. Friend III
[EMAIL PROTECTED]
GnuPG DSA/ElGamal Key Fingerprint
9295 80C4 C723 621B 9C2D  B53E D432 7936 4CA9 8AD6



Re: RunningX revisited

2001-04-23 Thread Bob Bell

On Sat, Apr 21, 2001 at 10:48:14AM +0800, Horace G. Friend III <[EMAIL PROTECTED]> wrote:
> I also d/led the RunningX.c code from mutt.org and compiled it as
> suggested in the code but I get a compile error. I run
> 
> gcc -o RunningX RunningX.c -lX11
> 
> but I get the error
> 
> /usr/bin/ld: cannot find -lX11
> collect2: ld returned 1 exit status
> 
> I'm on a RH7 box running kernel 2.2.16 and gcc-2.96-69. Can someone pls.
> figure out why I can't compile and what needs to be done?

Try using the following:
gcc -o RunningX RunningX.c -L/usr/X11R6/lib -lX11

-- 
Bob Bell <[EMAIL PROTECTED]>
-
 "One reason that few people are aware there are programs running the
  internet is that they never crash in any significant way: the free
  software underlying the internet is reliable to the point of
  invisibility. "
   -- Glyn Moody at http://www.guardianunlimited.co.uk/



RunningX revisited

2001-04-20 Thread Horace G. Friend III

Hi,

I have finally figured out how make RunningX work with ~/.mailcap.

 Begin RunningX script
#!/bin/sh
if [ -e /tmp/.X0-lock ]
  then 
exit 0
  else
exit 1
fi
 End RunningX script


I also d/led the RunningX.c code from mutt.org and compiled it as
suggested in the code but I get a compile error. I run

gcc -o RunningX RunningX.c -lX11

but I get the error

/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

I'm on a RH7 box running kernel 2.2.16 and gcc-2.96-69. Can someone pls.
figure out why I can't compile and what needs to be done?

I have earlier tried using different RunningX shell scripts that I got
from this list but none seem to work except the one above. Oh well  

I got the above script by doing a www.google.com search.

-- 
Horace G. Friend III
[EMAIL PROTECTED]
GnuPG DSA/ElGamal Key Fingerprint
9295 80C4 C723 621B 9C2D  B53E D432 7936 4CA9 8AD6