Linux-Misc Digest #430, Volume #27               Fri, 23 Mar 01 15:13:02 EST

Contents:
  Re: printing doesn't work (Bart Friederichs)
  Re: printing doesn't work (Stefano Ghirlanda)
  Re: Making .bat-file in linux (Bart Friederichs)
  Re: Making .bat-file in linux (Bart Friederichs)
  Re: Making .bat-file in linux ("The Spook")
  Re: Making .bat-file in linux (Federico Bravo)
  Re: RPM exe upgrade v3 => v4 (=?ISO-8859-1?Q?Rasmus_B=F8g_Hansen?=)
  Re: Making .bat-file in linux ([EMAIL PROTECTED])
  Re: Making .bat-file in linux (Jeremiah DeWitt Weiner)
  Realplayer: how to add one's own bookmarks? (Peter Petersen)
  ALSA problems (Peter Petersen)
  Re: ALSA problems (Peter Petersen)
  Re: ALSA problems (Peter Petersen)
  time -f stopped working ("Mike Maxwell")
  Firewall authentication? (Steve Bui)
  Re: time -f stopped working ("Davide Bianchi")
  Re: time -f stopped working ("Mike Maxwell")
  Re: Linux for a 486? (Troy Loveday)

----------------------------------------------------------------------------

From: Bart Friederichs <[EMAIL PROTECTED]>
Subject: Re: printing doesn't work
Date: Fri, 23 Mar 2001 17:17:06 GMT

Bart Friederichs wrote:
> 
> Hi,
> 
> I have a weird problem. My printer doesn't work. I have a Oki4w led
> printer, and the oki4drv and oki4daemon running. This results in a
> /dev/oki4drv that accepts PostScript. All is good there.
> When I
> 
> cat out.ps > /dev/oki4drv
> 
> it prints okay, but lpd won't work. My printcap file has the following
> line in it:
> 
> lp|psjet:lp=/dev/oki4drv:sd=/usr/spool/oki4w:sf:sh:if=/usr/spool/oki4w/filter.
> 
> The filter is just an empty file (made in the
> trying-to-get-the-thing-working-traject). Anybody any idea?
> 
Well, yeah... I did myself. Setting all owner/group permissions right
and kicking out the filter did it.

Bart
[EMAIL PROTECTED]
=======================================================================
> The internet is a too slow way of doing things you'd never do without
> it.
>                                               Bart Friederichs, 1998
> -------------------------------------------------------------------------

-- 
=======================================================================
The internet is a too slow way of doing things you'd never do without
it.
                                              Bart Friederichs, 1998
=========================================================================

------------------------------

From: Stefano Ghirlanda <[EMAIL PROTECTED]>
Subject: Re: printing doesn't work
Date: 23 Mar 2001 18:19:33 +0100

Bart Friederichs <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I have a weird problem. My printer doesn't work. I have a Oki4w led
> printer, and the oki4drv and oki4daemon running. This results in a
> /dev/oki4drv that accepts PostScript. All is good there. 
> When I 
> 
> cat out.ps > /dev/oki4drv
> 
> it prints okay, but lpd won't work. My printcap file has the following
> line in it:
> 
> lp|psjet:lp=/dev/oki4drv:sd=/usr/spool/oki4w:sf:sh:if=/usr/spool/oki4w/filter.
> 
> The filter is just an empty file (made in the
> trying-to-get-the-thing-working-traject). Anybody any idea?

Mhmhmhm... shouldn't the filter print to stdout what should go to the
printer? That's how I get it at least. Try removing the filter, and
also check that the spool directory can be written to by the user lpd
runs as.

-- 
Stefano - Hodie decimo Kalendas Apriles MMI est



------------------------------

From: Bart Friederichs <[EMAIL PROTECTED]>
Subject: Re: Making .bat-file in linux
Date: Fri, 23 Mar 2001 17:24:29 GMT

Hi,

