* setting speakup to certain settings
@ Daniel Dalton
` Geoff Shang
` setting speakup to certain settings Jude DaShiell
0 siblings, 2 replies; 10+ messages in thread
From: Daniel Dalton @ UTC (permalink / raw)
To: Linux for blind general discussion
Hi,
I am trying to write a shell script to set all the speakup settings on
boot up. Actually not all but some. I want punc level and reading to be
at 2 and rate to be at 6.
It seems this is cleared at shutdown. Do I just run my script like this?
./scriptname.sh
This is what I did:
emacs ~/settings-speakup.sh
#!/bin/sh
echo 6 > /proc/speakup/rate
echo 2 > /proc/speakup/punc_level
echo 2 > /proc/speakup/reading_punc
(I hope the last line is correct)
when I save the file and type:
./settings-speakup.sh it says:
bash /settings-speakup.sh permission denied.
If I type it as root I get the same error.
Any ideas?
And once the script works how do I make it be ran when the box boots?
Also does anyone know of a good online guide to shell scripting?
Thanks.
--
Daniel Dalton
http://members.iinet.net.au/~ddalton/
daniel.dalton47@gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: setting speakup to certain settings
setting speakup to certain settings Daniel Dalton
@ ` Geoff Shang
` Daniel Dalton
` setting speakup to certain settings Jude DaShiell
1 sibling, 1 reply; 10+ messages in thread
From: Geoff Shang @ UTC (permalink / raw)
To: Linux for blind general discussion
Daniel Dalton wrote:
> when I save the file and type:
> ./settings-speakup.sh it says:
> bash /settings-speakup.sh permission denied.
> If I type it as root I get the same error.
> Any ideas?
You get this error because the script is not set to be executable.
Again, chmod is what you need to use to change this. consult "man chmod"
for more info.
> And once the script works how do I make it be ran when the box boots?
NOt sure if there is a definite way that you're meant to do this in Debian,
there probably is.
Start and stop scripts are usually located in /etc/init.d with a symlink to
the appropriate runlevel directory /etc/rcx.d (where x=-06 or S). Read the
init man page for more info on runlevels.
Exactly when it will run depends on which runlevel it is linked to and
where in the order it is located. Links starting with S are start scripts
and are run when the system starts, assuming it reaches that runlevel.
Links starting with K are stop or kill scripts which are run when the
system is shut down or is rebooted, depending on the runlevel.
I have a script called /etc/init.d/speakup.sh which I have symlinked to
/etc/rcS.d/S11speakup.sh
Note that such a script needs to run after the proc file system becomes
available. On my system at least this happens during the S10checkroot
script.
Of course, if you don't want to mess with all of this, you could simply
have it run when you log in. Either call it from your .bash_profile
script or even put the commands directly into that script.
Geoff.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: setting speakup to certain settings
setting speakup to certain settings Daniel Dalton
` Geoff Shang
@ ` Jude DaShiell
` Daniel Dalton
1 sibling, 1 reply; 10+ messages in thread
From: Jude DaShiell @ UTC (permalink / raw)
To: Linux for blind general discussion
Your script is probably correct, but please remember you don't yet have a
script just a text file. Now if you make that text file executable, then
it becomes a script. So, chmod 755 script.sh as root then try running it
again. Also putting such scripts into /usr/local/bin can make them
accessible to everyone on the system and protect them from yum upgrade
actions which might erase the scripts.
On Sun, 25 Nov 2007, Daniel Dalton wrote:
> Hi,
>
> I am trying to write a shell script to set all the speakup settings on boot
> up. Actually not all but some. I want punc level and reading to be at 2 and
> rate to be at 6.
> It seems this is cleared at shutdown. Do I just run my script like this?
> ./scriptname.sh
>
> This is what I did:
> emacs ~/settings-speakup.sh
>
> #!/bin/sh
> echo 6 > /proc/speakup/rate
> echo 2 > /proc/speakup/punc_level
> echo 2 > /proc/speakup/reading_punc
>
> (I hope the last line is correct)
> when I save the file and type:
> ./settings-speakup.sh it says:
> bash /settings-speakup.sh permission denied.
> If I type it as root I get the same error.
> Any ideas?
> And once the script works how do I make it be ran when the box boots?
>
> Also does anyone know of a good online guide to shell scripting?
> Thanks.
>
> --
> Daniel Dalton
>
> http://members.iinet.net.au/~ddalton/
> daniel.dalton47@gmail.com
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: setting speakup to certain settings
` setting speakup to certain settings Jude DaShiell
@ ` Daniel Dalton
` Jude DaShiell
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Dalton @ UTC (permalink / raw)
To: Linux for blind general discussion
On 2/12/2007 7:38 AM, Jude DaShiell wrote:
> Your script is probably correct, but please remember you don't yet have
> a script just a text file. Now if you make that text file executable,
> then it becomes a script. So, chmod 755 script.sh as root then try
I started reading a bash scripting guide and found that out.
Thanks.
> running it again. Also putting such scripts into /usr/local/bin can
> make them accessible to everyone on the system and protect them from yum
I don't use yum but yes. Actually I put it in /bin/speakup. Is that ok?
And I modified /etc/profile so that /bin/speakup was in my path.
--
Daniel Dalton
http://members.iinet.net.au/~ddalton/
daniel.dalton47@gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: setting speakup to certain settings
` Daniel Dalton
@ ` Jude DaShiell
0 siblings, 0 replies; 10+ messages in thread
From: Jude DaShiell @ UTC (permalink / raw)
To: Linux for blind general discussion
When speakup gets updated, you could loose your script. I understand your
motivation though. If you don't yet have a /usr/share/speakup folder on
your system you could put it in that folder once created then add that to
the path though.
On Sun, 2 Dec 2007, Daniel Dalton wrote:
> On 2/12/2007 7:38 AM, Jude DaShiell wrote:
>> Your script is probably correct, but please remember you don't yet have a
>> script just a text file. Now if you make that text file executable, then
>> it becomes a script. So, chmod 755 script.sh as root then try
>
> I started reading a bash scripting guide and found that out.
> Thanks.
>
>> running it again. Also putting such scripts into /usr/local/bin can make
>> them accessible to everyone on the system and protect them from yum
>
> I don't use yum but yes. Actually I put it in /bin/speakup. Is that ok? And I
> modified /etc/profile so that /bin/speakup was in my path.
>
> --
> Daniel Dalton
>
> http://members.iinet.net.au/~ddalton/
> daniel.dalton47@gmail.com
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
setting speakup to certain settings Daniel Dalton
` Geoff Shang
` Daniel Dalton
` Jude DaShiell
` Daniel Dalton
` Geoff Shang
` Linux and qwest Michael Malver
` setting speakup to certain settings Jude DaShiell
` Daniel Dalton
` Jude DaShiell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).