LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .bash_profile (https://www.linuxquestions.org/questions/linux-newbie-8/bash_profile-217468/)

praveenv 08-14-2004 06:51 AM

.bash_profile
 
Hello Friends !

I echoed some messages in (.bash_profile) , but they are not executing when does this file execute ? (people says when i was logging ,but its not executing even that time also ) ,but (.bashrc ) is executing when I open terminal.

how to make .bash_profile get executed ?


Thanks in advance...........................

nukkel 08-14-2004 06:56 AM

.bash_profile gets executed when you start bash and you have to log in. So if you are using a graphical login screen (kdm,wdm,gdm, or xdm) it will never get executed.

praveenv 08-14-2004 07:43 AM

Starting bash and logging in
 
How to start bash and how to to log into it ?

dont consider it silly .
Generally when system boots graphical desktop will come .so I dont want to go to graphical interface when system boots , but I want to go for prompt(CUI) directly , and also how to get graphical interface from prompt ?

how to do that ?

help..................................

nukkel 08-14-2004 12:58 PM

When the computer boots into the graphical login screen, you can press CTRL+ALT+F1 to get a textual login. There you can login using username & password, after which your shell starts (if it doesn't start bash but another shell, you can change that in the /etc/passwd file -- look at the last field).

Then bash will notice it acts as login shell and will execute the commands in .bash_profile.

You can even get other terminals by pressing CTRL+ALT+F2 etc. and in most distributions CTRL+ALT+F7 will be the graphical screen.

It is possible to prevent the graphical screen from coming up when booting, but this is very dependent on which distribution you use. For example, in some distributions you can boot into runlevel 3 (type a "3" on the prompt of your boot manager) and you will not get the graphical login. But, again, this depends on which distro you have.

Hope this helps!
nukkel


All times are GMT -5. The time now is 09:59 PM.