LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Running graphical programs from chroot (https://www.linuxquestions.org/questions/linux-software-2/running-graphical-programs-from-chroot-457581/)

1veedo 06-23-2006 10:10 AM

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.

Michael_S 06-23-2006 12:28 PM

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.

1veedo 06-23-2006 01:10 PM

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"

Michael_S 06-23-2006 03:13 PM

: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.)

1veedo 07-27-2006 08:16 PM

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 X module is version 1.0.6629. Please be sure that your kernel
module and all NVIDIA driver files have the same driver version.
(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module!
(EE) NVIDIA(0):  *** Aborting ***
(EE) Screen(s) found, but none have a usable configuration.

So does anybody know how to get 3d accell working from a chroot?

(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.