LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-17-2008, 05:40 AM   #1
lusiads
LQ Newbie
 
Registered: Sep 2008
Posts: 17

Rep: Reputation: 0
Question Locate environment variables


I want to remove a line that set a variable, its name is XMODIFIERS, but I can't locate where is it from.
I see it though:
Code:
$ export|grep -i xmod
declare -x XMODIFIERS="@im=unikey"
But it's not in bash startup files:
Code:
$cat /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc | grep -i xmod
returns nothing

How can i locate the file which sets declare -x XMODIFIERS="@im=unikey"
Any help would be appreciate.
 
Old 09-17-2008, 06:54 AM   #2
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 38
I can't think of a file you've missed. As a workaround, you could always unset the variable at the bottom of your ~/.bashrc.
Code:
unset XMODIFIERS
 
Old 09-17-2008, 11:41 AM   #3
lusiads
LQ Newbie
 
Registered: Sep 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Wink

It's not an optimal idea because XMODIFIERS is set once before XMODIFIERS="@im=unikey" is set and I need the previous value though I don't know what value is it?
 
Old 09-17-2008, 12:11 PM   #4
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
could you cd / and grep XMODIFIERS * to find which file sets XMODIFIER first and what the first setting is?
or use the above to find which files set XMODIFIER nd the comment out the line that sets XMODIFIER and reboot.
Then you could echo $XMODIFIER to see what the initial value of xmodifier is?
 
Old 09-17-2008, 12:21 PM   #5
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 57
If you could find someone with a pristine system the same as yours, that someone might be able to determine what that system is set to. I have Fedora 7 and 9 running and they have XMODIFIERS unset. But your profile is missing.

Dave
 
Old 09-17-2008, 05:40 PM   #6
lusiads
LQ Newbie
 
Registered: Sep 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by john test View Post
could you cd / and grep XMODIFIERS * to find which file sets XMODIFIER first and what the first setting is?
or use the above to find which files set XMODIFIER nd the comment out the line that sets XMODIFIER and reboot.
Then you could echo $XMODIFIER to see what the initial value of xmodifier is?
The exact command was
Code:
grep -r XMODIFIER /etc/*
because 99% config files are located inside /etc/, right?
At first I thought grep through whole huge file system was not practical till i figured out where it must be.

I finally found it inside /etc/X11/Xsession.d
Thank you, I greatly appreciate all your helps.
 
Old 09-17-2008, 05:44 PM   #7
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
You're very welcome. Glad you found what you were looking for.
 
  


Reply

Tags
bash, environment


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment Variables crimsonflame123 Linux - Software 2 12-03-2006 01:12 AM
Environment Variables - where do they go!?! iansoundz Linux - General 7 11-17-2005 02:27 AM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables moeminhtun Linux - General 4 01-15-2003 09:50 AM
environment variables. jISV Linux - General 0 04-05-2002 06:01 AM


All times are GMT -5. The time now is 04:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration