--- Steve Palmer <lumpyhed@yahoo.com> wrote:
oooooo a pool of knowledge! ^_^
Heh :)
Now I have to say i have no prior knowledge of this alias setup - for starters i have no 'bash_profile' folder, but i assume the profile.d is the place i want to be?
Ah, right. Which distribution are you using?? If you are using SuSE, then create (if not already) a file called: "/etc/profile.local" In that, add exactly as before the alias as written, and then save the file, and type: source /etc/profile.local (all of this ought to be carried out as user "root")
I can enter the alias command, and it appears to work but no csh/sh file is created anywhere, so i had a look at the mc.csh which is one for midnight commander and redid and resaved it as the alias file i want. Theres a sh file for it too, though i don't know whether thats applicable.
Ahh, you're looking in the wrong place, my friend. Follow my instructions as above :)
Then you 'source' it? it didn't appear to do much either ;) I assume in the samba.conf it goes 'printcap name = lpstat_sleep'?
Sourcing a file does nothing visible except re-export environment variable.....and it is a good thing :) I added the changes for the
print commands too. Its printing, but theres no printing delay or prevention of multiple jobs from one user.
Probably because the alias is not working.
I did a 'man alias' but all i got was a complete listing of bash arguements :(
That's because "alias" is a shell bultin and as such is in the: "man bashbuiltins" Alternatively, you can run: help alias from the command-line instead. HTH, let me know how things get on, -- Thomas Adam :)
--- Thomas Adam <thomas_adam16@yahoo.com> wrote: > --- Steve Palmer <lumpyhed@yahoo.com> wrote:
its being run by the 'print command' within samba, with the printcap as 'lpstat'. I'm not sure whether you can do multiple lines of commands though.
I've
been sodding around with this CUPS/Samba setup for months now it seems ^_^
Ah.....
"lpstat" is a shell program. Therefore, what you could do is be clever and do something like:
alias lpstat_sleep='sleep 60s && lpstat'
in your "/etc/bash_profile" file.
Then source it
. /etc/bash_profile
Then change your SAMBA definition so that "printcap" now reads equal to "lpstat_alias". This'll then give you your 60 sec. delay.
You'll have to modify the alias to suit your needs though. I'm sure there is an easier way, but this is perhaps a suitable fix for now :)
HTH,
-- Thomas Adam
===== Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer