LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-20-2011, 12:00 AM   #1
spikeygg
Member
 
Registered: Dec 2004
Location: America
Distribution: Ubuntu
Posts: 32

Rep: Reputation: 0
Unhappy dchroot environment variables not consistent


So, I've created a 32-bit chroot on my AMD64 installation. It works pretty well when I just type 'dchroot' but if I try to execute a 32-bit program from 64-bit land using 'dchroot <command>', the environment variables are all screwed up. I know I can use -d or --preserve-environment to keep my 64-bit environment but I don't want to do that because I want my PATH to change when I go into 32-bit land. Here's an example of what I am talking about:

Code:
me@box:~$ dchroot "echo \$PATH"
I: [x86 chroot] Running command: “echo $PATH”
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
me@box:~$ dchroot -d "echo \$PATH"
I: [x86 chroot] Running command: “echo $PATH”
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/mythtv/scripts:/mythtv/mythtv_binaries/bin
me@box:~$ dchroot
(32bit)me@box:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/mythtv/scripts:/mythtv/mythtv_binaries_32bit/bin
(32bit)me@box:~$
I have looked through my entire /etc directory (on both 64 and 32-bit installations) looking for where the $PATH is getting set to /usr/bin/X11 and I can't find it anywhere!! WTH? HELP!

Thanks,
-Greg
 
Old 02-20-2011, 04:57 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
Have you tried looking for /etc/env.d* ? (wildcard for anything containing env.d and/or env)
 
Old 10-22-2011, 12:39 PM   #3
spikeygg
Member
 
Registered: Dec 2004
Location: America
Distribution: Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
Have you tried looking for /etc/env.d* ? (wildcard for anything containing env.d and/or env)
No dice.

Code:
(32bit)me@box:/etc$ ls env*
environment
(32bit)me@box:/etc$ cat environment
(32bit)me@box:/etc$
There is just an environment file in there with nothing in it.
 
  


Reply

Tags
chroot, debian, environment variable, path


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 siva balan Linux - Newbie 2 10-16-2010 03:04 AM
environment variables hellowb Linux - Newbie 4 03-11-2009 10:28 PM
environment variables slinky2004 Linux - General 4 11-26-2005 09:59 AM
when to use environment variables? mark_2811 Programming 2 02-23-2004 06:09 PM
environment variables moeminhtun Linux - General 4 01-15-2003 09:50 AM


All times are GMT -5. The time now is 09:59 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