Fedora :: .bash_profile Is Sourced Rather Than .bashrc?

Jan 17, 2010

I am curious since "Run command as a login shell" is UNTICKED (I think for all new users) under Gnome Terminal -> Menu Bar -> Profiles -> Edit -> Title and Command , BUT .bash_profile is sourced. I thought .bashrc should be sourced instead ?

View 6 Replies


ADVERTISEMENT

General :: Get Path Of Sourced Bashrc File?

Feb 11, 2011

I want to assign the path of a sourced sub.bashrc file to an environment variable. E.g. if I type (or execute) from a known relative location

$ source ../../someDir/sub.bashrc

the sub.bashrc should set a variable like

export MyOwnLocation=/home/user1/unknownlocation/someDir

The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.

View 6 Replies View Related

General :: Where To Write JAVA_HOME? In .bashrc Or In .bash_profile

Feb 9, 2010

Where to write JAVA_HOME? In .bashrc or in .bash_profile? What's the difference?

View 1 Replies View Related

Fedora :: Add Path In .bashrc By Commenting Out Old Path And Adding New One - Command Source ~/bashrc

Jun 14, 2011

When I add some path in .bashrc by commenting out old path and adding new one like this:

#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY

After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.

View 10 Replies View Related

Fedora :: Bash_profile For ALL Users?

Oct 27, 2009

There are things that I want to have for all my users.For example, I want to set the java_home, the PATH, I want to mount a drive, etc ...I understand there is a .bash_profile file that does that, but it seems I need to copy the code for all users every time.Is there some kind of MASTER file that sets all those things before running the individual profile files?

View 3 Replies View Related

General :: Profile Is Not Sourced On Startup?

Mar 1, 2011

I've recently installed virtualenv + virtualenvwrapper on Linux Mint 10 LXDE. For convenience I've added the standard WORKON_HOME settings to my ~/.profile

export WORKON_HOME=$HOME/Envs
source /usr/local/bin/virtualenvwrapper.sh

Then I've noticed that workon does not work after login, which means the above commands were not run. If I source ~/.profile then it works. I'm really not sure what could cause .profile not being run? I've checked and I don't have .bash_profile or .

View 1 Replies View Related

General :: Why Can't .cshrc File Be Sourced Automatically

Mar 22, 2010

When I SSH to a certain Linux host, although my default shell is tcsh, the .cshrc file under my home directory is not sourced at all. I can't understand why this happens because from my understanding, if I'm using the tcsh, the .cshrc should be sourced anyway!

View 1 Replies View Related

Red Hat / Fedora :: Xterm Config In /etc/bashrc?

Oct 18, 2010

The following line is in the /etc/bashrc file. I was trying to decipher it but no google results explain it in detail.PROMPT_COMMAND='echo -ne 33]0;${USER}${HOSTNAME%%.*}:${PWD/#$HOME/~}07"'I understand that 33 is the ASCII character for ESC but not sure what ]0 does or anything after the HOSTNAME variable.

View 1 Replies View Related

Red Hat / Fedora :: Adding Alias To .bashrc?

Feb 9, 2011

I have a script that I run using ./dom example.com.

I want to add an alias to .bashrc so that I can run it using "d example.com".

I have tried adding each of the lines below in turn but I still receive the error:
-bash: d: command not found

alias d="/bin/bash /home/user/dom"
alias d="./home/user/dom"
alias d="sh /home/user/dom"

View 3 Replies View Related

Fedora :: ~/.bashrc Permission Denied 13?

Nov 15, 2010

I am trying to install Network simulator 2.34 on fedora 13..my installation was successful. but I am unable edit my bashrc file...All I had to do was

"
Add all these lines into your ~/.bashrc file:
export PATH=$PATH:/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-

[code]....

View 4 Replies View Related

Fedora Security :: Sudo NOPASSWD To BashRC Alias?

Aug 25, 2011

I've set up an alias in .bashrc (let's call it alias1), and am trying to set up a sudo NOPASSWD rule for that particular command. So far, I've attempted:
user ALL = NOPASSWD: alias1
user ALL=(ALL) NOPASSWD: alias1
But keep getting told I have a syntax error - presumably this is because visudo doesn't recognise alias1? I've already checked that alias1 works correctly, so I assume I'm just referring to it incorrectly.

View 6 Replies View Related

Red Hat / Fedora :: Edit In Bashrc File Now Cant Execute Commands?

May 30, 2011

recently I did some changes to my bashrc file the changes are as follows
export JAVA_HOME=/usr/java/jre<version>/bin/
export PATH=$PATH:/usr/java/jre<version>/bin

now I'm unable even login to the OS.

View 9 Replies View Related

General :: Erasing Default Root Bashrc In Fedora 13

Mar 6, 2011

I erasing default text in fedora 13 root bashrc and when I want to swich user ( with su command ) to root , icant,and i see bash-4.1????

View 1 Replies View Related

Fedora :: Create A Shell Script File With Two Functions - Bash Scripting & /etc/bashrc

Oct 6, 2010

how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:

[Code]....

Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.

View 1 Replies View Related

Ubuntu :: How To Edit The .bash_profile

Mar 10, 2011

I have just started using ubuntu and use the terminal a lot.I would like to edit it(blue username).I have tried changing the .bash_profile file, but my changes do not seem to affect it.I also added an alias to bash.bashrc but my computer started looping at login I reinstalled. I dont know if that caused it (I doubt it, but I didnt do anything else, though undoing it didnt work). what to put in the .bash_profile file. It is currently blank, and nothing I add seems to work (using online tutorials).Using ubuntu 10.10 (netbook) and normal - I would like to edit the netbook edition, though I thought they would be the same.

View 2 Replies View Related

General :: .bash_profile Not Loading ?

Apr 1, 2010

Whenever I reboot my fedora core 12 box I find that my .bash_profile does not load... I have to issue source ~/.bash_profile

How do I get this to load automatically each time?

View 14 Replies View Related

General :: Changing Working Directory Of Parent Script From 'sourced' Script?

Jun 8, 2011

I want to change working directory of my script by another script that has been included.

First script:

#!/bin/bash
pwd
source script2
pwd


Sedond script:

cd ..
pwd


View 5 Replies View Related

General :: .bash_profile Not Activated On Login?

Oct 27, 2010

I have loaded oracle 10g. I have made a shell namely Menu and copied it inside the /home/oracle directory. In the .bash_profile, entry has been made sh ./Menu. I want to execute this Menu whenever I login as oracle user.My system does not executeell. However, I am able to activate this shell by typing sh ./Menu from $ prompt

View 2 Replies View Related

General :: Bash_profile [ Unexpected End Of The File ]?

May 18, 2011

I'm trying to edit the bash_profile but I'm getting this error."/.bash_profile: line 46: syntax error: unexpected end of the file"Here is my bash_profile.

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then

[code]....

View 3 Replies View Related

General :: Sysdate Setting In Bash_profile?

Mar 29, 2010

this is my situation,I'm taking backup for some files in that i need to append the sysdate so that i can easily identify which file has to restore at some point,I've tried the following In my bash_profile(RHEL4)

Code:
SYSDATE=`%d/%m/%Y`
export SYSDATE

i tried after relogin to another terminal ,but when i give the following command

Code:
[malick@home ~]$ echo $SYSDATE
[malick@home ~]$ source ~/.bash_profile
bash: fg: %d/%m/%Y: no such job

I don't know what to do ,once the sysdate is set i can add that element to my script where it takes the back up

View 2 Replies View Related

General :: Unable To Find .bash_profile

Dec 13, 2010

I have installed oracle11g R2 on ubuntun 10.04, upon completing I need to set the profile with environment variables but, could not locate the .bash_profile

View 11 Replies View Related

CentOS 5 :: Executing Bash_profile Everytime?

Jul 21, 2010

I have installed Centos 5 for Oracle on my PC. I observe that everytime I have to execute .bash_profile. Otherwise I get command not found message.How to change this behaviour so that it executes automatically everytime I open a new terminal or a tab.The bash_profile is as follows. I notice that the same entry is in another Centos 5 installation in another PC, But I don't have to executeeverytime the bash_profile .

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then

[code]....

View 1 Replies View Related

General :: Edit The .bash_profile Being A Normal User In Red Hat?

Feb 18, 2011

I have installed Oracle Database server in Red Hat Linux for the first time. I edited the .bash_profile first time & defined some parameters like "export ORACLE_SID =orcl".I quit the editing. Then When I entered ". .bash_profile" it got error " not a valid identifier" it shows like "bash: export: '=orcl' : not a valid identifier for all the lines I edited it shows same error beacause I think I put a space in between "ORACLE_SID" & "=orcl".

So when I tried to edit that using "vi .bash_profile" being a normal user. It doesn't allow me editing.when I try to delete that space (because I think I have got error) using Backspace key on my computer,,it just moves the cursor to left in stead of deleting that space.

View 5 Replies View Related

General :: Slackware 13.0 ~/.bash_profile Not Running At Login?

Jan 29, 2010

I'm logging in as a user at run level 3.I have my .bash_profile in my home directory

Code:
if [ -f ~/.bashrc ]; then
source ~/.bashrc

[code]....

View 8 Replies View Related

CentOS 5 :: .bash_profile Contents Of Root To Pass?

Jun 18, 2010

I lost my root .bash_profile. Have anyone, the .bash_profile contents of root to pass me?

View 3 Replies View Related

General :: Setting JAVA_HOME In .bash_profile Doesn't Work

Apr 15, 2009

I have some Flex and Java files which can be compiled with JDK1.5. My server was already loaded with 1.4 (at path /usr/bin/java) and our sys admin(I dont know why) copied another JDK, JDK 1.5 at path /usr/java/jdk1.5.0_16/. It seems very easy to use this java. Just set the path in .bash_profile. I did it and now if I run which java I still see the path for java 1.4 not java 1.5. Am I doing something wrong? Following is actual entry from bash_profile

Code:
PATH=$PATH:$HOME/bin
PATH=/usr/java/jdk1.5.0_16/bin:$PATH
JAVA_HOME=/usr/java/jdk1.5.0_16/
export PATH JAVA_HOME

View 3 Replies View Related

General :: Errors In .bash_profile And Startx Does Not Load Automatically?

Sep 4, 2010

I have installed Damn Small Linux on an old laptop.very boot reports that the SSH has loaded as I have configured it to do so but does not load startx as instructed in .bash_profile.After bootup, the following is reported by the system.-bash: /home/dsl/.bash_profile: line 12: syntax error: unexpected end of fileThis is the content of the .bash_profile

#!/bin/bash
export IRCNICK=DSL
export DISPLAY=:0

[code]....

View 1 Replies View Related

General :: -bash: /home/rb27/.bash_profile: Permission Denied

Sep 9, 2011

I have tried changing permissions and I have looked for a solution, but the error still exists.In fact it gives me a different error every time I log in.

Could not chdir to home directory /home/rb27: Permission denied

here is a snippet of what I get when I use the command ls -al:

drwxr-xr-x 16 root root 0 Sep 8 18:28 .
drwxr-xr-x 23 root root 4096 Feb 5 2011 ..
d????????? ? ? ? ? ? ajd74
d????????? ? ? ? ? ? ban45
d????????? ? ? ? ? ? rb27

I cannot log in as root since the permission is denied

View 1 Replies View Related

General :: How To Edit The .bashrc

Feb 27, 2011

I want something like

Code:

export ROS_PACKAGE_PATH=~/ros:$ROS_PACKAGE_PATH

to be done already for me when I open a new terminal. How do I edit the .bashrc so that this variable is always set already?

View 3 Replies View Related

Slackware :: My Bashrc Does Not Load?

Nov 10, 2010

iam using slackware 13.1 ,i have this in my .bashrc :

Code:
# .bashrc
# Add bin to path

[code]...

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved