You are not logged in.

#1 2011-04-30 13:49:15

fengya
Member
Registered: 2011-04-29
Posts: 24

why .bashrc don't work?(solved)

it  seems that I was failed to set environment variables  in the ~/.bashrc  ?
why?
sorry for my poor English ?

Last edited by fengya (2011-05-01 02:25:26)

Offline

#2 2011-04-30 13:54:17

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: why .bashrc don't work?(solved)

More details please. What did you try? Which file did you edit?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2011-04-30 14:01:16

hauzer
Member
From: Belgrade, Serbia
Registered: 2010-11-17
Posts: 279
Website

Re: why .bashrc don't work?(solved)

Can you show us the file?


Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
What profit hath a man of all his labour which he taketh under the sun?
All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

Offline

#4 2011-04-30 14:15:31

fengya
Member
Registered: 2011-04-29
Posts: 24

Re: why .bashrc don't work?(solved)

i'm chinese so i use ibus-pinyin to input chinese characters,
but ibus didn't work with opera,
after i google the problem, the solution is to put
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

into .bashrc

but now i found 'echo $XMODIFIERS' is null so the .bashrc seems didn't work

Offline

#5 2011-04-30 14:23:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: why .bashrc don't work?(solved)

You need to source the file. Type

. ~/.bashrc

in the terminal and check 'echo $XMODIFIERS' again. It works like this for me

[karol@black ~]$ echo $XMODIFIERS
@im=ibus

Last edited by karol (2011-04-30 14:26:05)

Offline

#6 2011-04-30 14:23:13

fengya
Member
Registered: 2011-04-29
Posts: 24

Re: why .bashrc don't work?(solved)

sorry ,i have a bad network so i did't know i have repeat so many time

Offline

#7 2011-04-30 14:29:47

fengya
Member
Registered: 2011-04-29
Posts: 24

Re: why .bashrc don't work?(solved)

karol wrote:

You need to source the file. Type

. ~/.bashrc

in the terminal and check 'echo $XMODIFIERS' again.

of course, after

. ~/.bashrc

the $XMODIFIERS is not null,but when i use ubuntu, the .bashrc will be run when i login gnome,why the arch didn't

Offline

#8 2011-04-30 14:32:51

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: why .bashrc don't work?(solved)

Do check if you added those entries to the .bashrc of the correct user.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#9 2011-04-30 14:34:22

yasar11732
Member
Registered: 2010-11-29
Posts: 127

Re: why .bashrc don't work?(solved)

Check your .bash_profile and see if it includes this line:

[[ -f ~/.bashrc ]] && . ~/.bashrc

if it doesn't have this line, add it. If you don't even have this file, create it and put that line there.


Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.

Offline

#10 2011-04-30 14:39:48

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: why .bashrc don't work?(solved)

When used as a login shell bash tries to read ~/.bash_profile, ~/.bash_login, and ~/.profile, in  that order. Thus you need to source your ~.bashrc from one of these. Usually there is a ~/.bash_profile containing containing (as in my system):

Source the .bashrc settings:
. $HOME/.bashrc

# Make sure the users bin directory will be searched in first place.
if [ -d $HOME/bin ]
then
    export PATH=$HOME/bin:$PATH
fi

# Make GTK use native windowing (for flash UI elements)
export GDK_NATIVE_WINDOWS=1

To know or not to know ...
... the questions remain forever.

Offline

#11 2011-04-30 14:44:25

fengya
Member
Registered: 2011-04-29
Posts: 24

Re: why .bashrc don't work?(solved)

thanks all above,i input the command in the .profile and the problem solved

Offline

#12 2011-04-30 15:05:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: why .bashrc don't work?(solved)

Moderator:  Fengya,  Somehow you had several copies of the same post.  I cleaned that up.  If the problem is resolved, please go ahead and edit your first post, use the option to edit the thread title, and add [SOLVED] to the title.

Thanks


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB