Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DBUS socket not readable from within chroot, help (NOT UDEV)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Kaylee_
n00b
n00b


Joined: 02 Mar 2013
Posts: 1

PostPosted: Sat Mar 02, 2013 5:07 pm    Post subject: DBUS socket not readable from within chroot, help (NOT UDEV) Reply with quote

Hello, I am on a no-multilib amd64 hardened selinux build, x works, udev functions perfectly.
Unfortunatly wine and skype do not work on no-multilib platforms, and so I created a subsystem for this kind of
ia32 bit application.
The chroot lies at /32/ on my root drive.
Every time I want to log into this system I go to a TTY and run this script
Code:

#!/bin/bash
cd /
cp -L /etc/resolv.conf /32/etc/
mount -t proc none /32/proc
mount --rbind /sys /32/sys
mount --rbind /dev /32/dev
mount -o bind /dev/pts /32/dev/pts
mount -o bind /dev/shm /32/dev/shm
mount -o bind /proc/bus/usb /32/proc/bus/usb
mount -o bind /tmp /32/tmp
#mount -o bind /var/run /32/var/run
mount -o bind /home/kaylee /32/home/kaylee
mount -o bind /root /32/root/oldroot
mount -o bind /etc /32/etc/etcOLD
mount -o bind /etc/init.d /32/etc/init.dOLD
mount -o bind / /32/oldroot/
#rm /32/var/run/dbus/system_bus_socket
#ln -s /var/run/dbus/system_bus_socket /32/var/run/dbus/
#rm /32/var/run/dbus.pid
#ln -s /32/var/run/
xhost local:localhost
chroot /32/ /bin/bash --login &&
echo "cleaning up..."
env-update
source /etc/profile

*see note

After that I run this from inside the chroot

Code:

#!/bin/bash
env-update && source /etc/profile
cd /home/kaylee/ && su kaylee


To fix up things to make it like a standard login so I can startx...

I had to build xorg-server with -dbus use so that it would run, but I would perfer to use dbus...
however I cannot run ANY applications inside the chroot that need dbus... so now I have to fix this!

*Note that I have tried several options and have not had success...

What happens is from outside the chroot, the socket file at /32/var/run/dbus/ is visable and has all the right permissions, but inside the chroot, the dbus socket folder is EMPTY

I have even tried changing the udev config file to make it store the default file in /32/var/run/ but even THAT didn't work, I edited /etc/dbus-1/system.conf, maybe I needed to edit other stufff?

Why can I not access the socket from inside the chroot, and HOW can I pipe the socket into my enviornment so I can make everything work??

Thank you!

EDIT: for some reason Udev got stuck in my head, I meant dbus, sorry for the confusion....
_________________
^.^
Back to top
View user's profile Send private message
almikhail
n00b
n00b


Joined: 08 May 2014
Posts: 1

PostPosted: Thu May 08, 2014 11:44 am    Post subject: Reply with quote

In run folder there is symlink to /run. So outside chroot path chroot_place/var/run is just /run of your host environment. It's of course populated. Just do:
Code:
mount -o bind /var/run/dbus chroot_place/run
This should fix it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum