You are not logged in.

#1 2008-11-01 07:18:50

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

[SOLVED] Problems with setting up 32-bit chroot environment

Recently I've moved to Arch64 and decided to build chroot environment in order to have a working flashplugin, Java and some other applications without messing up system libraries of two different architectures. I've followed directly instrucions from the wiki, but unfortunately still can't make it work. I'm stuck with

Kod:
bash-3.2# /etc/rc.d/arch32 start
:: Starting Arch32 chroot                                                [DONE]
bash-3.2# xhost +local:
No protocol specified
xhost:  unable to open display ":0.0"
bash-3.2# chroot /opt/arch32

I've googled a lot, asked on Polish Arch Linux forum, but so far I wasn't able to find a working solution. Can someone more experienced give me a hand with this? smile

Last edited by Zibi1981 (2008-11-14 22:35:48)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#2 2008-11-01 07:28:16

BinkyTheClown
Member
From: The Circus
Registered: 2008-06-11
Posts: 85
Website

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Are you running X when you try to do that?


Heeeeeey cat!!!

Offline

#3 2008-11-01 07:49:19

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Of course. All this is meant to run some 32-bit applications in my current 64-bit X-environment.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#4 2008-11-01 08:01:18

BinkyTheClown
Member
From: The Circus
Registered: 2008-06-11
Posts: 85
Website

Re: [SOLVED] Problems with setting up 32-bit chroot environment

I have a working 32 bits chroot on a 64 bits system. My /etc/rc.d/arch32:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case $1 in
    start)
        stat_busy "Starting Arch32 chroot"
        mount --bind /proc /opt/arch32/proc
        mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
        mount --bind /dev /opt/arch32/dev
        mount --bind /dev/pts /opt/arch32/dev/pts
        mount --bind /dev/shm /opt/arch32/dev/shm
        mount --bind /sys /opt/arch32/sys
        mount --bind /tmp /opt/arch32/tmp
        mount --bind /home /opt/arch32/home
        add_daemon arch32
        stat_done
        ;;
    stop)
        stat_busy "Stopping Arch32 chroot"
        umount /opt/arch32/proc/bus/usb
        umount /opt/arch32/proc
        umount /opt/arch32/dev/pts
        umount /opt/arch32/dev/shm
        umount /opt/arch32/dev
        umount /opt/arch32/sys
        umount /opt/arch32/tmp
        umount /opt/arch32/home
        rm_daemon arch32
        stat_done
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
esac
exit 0

I have the arch32 daemon in my /etc/rc.conf and I run this when I want to use the chroot:

#!/bin/sh
/etc/rc.d/arch32 start
xhost +local:
chroot /opt/arch32 su -l username -c "linux32 zsh"

Is it similar to your setup?


Heeeeeey cat!!!

Offline

#5 2008-11-01 14:22:18

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Is it neccessary to add arch32 to the DAEMONS section in /etc/rc.conf if we use

/etc/rc.d/arch32 start

command to start this script? What is this part meant for

su -l username -c "linux32 zsh"

???

Last edited by Zibi1981 (2008-11-01 14:23:03)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#6 2008-11-01 16:51:59

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Zibi1981 wrote:

Is it neccessary to add arch32 to the DAEMONS section in /etc/rc.conf if we use..

Of course if you run it manually, you don't need to add it to the DAEMONS.

Zibi1981 wrote:

command to start this script? What is this part meant for

su -l username -c "linux32 zsh"

???

That's to actually get to chrooted environment ('username' should be replaced by your username). If you followed the wiki, it talks about schroot. If you want to use that, then the last command would be 'schroot -p zsh' (or bash, or whatever shell you like) - it runs a shell in the chrooted environment).

By the way, I used 'xhost +localhost'. This command is to add a hostname (or a username) to the list of things that can access the X server. So 'local' doesn't make too much sense to me.

Offline

#7 2008-11-03 01:17:40

BinkyTheClown
Member
From: The Circus
Registered: 2008-06-11
Posts: 85
Website

Re: [SOLVED] Problems with setting up 32-bit chroot environment

su -l username -c "linux32 zsh"

???

Well, I use zsh and I need the linux32 command to pass the correct uname info to the configure script of a project I am working on, but I think you don't need that.


Heeeeeey cat!!!

Offline

#8 2008-11-03 08:50:04

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: [SOLVED] Problems with setting up 32-bit chroot environment

OOT but what about using dchroot instead of su?

might be on topic after all, as if you use -l you're creating a login, so env vars get wiped, so DISPLAY is not set...

oh, and +local: is a special acl command to authorize all local connections.

Last edited by lloeki (2008-11-03 08:52:40)


