|
If a user tries to log out and gets a "Not a login
shell" message, it means just that: the user tried to log out
of a shell that is not the one he or she logged in to.
The most frequent causes of this are that the user used the 'script' command
and forgot to exit, or tried to "logout" from a Xterm window. If they want to
quit that shell, they can use exit which quits out of any
shell. If they want to logout, they can just repeatedly type
exit. Each time they exit they will either be put back into
another shell (which they then exit again) or will be logged out when they
exit the login shell.
What the 'script' program does, as well as the Xterm windows, is start a
background shell and places you in that background shell. A
background process is any process that does not tie up the
shell you launched the program from. Xterm windows, while they have
their own tty associated with them and can take user input (not to mention
launch other jobs possibly in the background), are considered background
processes because the shell they were launched from -- your login shell -- is
not tied up; i.e. it can still accept user input.
You can alternatively kill these processes by using the kill
command. Kill can be used in two forms:
kill -9 process_id
where process_id is given by the ps command, or:
kill %job_number
where job_number is given by the jobs shell command.
The difference between process_id and job_number is that
process_id is a globally accessible value (via the ps
command), and job_number is only available (via the jobs
command) to the shell that launched the process.
|