"Userfriendly" Unix Shell

"Userfriendly" Unix Shell

Post by Tobias Bro » Sun, 06 Jun 1999 04:00:00



We are to set up the configuration and make a practical course for
(completely) fresh computer students. We will set up a nice GUI, KDE
or GNOME, to let the new students easily play with the
computers. Anyway, my job will be the shell - I think it's important
to encourage the users to use a shell, and to make it as userfriendly
as possible. We will put a default, nice configuration into ~ for all
users, making it easy for them to peek into and change it/experiment
with it.

So, now I want you to help me with tips about what should be put into
the configuration. And what shell to select. The computers will be
fitted with a quite standard RedHat 6.0 setup, so bash would be the
most obvious choise of shell. Personally I have better experiences
with zsh, but perhaps this is because I haven't studied all the
possibilities in bash closely enough? I really appreciate multi-line
editing, and the possibility to get different tab-selections dependent
on what command you issue. But I guess this might be feasible in bash
as well? Another issue, even if we mainly aim towards one shell, it
should be easy for the students to change shell, meaning some
configuration might have to apply to all shells.

Please list different "nice to have"-aliases, functions and
environment settings you would have added to such a configuration.

--
TobiX                   In a world without fences, who needs gates?
http://www.td.org.uit.no/~tobias/

 
 
 

"Userfriendly" Unix Shell

Post by chris ulri » Sun, 06 Jun 1999 04:00:00




Quote:>We are to set up the configuration and make a practical course for
>(completely) fresh computer students. We will set up a nice GUI, KDE
>or GNOME, to let the new students easily play with the
>computers. Anyway, my job will be the shell - I think it's important
>to encourage the users to use a shell, and to make it as userfriendly
>as possible. We will put a default, nice configuration into ~ for all
>users, making it easy for them to peek into and change it/experiment
>with it.

  I've yet to meet a computer interface that was easy to use for someone
who knew *nothing* about computers.  The most important thing is to
make the computer be as simple as possible and have as few surprises
as possible.  I think that bash fits this bill -- it's regular, it
does many things that I think are irritating but that normal users
will love (like it ignores the stty settings and almost always allows
both delete and backspace to work, as well as the arrow keys).  Also,
if you want users to be able to customize their environment as they
get comfortable with it, because bash is relatively standard knowledge
of it will quickly be useful under ksh.  While the zsh functions are
super cool, they would be endlessly frustrating when they don't work
for those people who aren't savvy enough to understand that there are
*lots* of versions of bourne shell out there.

Quote:

>So, now I want you to help me with tips about what should be put into
>the configuration. And what shell to select. The computers will be
>fitted with a quite standard RedHat 6.0 setup, so bash would be the
>most obvious choise of shell. Personally I have better experiences
>with zsh, but perhaps this is because I haven't studied all the
>possibilities in bash closely enough? I really appreciate multi-line
>editing, and the possibility to get different tab-selections dependent
>on what command you issue. But I guess this might be feasible in bash
>as well? Another issue, even if we mainly aim towards one shell, it
>should be easy for the students to change shell, meaning some
>configuration might have to apply to all shells.

  Such things as context sensitive command line completion and multi-line
editing are power-user tools, not the sort of thing a new user would
want or care about or most importantly understand.  A simple tool
that is easy to understand is better for people who don't even
know what the tool is suppose to be used for.  Later, they can
graduate to bash with goofy extensions, ksh with tk builtin to it
or zsh.  Or even tcsh if they smoke too much hash while studying.

Quote:

>Please list different "nice to have"-aliases, functions and
>environment settings you would have added to such a configuration.

  Aliases are bad.  Functions are better.  

Quote:

>--
>TobiX                       In a world without fences, who needs gates?
>http://www.td.org.uit.no/~tobias/

  I can't help you with actual configuration files, but I can
suggest that you have an interactive help system, and in that
you can put bits and pieces of useful knowledge about *how* to
modify the environment.  I wrote a help system in bourne shell
several years ago (please forgive the StudlyCaps and all the
mistakes in it) that might be useful as an example.  You can
pick it up from
http://math.ucr.edu:8889/help/
  I tried to mimic the vms help system.  If there is interest,
I can write up some quick documentation describing how it works,
but there are lots of example help documents in it already
which are helpful for students at ucr.

  Good luck!  It's always wonderful having the opportunity to
spread your ideas of how things should be to impressionable
young students.
chris

 
 
 

"Userfriendly" Unix Shell

Post by Steven G. Johns » Sun, 06 Jun 1999 04:00:00



> Please list different "nice to have"-aliases, functions and
> environment settings you would have added to such a configuration.

Everyone has their favorites...it will be kind fun to see the different
things people do.  Here is a selection of the stuff I put in my own bash
settings:

############### in ~/.bash_profile:

# it's annoying to me when .bashrc sometimes doesn't get sourced if I
# launch the shell in different ways (e.g. login vs. non-login).  I want
# all of my settings in one place:
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

############## in ~/.bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# include the hostname and the path in the prompt:
PS1="[ \h: \w ] % "

# some tcsh-isms:
alias which="type -path"
alias where="type -all"

# append "/" to directory names and "*" to executables in ls listings:
alias ls='ls -F'

# prompt before overwriting with cp and mv:
alias cp='cp -i'
alias mv='mv -i'

# human-readable df output (GNU df only):
alias df='df -h'

# 'findsub foo' looks for files named foo in subdirectories of "."
function findsub ()
{
        for name; do
                find . -name "$name" -print
        done

Quote:}

#############