To know recursion, you must first know recursion.

Offline

#9 2008-11-03 16:54:28

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Can someone simply write down the commands I should issue to have a working 32-bit chroot environment? No matter which option I choose, I'm still getting the same error message hmm


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#10 2008-11-03 19:40:58

BinkyTheClown
Member
From: The Circus
Registered: 2008-06-11
Posts: 85
Website

Re: [SOLVED] Problems with setting up 32-bit chroot environment

lloeki wrote:

OOT but what about using dchroot instead of su?

might be on topic after all, as if you use -l you're creating a login, so env vars get wiped, so DISPLAY is not set...

oh, and +local: is a special acl command to authorize all local connections.

My DISPLAY is set correctly:

<binky@circus:~>
x86_64 % sudo arch32.sh 
Contraseña:
:: Starting Arch32 chroot                                                [DONE] 
non-network local connections being added to access control list
e%                                                                              <binky@circus:~>
i686 % echo $DISPLAY 
:0.0

Again, the arch32.sh script, that is on ~/bin:

#!/bin/sh
/etc/rc.d/arch32 start
xhost +local:
chroot /opt/arch32 su -l binky -c "linux32 zsh"

@Zibi1981: I followed the wiki and it works for me; maybe if you start again all the steps you can do it smile


Heeeeeey cat!!!

Offline

#11 2008-11-04 08:39:11

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Maybe it will make difference when I'll start the script while booting to the system after all.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#12 2008-11-04 08:49:47

Heller_Barde
Member
Registered: 2008-04-01
Posts: 245

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Zibi1981: did you try "echo $DISPLAY" inside your X? just to see whether it, by sheer coincidence didn't get ":0.0"

cheers Barde

Offline

#13 2008-11-05 18:51:29

tehfishman
Member
Registered: 2008-03-04
Posts: 22

Re: [SOLVED] Problems with setting up 32-bit chroot environment

I am having the same issue.  When running any programs in my 32 bit chroot that depend on X it says that it can't find the display.  I'm not sure if the DISPLAY variable is important inside the chroot or not, but setting it doesn't have any effect anyway.

[bryan@computar ~]$ echo $DISPLAY
:0.0
[bryan@computar ~]$ schroot
I: [Arch32-8cd58921-853f-4ab8-92f9-f4fb6f57074a chroot] Running login shell: '/bin/bash'
[bryan@computar ~]$ echo $DISPLAY

[bryan@computar ~]$ firefox
Error: no display specified
[bryan@computar ~]$ DISPLAY=:0.0
[bryan@computar ~]$ echo $DISPLAY
:0.0
[bryan@computar ~]$ firefox
Error: no display specified
[bryan@computar ~]$

Any suggestions?

Offline

#14 2008-11-05 22:46:31

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: [SOLVED] Problems with setting up 32-bit chroot environment

tehfishman wrote:

I am having the same issue.  When running any programs in my 32 bit chroot that depend on X it says that it can't find the display.  I'm not sure if the DISPLAY variable is important inside the chroot or not, but setting it doesn't have any effect anyway.

[Cut]

Any suggestions?

It's been written already in this thread but try running

schroot -p

The p switch will preserve your user's environment, including $DISPLAY.  Even easier, why not just run the applications that are installed in the chroot from outside the chroot:

schroot -c <name_of_chroot> -p -q <name_of_application_installed_in_chroot>

Offline

#15 2008-11-06 22:04:12

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Heller_Barde wrote:

Zibi1981: did you try "echo $DISPLAY" inside your X? just to see whether it, by sheer coincidence didn't get ":0.0"

cheers Barde

It got.

zbyszek ~ $  echo $DISPLAY
:0.0

What about it?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#16 2008-11-09 19:28:30

tehfishman
Member
Registered: 2008-03-04
Posts: 22

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Heh, I feel silly now for not seeing that.  I just read over it and didn't even realize what it was.  Thanks azleifel.

Offline

#17 2008-11-09 21:34:56

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 635

Re: [SOLVED] Problems with setting up 32-bit chroot environment

Well, I've tried using schroot but still there's something wrong with my 32-bit environment settings

bash-3.2# schroot -p opera -notrayicon
I: [otrayicon chroot] Running command: "opera"
ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.
No protocol specified
opera: cannot connect to X server :0.0
opera: Fatal error on creating Qt application object

Anyone???

EDIT

I've found a solution. The problem was that I kept trying to give some permissions to currently running X server from a root account, and that was a mistake, as the X server was run by a normal user. After I had tried to give those permissions by a normal user, it all started to work.
Case closed wink

Last edited by Zibi1981 (2008-11-14 22:35:19)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

Board footer

Powered by FluxBB