You are not logged in.
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?
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
Are you running X when you try to do that?
Heeeeeey cat!!!
Offline
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
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
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
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.
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
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
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
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
"... 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
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
Heeeeeey cat!!!
Offline
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
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
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
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
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
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
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
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