>I want to make a file to facilitate the startup of the newest version and
> newest parameters of some programs we do. That is a file, that in one call
> executes commands like:
>         /usr/cern/./Eventserv cvc 200 3 4
>         cd Whatever
>         programme 4 5 6 etc
> 
> In windows it would be a batch file - I need to do the same in Linux. Can
> anyone tell me how?

Yes, it is done with a shell script. Just create a textfile with 

#!/bin/sh

on the first line. After that you can put anything in it that you could
normally do on the commandline. Instead of /bin/sh you could use another
shell (for example bash, tcsh or so) for more functionality. If you want
total functionality overkill, use a scripting language like Perl or
Python.

Bart

-- 
=======================================================================
The internet is a too slow way of doing things you'd never do without
it.
                                              Bart Friederichs, 1998
=========================================================================

------------------------------

From: Bart Friederichs <[EMAIL PROTECTED]>
Subject: Re: Making .bat-file in linux
Date: Fri, 23 Mar 2001 17:20:37 GMT

Hi,

>         I want to make a file to facilitate the startup of the newest version and
> newest parameters of some programs we do. That is a file, that in one call
> executes commands like:
>         /usr/cern/./Eventserv cvc 200 3 4
>         cd Whatever
>         programme 4 5 6 etc
> 
> In windows it would be a batch file - I need to do the same in Linux. Can
> anyone tell me how?
Yes. It's easy.

Create a textfile with this as a first line:
#!/bin/sh

Then all your commands. Set the permissions of this file to executable
and you can run it. You have just created a shell script and it is a lot
more powerful than .bat. I used 'sh' as shell in the example, but you
can also use bash, tcsh or another shell. If you want to do more
complicated things, use Perl (or Python or any scripting language of
your choice).

Bart
=======================================================================
The internet is a too slow way of doing things you'd never do without
it.
                                              Bart Friederichs, 1998
=========================================================================

------------------------------

From: "The Spook" <[EMAIL PROTECTED]>
Subject: Re: Making .bat-file in linux
Date: Fri, 23 Mar 2001 18:32:53 +0100

abc wrote ...
-- Cut --
>In windows it would be a batch file - I need to do the same in Linux. Can
>anyone tell me how?
-- Cut --

You should make a shell script -- like this:

========== Begin: Cut here ==========
#! /bin/sh
Count=${1:-0}
while [ $Count -gt 0 ]
do
  date
  sleep 60
  Count=$[ $Count - 1 ]
done
========== End: Cut here ==========

Save this as, say, "showtime" (leave out the apostrophes), make the script
executable with the command "chmod +x showtime", run it with a command like
"./showtime 3" and see how it displays the date/time every minute for three
minutes.

I'll recommend some serious reading of the manual page for sh (or bash or
whatever shell you use) and maybe books and what you can find on the
Internet too, before doing too much real work with shell-scripts, as there
are quite some pitfalls (escaping, etc.) to shell scripts.

  /TRY



------------------------------

From: Federico Bravo <[EMAIL PROTECTED]>
Subject: Re: Making .bat-file in linux
Date: Fri, 23 Mar 2001 17:49:14 GMT

The Spook wrote:

> abc wrote ...
> -- Cut --
> >In windows it would be a batch file - I need to do the same in Linux. Can
> >anyone tell me how?
> -- Cut --
>
> You should make a shell script -- like this:
>
> ========== Begin: Cut here ==========
> #! /bin/sh
> Count=${1:-0}
> while [ $Count -gt 0 ]
> do
>   date
>   sleep 60
>   Count=$[ $Count - 1 ]
> done
> ========== End: Cut here ==========
>
> Save this as, say, "showtime" (leave out the apostrophes), make the script
> executable with the command "chmod +x showtime", run it with a command like
> "./showtime 3" and see how it displays the date/time every minute for three
> minutes.
>
> I'll recommend some serious reading of the manual page for sh (or bash or
> whatever shell you use) and maybe books and what you can find on the
> Internet too, before doing too much real work with shell-scripts, as there
> are quite some pitfalls (escaping, etc.) to shell scripts.
>
>   /TRY

What if I don't put that first line - '#! /bin/sh'  ?


