#!/bin/bash
PATH=$PATH:/usr/local/lib/inx
. inx_essentials
maybe_switch

function f-hints ()
{

hint-escape ()
{
read -s -n 1 HINT_ESCAPE
    case $HINT_ESCAPE in
        m)
	exec tools
	;;
	*)
	;;
    esac
}

# Tips on tty and so on ... inx
clear
fig-col
printf "\n"
figlet "  Hints"
info-col
echo "	 - Things that make working with inx easier"
printf "\n"
head-col
echo "  Multiple Log-ins"
printf "\n"
info-col 
cat << EOB
    The screen you are looking at is only one of 6 available to you.
    There are several ways to navigate from one to another:

    1) You can hold down the <alt> key and move left to right, 
       or vice versa, with the "arrow" keys

    2) You can use <alt> <F1-6>
 
    3) You can type for example " chvt 5 " to move to tty5

    - Note that by default you will have logged in on tty1 - the left-most screen

    4) In some programs ( notably the links2 / xlinks2 browser ) 
       alt-F* won't work, and neither will alt <arrow keys> . 
EOB

echo
cat << EOB2
  Why should you care about this? Well, it is nice, for example, 
  to park your music playing on tty6 and your irc client on tty5,
  with maybe a picture viewer on tty4 and so on - while you work in tty1
  and tty2. 
EOB2
printf "\n"

cat << EOB3
  If you run the GNU screen program on one or several of these,
  you multiply your choices -  see the "tour" of GNU Screen for more on that subject.
EOB3

printf "\n"
head-col
echo "  These hints are in bite-sized chunks of a page each"
echo "  Hit < m > to return to the tools menu, any other key to continue. "
white
hint-escape

clear
printf "\n\n"
head-col
echo "  Music Players"
printf "\n"
info-col
cat << EOM
  "inx" uses the mplayer multimedia program by default,
  because it does both video and sound,
  and handles streams without work-arounds. Also included are 
  "moc" which handles m3u and scpls, and ogg123 and mpg321, 
  which play Ogg Vorbis or mp3 files. 

  Note that the mplayer now is able to play both
  Real Media and Windows Media without extra codecs.

  The "plait" and "plaiter" scripts, also included,
  have been configured to use mplayer for the reasons
  above. Plait does quite a few cool things beyond what
  I have used it to do. You can learn more about Plait
  and its capabilities by reading the documents in the
  "plait" directory under $HOME

  Note that mplayer and mpg321 are both released under the GPL 
  and are therefore Free Software in the "Freedom" sense.
  
  See the "copyright" files under /usr/share/doc 
  for each package, to see licence terms.

  Some countries subscribe to the ridiculous notion that 
  software is patentable. This is a separate issue.
  Civil disobedience is sometimes justified. 

EOM
white
hint-escape

clear
head-col
echo "  Saving and Writing"
echo 
info-col
cat << EOW
  Since INX is a live CD, anything that you do is temporary and disappears on halt
  or reboot.

  There are a few things you can do to make your work more permanent.

  1) You can save it to an external device. Most popular these days would be a USB
     device - a "stick" or "pen drive" for example, or a USB hard disc. INX has a
     semi-automatic way of doing this. Just choose the USB menu item.
   
     The way to use this is briefly described in that sub-menu, but essentially you
     wait for the system to "see" the device ( signalled by the appearance of some
     text at the bottom of the screen), then hit <enter> to see the "mount point"
     for the device. The rest is pretty straightforward. You can either use a file
     manager to save or access to and from the device, or do it on the command line.
   
     Thus you can save your files to re-use later.
   
  2) If you have a hard drive on your computer, you can "mount" a partition and move
     your work to it. 
   
     Linux partitions, or fat32 partitions, are writeable from INX.
     "ntfs-3g" makes writing to ntfs partitions possible.
   
     The "inx" user, however, has a "uid" number of 999. Since your "user" on a linux
     partition is likely to have a different number, (1000 and up on Debian-based systems),
     user "inx" will be able to read, but not write. You can overcome this by creating a
     new user with the right "uid" - but this is left, as the books are fond of saying, as 
     "an exercise for the reader"...
   
     You can, of course, use your sudo rights to write as "root" - but be careful if
     you do this. Permissions will then belong to root - and the potential to wreck your
     system is very real, too.
EOW
white
hint-escape
exec tools
}

f-hints