Re: login shell

From: David Harel (hareldvd_at_nonexisting.hamakor.org.il)
Date: Sat 08 Jan 2005 - 21:00:35 IST


I understand you open a terminal on an X11 screen.

I am not absolutely sure but I think that by default the terminal is not
regarded as a login session therefore the shell does not start the
profile script. You can monitor this by ps -f. Login shells have hyphen
prefixing the shell command name. Observe the ps output below. Notice
PID 4416 is a login shell where PID 4451 is just another invocation of bash:
[harel_at_somewhere harel]$ ps -f
UID PID PPID C STIME TTY TIME CMD
harel 4416 4415 0 14:23 pts/1 00:00:00 -bash
harel 4451 4416 0 14:23 pts/1 00:00:00 bash
harel 4479 4451 0 14:24 pts/1 00:00:00 ps -f

In order to convince bash that it should behave as a login shell use the
-l option. See man bash especially the "INVOCATION" paragraph.

In order to simplify things I set the menu item that starts a terminal
with this option set. In my case, I use KDE and therefore I start
konsole with the option --ls.
See konsole --help.

Kfir Lavi wrote:

> Hi,
> when i'm loging to my account or start new terminal, it don't execute
> ~/.bash_profile.
>
> How can i fix this?
>
> tnx
> Kfir

===============================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il

-- 
Thanks.
David Harel,
==================================
Home office +972 4 6921986
Fax:        +972 4 6921986
Cellular:   +972 54 4534502
Snail Mail: Amuka
            D.N Merom Hagalil
            13802
            Israel
Email:      hareldvd_at_ergolight-sw.com
=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il


This archive was generated by hypermail 2.1.7 : Sat 08 Jan 2005 - 21:17:11 IST