------------------------------

From: =?ISO-8859-1?Q?Rasmus_B=F8g_Hansen?= <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: RPM exe upgrade v3 => v4
Date: Fri, 23 Mar 2001 19:07:17 +0100

On Tue, 20 Mar 2001, Cyrille wrote:

> I would like to know how to upgrade the RPM tool
> from version 3x to 4x.
>
> If I try rpm -U --test for package I found , rpm says :
>
> [root@ktaland2 src]# rpm -U --test rpm-4.0-4.4.src.rpm
> only packages with major numbers <= 3 are supported by this version of
> RPM
> error: rpm-4.0-4.4.src.rpm cannot be installed
>
> Do you know how to upgrade RPM ???

You have to upgrade to 3.0.5, which support v4 files, and then upgrade
to 4.0.

Rasmus

-- 
-- [ Rasmus 'M�ffe' B�g Hansen ] --------------------------------------
If you only have a hammer
everything looks like a nail
========================================= [ Remove 'spam' to reply ] ==


------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Making .bat-file in linux
Date: Fri, 23 Mar 2001 18:41:45 GMT

Federico Bravo <[EMAIL PROTECTED]> writes:
> > abc wrote ...
> > -- Cut --
> > >In windows it would be a batch file - I need to do the same in Linux. Can
> > >anyone tell me how?
> > -- Cut --
> >
> > You should make a shell script -- like this:
> >
> > ========== Begin: Cut here ==========
> > #! /bin/sh
> > Count=${1:-0}
> > while [ $Count -gt 0 ]
> > do
> >   date
> >   sleep 60
> >   Count=$[ $Count - 1 ]
> > done
> > ========== End: Cut here ==========
> >
> > Save this as, say, "showtime" (leave out the apostrophes), make the script
> > executable with the command "chmod +x showtime", run it with a command like
> > "./showtime 3" and see how it displays the date/time every minute for three
> > minutes.
> >
> > I'll recommend some serious reading of the manual page for sh (or bash or
> > whatever shell you use) and maybe books and what you can find on the
> > Internet too, before doing too much real work with shell-scripts, as there
> > are quite some pitfalls (escaping, etc.) to shell scripts.
> >
> >   /TRY
> 
> What if I don't put that first line - '#! /bin/sh'  ?

It may very well still work; it appears that if a script is marked as
executable, Linux will try using /bin/sh to execute the script.

But I wouldn't depend on it working; you may need to have a reference
to the script executor.
-- 
(concatenate 'string "cbbrowne" "@acm.org")
http://vip.hyperusa.com/~cbbrowne/wp.html
10.0 times 0.1 is hardly ever 1.0.

------------------------------

From: Jeremiah DeWitt Weiner <[EMAIL PROTECTED]>
Subject: Re: Making .bat-file in linux
Date: 23 Mar 2001 18:44:42 GMT

Federico Bravo <[EMAIL PROTECTED]> wrote:

> What if I don't put that first line - '#! /bin/sh'  ?

        That first line is what tells the kernel "this is an interpreted
script meant to be run by another program".  If it's not there, then you
have to run it like "/bin/sh myscript" instead.  No big deal.

JDW


------------------------------

From: Peter Petersen <[EMAIL PROTECTED]>
Subject: Realplayer: how to add one's own bookmarks?
Date: Fri, 23 Mar 2001 19:36:50 +0100

Hello!

My subject says it all:
How to add one's own bookmarks??
I can't find anything which would allow for doing that in realplayer
for linux.

While Realplayer under windows had that since the beginning (at least
since the very early versions I knew), there is still nothing like
that under linux. What version is it now? version 8 or so, I just
wonder...

Well, I know, one can write scripts to launch realplayer with some
specific URL, but still I would find it much more comfortable to just
be able to select my bookmarks from a menu *inside the running
realplayer and to add my own as well.

Any ideas? How do you manage your realplaye bookmarks?


Regards
Peter

------------------------------

From: Peter Petersen <[EMAIL PROTECTED]>
Subject: ALSA problems
Date: Fri, 23 Mar 2001 19:48:28 +0100

Hello again!

I switched to a new kernel, that is, I compiled a 2.4.2 kernel,
installed the most recent stable ALSA drivers, and now I have some
problems with sound (beyond the usual remaining problems with VIA AC97
under linux).

Each and every system boot resets the mixer channels to "mute", since
alsasound complains that no soundcard "snd-card-0" is found, more
exactly it is alsactl that gives that message and that it cannot set
any mixer settings therefore.

But despite this "no soundcard found" message, I do have sound!?
Only that each and any time the channels get muted again.

If I change the name of the soundcard in asound.conf, it doesn't help;
if I delete asound.conf, I get a message that asound.conf is not
found, if I just do "touch asound.conf" I get a parse error.
I can't use amixer and alsamixer, because they also think that there
is no soundcard.

I should add that I did a fresh compiling and installing of all the
needed parts: alsa-driver, alsa-lib, alsa-utils.

I now wrote my own workaround:
I use nmixer (which is part of mp3blaster), because this one works; I
call it from inside /etc/rc.d/alsasound with all the channels unmuted
and output of the call passed to /dev/null. Well, this works, so I
should be satisfied.

But isn't there a clean way to get alsactl etc. behave all right
(finding and recognizing the soundcard without any error message)?

A second problem is that ALSA doesn't give me sound in any of the
quake games (except quakeforge's quakeworld which I could compile for
SDL sound output). Furthermore, midi doesn't work directly, only by
intervention of timidity, but I can live with that.

Please, don't recommend the 2.4.2. kernel modules instead of ALSA: I
tried extensively, they don't work with my VIA AC97 (via686) chipset
(the best I can get is scratchy wav and permanent crashes, no mp3, no
cd audio etc.).

Suggestions anyone?
Thanks.


Peter 

------------------------------

From: Peter Petersen <[EMAIL PROTECTED]>
Subject: Re: ALSA problems
Date: Fri, 23 Mar 2001 19:52:05 +0100

Hi!

I forgot that:
cat /proc/asound/sndstat:

***
Config options: 0

Installed drivers: 
Type 10: ALSA emulation

Card config: 
VIA 82C686A at 0xdc00, irq 10

Audio devices:
0: VIA 82C686A (DUPLEX)

Synth devices: NOT ENABLED IN CONFIG

Midi devices:
0: MPU-401 (UART)

Timers:
7: system timer

Mixers:
0: SigmaTel STAC9721/23
***

How to enable sync?
I never read about anyone having midi with VIA AC97 under linux, by
the way...


Peter

------------------------------

From: Peter Petersen <[EMAIL PROTECTED]>
Subject: Re: ALSA problems
Date: Fri, 23 Mar 2001 19:56:48 +0100


Oh yeah, and something else I have to add :)

from /etc/modules.conf:


correcting my cancelled article:
***
alias char-major-116 snd
alias snd-card-0 snd-card-via686a
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660
snd_device_gid=17 snd_device_uid=0
post-install snd  alsactl restore
***


Peter

------------------------------

From: "Mike Maxwell" <[EMAIL PROTECTED]>
Subject: time -f stopped working
Date: Fri, 23 Mar 2001 19:09:09 GMT

For several months, I have been using lines like the following in a
makefile:

    time -f '\tUser time=%U' <dosomething>

to get the format I wanted out of the 'time' command.  Suddenly it's not
working, and instead I get the error msg

    /bin/sh: -f: command not found

So 'sh' is interpreting '-f' as a command, not as a flag on 'time'.
Likewise, if I run the 'time' command in the bash shell, I get the same
error.

Sure enough, the bash man page says nothing about a -f flag.

