LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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: 42

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
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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: 42

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration