strange, How to make bash the login shell

strange, How to make bash the login shell

Post by Tong » Sun, 30 May 1999 04:00:00



I know the question "How to make bash the login shell" is clearly
answered in the faq. But when I tried it, it doesn't work: (I
delibrately added some echo to show that my command still get through
csh then to bash)

zkpks001-24> bash --login

zkpks001:~/bin$ echo $BASH_VERSION
2.02.0(1)-release

zkpks001:~/bin$ which emacs
Executing the interactive part of the .cshrc...
Executing the normal part of the .cshrc...
/disk1/gnu/bin/emacs

zkpks001:~/bin$ ps -f
     UID   PID  PPID  C    STIME TTY      TIME CMD
 tongsun 17248 16850  0 15:35:02 pts/62   0:00 bash --login
 tongsun 16850 16847  0 14:49:55 pts/62   0:00 -csh

and the ps command shows that bash is still not a login shell.

Any ideas? thanks

--
remove _nospam to reply.

 
 
 

strange, How to make bash the login shell

Post by Ken Pizzi » Mon, 31 May 1999 04:00:00



>I know the question "How to make bash the login shell" is clearly
>answered in the faq. But when I tried it, it doesn't work: (I
>delibrately added some echo to show that my command still get through
>csh then to bash)

You are showing that "which" is a csh-oriented script.

Quote:>zkpks001-24> bash --login

>zkpks001:~/bin$ echo $BASH_VERSION
>2.02.0(1)-release

See, you are running bash...

Quote:>zkpks001:~/bin$ which emacs
>Executing the interactive part of the .cshrc...
>Executing the normal part of the .cshrc...

This just shows that "which" is a script designed to work
with csh.  Place this in your .bashrc file:
  alias which=type

Quote:>/disk1/gnu/bin/emacs

>zkpks001:~/bin$ ps -f
>     UID   PID  PPID  C    STIME TTY      TIME CMD
> tongsun 17248 16850  0 15:35:02 pts/62   0:00 bash --login
> tongsun 16850 16847  0 14:49:55 pts/62   0:00 -csh

>and the ps command shows that bash is still not a login shell.

As far as it's concerned, the bash is a login shell.  But you
also left your old csh laying about wasting memory.  You can
avoid this by invoking bash as:
  exec bash --login

Except for initialization at start, the auto-execution
of .bash_logout, and the enabling of the "logout" command,
there really isn't all that much difference between a
"login shell" invocation and a regular invocation of bash.
By invoking bash with --login you are simply making these minor
changes to its behavior; the same behavior as if you made
bash your true login shell and you just logged in.

                --Ken Pizzini

 
 
 

strange, How to make bash the login shell

Post by Stephen J. Tremble » Wed, 02 Jun 1999 04:00:00


You can use the 'chsh' command to change your login shell (if allowed by
your administrators)



>>I know the question "How to make bash the login shell" is clearly
>>answered in the faq. But when I tried it, it doesn't work: (I
>>delibrately added some echo to show that my command still get through
>>csh then to bash)
>You are showing that "which" is a csh-oriented script.
>>zkpks001-24> bash --login

>>zkpks001:~/bin$ echo $BASH_VERSION
>>2.02.0(1)-release
>See, you are running bash...
>>zkpks001:~/bin$ which emacs
>>Executing the interactive part of the .cshrc...
>>Executing the normal part of the .cshrc...
>This just shows that "which" is a script designed to work
>with csh.  Place this in your .bashrc file:
>  alias which=type
>>/disk1/gnu/bin/emacs

>>zkpks001:~/bin$ ps -f
>>     UID   PID  PPID  C    STIME TTY      TIME CMD
>> tongsun 17248 16850  0 15:35:02 pts/62   0:00 bash --login
>> tongsun 16850 16847  0 14:49:55 pts/62   0:00 -csh

>>and the ps command shows that bash is still not a login shell.
>As far as it's concerned, the bash is a login shell.  But you
>also left your old csh laying about wasting memory.  You can
>avoid this by invoking bash as:
>  exec bash --login
>Except for initialization at start, the auto-execution
>of .bash_logout, and the enabling of the "logout" command,
>there really isn't all that much difference between a
>"login shell" invocation and a regular invocation of bash.
>By invoking bash with --login you are simply making these minor
>changes to its behavior; the same behavior as if you made
>bash your true login shell and you just logged in.
>            --Ken Pizzini

--
-=> Steve Tremblett            
-=> Memorial University Computer Science

 
 
 

strange, How to make bash the login shell

Post by Tong » Wed, 02 Jun 1999 04:00:00



> You are showing that "which" is a csh-oriented script.

oh, yeah... :-) Got it.

Here comes another strange behavior:

I have no problem rsh/rlogin/telnet to my account after I add
  exec bash --login
to my .login

But, I can't login to my open desktop (xwindows environment). I login
correctly, and can even see the "welcome" screen, then, boomed out... It
happened even after I close all my windows before logout out. What's
wrong? what should I do?

Thanks

--
remove _nospam to reply.

 
 
 

strange, How to make bash the login shell

Post by Ken Pizzi » Fri, 04 Jun 1999 04:00:00



>Here comes another strange behavior:

>I have no problem rsh/rlogin/telnet to my account after I add
>  exec bash --login
>to my .login

>But, I can't login to my open desktop (xwindows environment). I login
>correctly, and can even see the "welcome" screen, then, boomed out... It
>happened even after I close all my windows before logout out. What's
>wrong? what should I do?

Try using a full pathname to the bash executable.  I'm guessing that
the xwindows login environment is not setting up the same default
$PATH that the telnet/etc. mechanism is using.

                --Ken Pizzini

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. HELP: libc internal error: -rmutex_unlock: rmutex not held

3. Q: bash shell always login shell?

4. Any hope of Matrox Millennium on ODT 3.0?

5. C, Bash, and X: Strange, strange, strange

6. Shared memory for passing images to server ?

7. Making bash my shell

8. ConfigXF86 gives 'No such file or directory' errors

9. strange problem with bash shell

10. Having problem with ftp login when I set bash as default shell (on solaris7)

11. Newbie Q: Login Shell BASH

12. bash: only login shells have . in PATH