I also have a long function called 'untar' which knows how to decompress
and extract files from various different compression and archive formats,
and bunches of little aliases for things that matter only to me.

Have fun!

Cordially,
Steven G. Johnson

 
 
 

"Userfriendly" Unix Shell

Post by Tobias Bro » Mon, 07 Jun 1999 04:00:00



Thanx for the list...I think some of those are already implemented in
the "standard" RedHat configuration, but it doesn't hurt to put it
into ~/.bashrc, as it will be sort of educative.

Quote:> I also have a long function called 'untar' which knows how to decompress
> and extract files from various different compression and archive formats,

That's particularly relevant, I think. At least I found it quite
frustrating when I was a newbie, to try to read through the tar
manpage just because I couldn't remember the letters xzvf (I guess the
v is wanted for newbies - personally I always avoid it, and often add
a '&' at the end of the line) - or even worse, with the old tar piping
also needed to be done from gunzip ... that's certainly not easy to
figure out for a newbie.

--
TobiX                   In a world without fences, who needs gates?
http://www.td.org.uit.no/~tobias/

 
 
 

"Userfriendly" Unix Shell

Post by Tobias Bro » Mon, 07 Jun 1999 04:00:00



>   I've yet to meet a computer interface that was easy to use for someone
> who knew *nothing* about computers.

Of course. That's also why we have a two-day course just to get the
students started. :)

Personally I see no reason why a GUI should be easier than a really
good configured shell, but I guess it's more "fun" to play around in a
GUI for a new student, and that it is far less frightening, especially
for all those who have been in touch with the Antichrist OS.

Quote:> does many things that I think are irritating but that normal users
> will love (like it ignores the stty settings and almost always allows
> both delete and backspace to work, as well as the arrow keys).

Agree - very frustrating if those keys won't work for a newbie. As
this is in Norway, it's also particularly important that the eight bit
ISO-8859-1 are working OK, both from X and console.

Quote:>   Such things as context sensitive command line completion and multi-line
> editing are power-user tools, not the sort of thing a new user would
> want or care about or most importantly understand.

I might agree multi-line editing might not be relevant for a
newbie. But I think it's pretty newbie-friendly with a working
context-sensitive completion, and also that, upon multi-line-editing,
the prompt shows why this mode is set:

zsh:
% it's a good weather today
quote>

bash:
$ it's a good weather today

Quote:

> mistakes in it) that might be useful as an example.  You can
> pick it up from
> http://math.ucr.edu:8889/help/

I will have a look at it.

Quote:>   Good luck!  It's always wonderful having the opportunity to
> spread your ideas of how things should be to impressionable
> young students.

Absolutely! But it's a heavy responsibility, also.

--
TobiX                   In a world without fences, who needs gates?
http://www.td.org.uit.no/~tobias/

 
 
 

"Userfriendly" Unix Shell

Post by rt.. » Tue, 08 Jun 1999 04:00:00





> Thanx for the list...I think some of those are already implemented in
> the "standard" RedHat configuration, but it doesn't hurt to put it
> into ~/.bashrc, as it will be sort of educative.

> > I also have a long function called 'untar' which knows how to
decompress
> > and extract files from various different compression and archive
formats,

> That's particularly relevant, I think. At least I found it quite
> frustrating when I was a newbie, to try to read through the tar
> manpage just because I couldn't remember the letters xzvf (I guess the
> v is wanted for newbies - personally I always avoid it, and often add
> a '&' at the end of the line) - or even worse, with the old tar piping
> also needed to be done from gunzip ... that's certainly not easy to
> figure out for a newbie.

> --
> TobiX                      In a world without fences, who needs gates?
> http://www.td.org.uit.no/~tobias/

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
 
 
 

"Userfriendly" Unix Shell

Post by brian hile » Sat, 26 Jun 1999 04:00:00



> ...
> (completely) fresh computer students. We will set up a nice GUI, KDE
> or GNOME, to let the new students easily play with the
> ...

A shell that I have _not_ tested or used, but have heard good things
about, is the "Ergo shell," designed for exactly the purpose the
you require for your Unix newbies -- a shell of minimal intimidation.

http://ftp.lip6.fr/pub4/unix/shells/ergo/

I am of the opinion, however (maybe being the fossil command-line
user that I have been for twenty years) that the text-only environment
of Unix -- including the shell -- is not obsoleted by the (mandatory!)
GUIs of modern OSes, but complements and even adds to it, even
today. And this is what students must have at least a "comfort
level" with, considering that their first impressions from school
will determine the computing environments decided for others later.

-Brian

 
 
 

"Userfriendly" Unix Shell

Post by Tobias Bro » Wed, 08 Sep 1999 04:00:00


This is a follow-up from an earlier thread. Sorry for always doing too
little too slowly... :)

I've made one .bashrc which is available as <URL:
http://tobiasb.funcom.com:7999/bashrc > - others have been
configurating KDE and other software packages. I will eventually come
with an update, next year or upon request. The URL above actually
points to my /tmp, so if nobody accesses the file, it will disappear -
but reappear upon request :)

More work clearly needs to be done, like constructing other, similar
rc-files, but it's a start.

I find it strange I haven't found similar work - I guess it must be a
lot of unix computer labs all over the world that needs a more or less
luserfriendly interface.

Hm - I guess I should have CC'ed this to Marlon Berlin and Steven G
Johnson but I can't find the email addresses at the moment. If you
read this, please mail me privately and tell me that I don't have to
look it up :)

--
TobiX                   In a world without fences, who needs gates?
http://www.td.org.uit.no/~tobias/