Am I asleep, and just dreaming that this is happening?  I haven't changed
shells (and the same thing happens under csh--but I'm sure I've been using
'bash' all along, and presumably 'make' hasn't suddenly taken a liking to
'sh').  Nor have I upgraded bash (although I did download and run vnc a few
days ago--but that can't change my shell, can it??)

I know I can set an environ var to make 'time' give me the format I want.
(At least the man claims I can--I haven't tried it yet.)  But I'd rather
control it in the makefile.

OK, I just realized that there was an actual executable program I was using
(it's at /usr/bin/time).  And I can use that in my makefile

The question remains, why all of a sudden are 'bash' and 'sh' interpreting
'time' as their own keyword, instead of using /usr/bin/time?  Or why didn't
they do this all along?

--
                                         Mike Maxwell
                                         Summer Institute of Linguistics
                                         [EMAIL PROTECTED]



------------------------------

From: Steve Bui <[EMAIL PROTECTED]>
Subject: Firewall authentication?
Date: Fri, 23 Mar 2001 11:16:06 -0800

Is it possible to create a linux box which acts as a firewall but also
authenticates incoming users? So for example, user 1 is authenticated
and gets access to computers A, B, and C while user 2 is authenticated
and gets access to computers X, Y, and Z. Thanks for your help.

--Steve

------------------------------

From: "Davide Bianchi" <[EMAIL PROTECTED]>
Subject: Re: time -f stopped working
Date: Fri, 23 Mar 2001 14:15:21 -0800

"Mike Maxwell" <[EMAIL PROTECTED]> wrote in message
news:pbNu6.4302$[EMAIL PROTECTED]...
> OK, I just realized that there was an actual executable program I was
using
> (it's at /usr/bin/time).  And I can use that in my makefile
> The question remains, why all of a sudden are 'bash' and 'sh' interpreting
> 'time' as their own keyword, instead of using /usr/bin/time?  Or why
didn't
> they do this all along?

Well, I can assume that you can have changed the PATH, modified some
standard initialization parameter in /etc/profile or in your .profile that
make
the shell use his internal 'time' or the time executable is no longer an
executable or able to be read (changed permission).

Davide




------------------------------

From: "Mike Maxwell" <[EMAIL PROTECTED]>
Subject: Re: time -f stopped working
Date: Fri, 23 Mar 2001 19:56:32 GMT

David Bianchi wrote:
>...you can have changed the PATH, modified some
>standard initialization parameter in /etc/profile or in
>your .profile that make the shell use his internal 'time'
>or the time executable is no longer an executable or
>able to be read (changed permission).

Thanks for the tips, I should have thought of that.  But so far as I can
tell, those aren't the reason.  Namely:

/bin/usr (where the 'time' executable lives) is the first dir in my PATH

/etc/profile hasn't changed since last June, and I don't have my own
.profile.  I do have a .bash_profile (maybe that's what you meant) and a
.bashrc, but they haven't changed in months, either.

/bin/usr/time is still executable, at least I can run it when I type the
path+filename (and the full path+file works fine in 'make', too).

I suppose it's got to be s.t. like that, though--maybe something that
changed when I installed vnc yesterday...
--
                                         Mike Maxwell
                                         Summer Institute of Linguistics
                                         [EMAIL PROTECTED]



------------------------------

From: Troy Loveday <[EMAIL PROTECTED]>
Subject: Re: Linux for a 486?
Date: 23 Mar 2001 19:35:32 GMT

green <[EMAIL PROTECTED]> wrote:
>I just got peanut loaded on mine with kde.

>netscape chrashes it.

>but the kde html prog works ok.

>16mb ram, 486 dx/4 100 33mhz bus 200mb disk, tvga 9800c svga card, svga
>monitor.

>don't give up it's possible.

I'm still fairly satisfied running an ancient Slackware distribution
(Linux kernel 1.2.13) on a 486 DX/2 66 w/ 32 MB RAM.  It runs X
decently.  Netscape is no problem (though it takes a few seconds to
load).

-- 
Troy Loveday                                         e-mail: <[EMAIL PROTECTED]>
ASIC Product Development / DTM                          vox: (214) 480-1497
Texas Instruments, Inc.                                 fax: (214) 480-2356
Dallas, Texas                   "Don't Tread On Me!"

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to comp.os.linux.misc.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to