Running graphical programs from chroot
Is it possible to run programs that require access to the x server, like games, from a chroot?
I ran xhost + and tried running a couple programs but it always complains about somthing. freeglut (/usr/games/bin/whatever): failed to open display ':0.0' "No dynamic GL support in video driver History: Exiting due to error" "Couldn't initialize SDL: No available video device" I thought you were able to do this cause w/ 64bit distros if you want to run flash (32bit firefox) or Wine you have to make a chroot and install your programs there. |
X stores some required files in the /tmp directory. In order for your chroot install to display anything, it needs access to those files. You have two options:
1. Set up X in the chroot environment: http://www.debian.org/doc/manuals/re....html#s-chroot 2. Link the main installation /tmp directory to the chroot installation /tmp directory. http://www.debian-administration.org/articles/356 You'll have to hunt through either article to find the information you need. And as the link names will tell you, the instructions are oriented towards Debian. I hope that helps. |
Wow, thank you so much! I have a half installed gentoo, which is great for gamming and 32bit stuff, but I'm kind of addicted to the simplicity of ubuntu. It does everything automatically for you. (the only problem is that it's so non-standard, hardly any non-open programs *caugh* games will install or run on it)
The second link is what I was looking for. I could shoot myself for not realizing it. mount -o bind /home /mnt/gentoo/home mount -o bind /tmp /mnt/gentoo/tmp mount -t proc none /mnt/gentoo/proc mount -o bind /dev /mnt/gentoo/dev America's army is being emerged right now :) " * This will take a while ... go get a pizza or something" |
:D
You're welcome. I'm glad I could help. ... now I have to figure out why it doesn't work on my own machine. (I'm partially serious. It doesn't work, but it's probably just because I set it up in a hurry.) |
Wow I thought I had it all working cause america's army ran fine (not perfect, but I guess it can in reality run faster) but enemy territory is supper slow compared to how fast I know it should be running.
I found out something interesting though. glxinfo | grep direct verifies that everything is working in the main system but if I run that in the chroot I get direct rendering: no. The drivers are set up properly in the chroot but they're different versions. I don't know if you can run x windows from a chroot but xinit -- :1 complains about that. Code:
Error: API mismatch: the NVIDIA kernel module is version 0.8762.0, but (this guy seems to have a similar problem: http://www.linuxquestions.org/questi...rect+rendering ) |
All times are GMT -5. The time now is 08:10 PM. |