public inbox for blinux-list@redhat.com
 help / color / mirror / Atom feed
From: "L. C. Robinson" <lcr@onewest.net>
To: <blinux-list@redhat.com>
Subject: Re: red hat system almost talking
Date: Sun, 9 Sep 2001 04:31:26 -0600 (MDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0109082327240.1105-200000@rupin.localnet> (raw)
In-Reply-To: <Pine.LNX.4.33.0109082056260.15301-100000@ns.shellworld.net>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4054 bytes --]

On Sat, 8 Sep 2001, Jude DaShiell wrote:

> then I hear the at sign, and all the rest is silence.  If I hit ackspace I
> don't hear the beep so this thing is still coming up in gnome mode.  I

Gnome isn't really relevant here, it's the X11 (X-windows) system
that underlies it.  X is the graphical mode of linux, and you
want to directly boot into text mode.  That is controlled by
runlevel, in /etc/inittab, or on the boot command line.  The
runlevels are explained in the commentary in /etc/inittab at the
top.  X is runlevel 5.  Text mode with networking (so you can
use the internet), is 3.  So the next time you boot linux, you can
just add a 3, surrounded by white space, after your kernel name.

Then make a safety copy of /etc/inittab (the system won't boot if
it gets scrambled, unless you boot with the "emergency" or "-b"
boot parameter into a very limited, stupid system state, where a
sighted user could make repairs (speech probably wouldn't work,
except for experts):

cp /etc/inittab /etc/inittab.save

You should find that the first non-comment line says:

id:5:initdefault:

You just change the 5 to 3:

id:3:initdefault:

After that, runlevel 3, which RedHat (and most everyone else)
configures as textmode, will be the default init state, as the
initdefault keyword suggests, and the system will have be told
specifically to boot into another level if you want anything else.

You can also change system runlevels using the telinit program,
without rebooting.

Even when graphical X is active, textmode is always active on
another virtual console, at the same time, which, as others have
pointed out, can be reached with a key combination (Ctrl-Alt-F1).
X is probably running on virtual console 7 (Alt-F7, from text
mode, the Ctrl is not needed except in X).  RedHat has text
mode login prompts running on the first 6 virtual terminals,
(Alt-F1 through Alt-F6) so X takes the next available one.

Note that even if speech is installed, it won't work if you go
directly to init 5 (graphical mode), until you shift to a text
virtual screen, as discussed.

For the silence, you could add something like the following to
one of the system startup files, probably at the end of
/etc/rc.d/rc.local

play /usr/share/sounds/startup2.wav

# In case sound isn't working, simply add:
echo -e "\a"  # \a is the bell character
sleep 1  # pause 1 second
echo -e "\a"
sleep 1
echo -e "\a"
# repeat as desired

# You could also try (for the first serial port, if you have a
# synth connected there):
echo "System is booted, and speech is active." > /dev/ttyS0

I have included the above in a working script attached, as
/etc/rc.d/boot.notice.audio
Complete installation, configuration, and other
instructions are included in the script commentary.

There is also stuff in the script to automatically switch you to
text mode if your system comes up in the GUI.

I wonder if you couldn't use the RedHat kickstart upgrade scheme
to script the automated installation of speech packages, and
their proper configuration.  I know I could do it, except I don't
know any of the specifics for particular speech hardware, and
can't test it.  I wrote in my contribution to the blinux-FAQ that
kickstart wasn't for beginners, but after reading how difficult
interactive installation really can be for listers here, I have
revised my view.  Maybe kickstart would be an easier way, for
many, if not most users.  If things didn't go right, one could
just tweak the script a bit, and try again, and it should be very
fast, with no output to slow it down.  Has anyone tried this?
See the chapter in the RH reference guide on kickstart for
details, and the HOWTO, plus the sample kickstart config file in
the doc dir on the CD for examples.

LCR

-- 
L. C. Robinson
reply to no_spam+munged_lcr@onewest.net.invalid

People buy MicroShaft for compatibility, but get incompatibility and
instability instead.  This is award winning "innovation".  Find
out how MS holds your data hostage with "The *Lens*"; see
"CyberSnare" at http://www.netaction.org/msoft/cybersnare.html

[-- Attachment #2: /etc/rc.d/boot.notice.audio --]
[-- Type: TEXT/PLAIN, Size: 2672 bytes --]

#! /bin/sh
# /etc/rc.d/boot.notice.audio
# Give audio notice of completed bootup

# INSTALL instructions:
# Read all the commentary in this file before using, and configure as necessary.
# Install this script as: 
# /etc/rc.d/boot.notice.audio
# and set the permissions on this script by doing:
# chmod 755 /etc/rc.d/boot.notice.audio

# Run it from /etc/rc.d/rc.local or equivalent file for your distribution,
# by adding this to the end:
# /etc/rc.d/boot.notice.audio

# This script will self install (for RedHat systems) if you run it as:
# sh this_file install
# You have to be "root" to do this.
# This will run it from rc.local

# Alternatively, if you want to have it run directly from your inittab, do:
# sh this_file install inittab
# That would probably work for any distribution.

# Installation command block: 
if [ "$1" = install ]; then 
   set -x
   grep boot.notice.audio /etc/rc.d/rc.local /etc/inittab && exit 1
   cp $0 /etc/rc.d/boot.notice.audio
   chmod 755 /etc/rc.d/boot.notice.audio
   if [ "$2" != inittab ]; then 
      echo "/etc/rc.d/boot.notice.audio" >> /etc/rc.d/rc.local 
   else
      cp /etc/inittab /etc/inittab.save # for safety
      echo "au:2345c:once:/etc/rc.d/boot.notice.audio" >> /etc/inittab 
      echo "Test this installation by running:"
      echo "telinit c"
   fi
   echo "Installation complete"
   exit
fi

# Licensed under the GPL (GNU public license: that means it's free, with No
# warrantee whatsoever).
# Send suggestions for improvements to lcr@onewest.net
# Tell me if you want one for shutdown, too. (just try putting this at
# end of the halt script, eg, /etc/rc.d/init.d/halt, for starters)


# Begin useful script:

set `/sbin/runlevel`
if [ X$2 = X5 ] ; then
   # echo "We are in runlevel $2, so X is active." 
   # Change to virtual text terminal one after a suitable pause to allow X to get
   # through shifting you to that (X) console:
   (
      # Wait done in a backgound subshell to allow us to continue.
      # sleep 7 + 20 seconds, as necessary:
      sleep 7
      sleep 20
      # Change to the first virtual terminal:
      chvt 1 
   ) &
fi

# In case sound isn't working:
echo -e "\a\c"  # \a is the bell character
sleep 1  # pause 1 second
echo -e "\a\c"
sleep 1
echo -e "\a\c"
# repeat as desired

play /usr/share/sounds/startup2.wav

# You could also try (for the first serial port, if you have a
# synth connected there):
# Let me know if this works (I can't test it).
# echo "System is booted, and speech is active." > /dev/ttyS0
# 2nd port:
# echo "System is booted, and speech is active." > /dev/ttyS1


  parent reply	other threads:[~ UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Jude DaShiell
 ` Mike Gorse
 ` red hat system almost talking: question related to comments Cheryl Homiak
   ` Jude DaShiell
   ` Janina Sajka
     ` Cheryl Homiak
       ` S. Massy
 ` L. C. Robinson [this message]
   ` red hat system almost talking Jude DaShiell
     ` L. C. Robinson
       ` Jude DaShiell
   ` Janina Sajka
 ` Janina Sajka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0109082327240.1105-200000@rupin.localnet \
    --to=lcr@onewest.net \
    --cc=blinux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).