PDA

View Full Version : How to access local display for non-visual opengl program from remote shell?



billrobertson42
9th July 2006, 09:22 PM
On my FC5 machine, I have a renderer (nvidia's gelato) that I want to run when I ssh into the machine.

In order for it to run, it needs access to the display on the FC5 machine that it runs on because it uses open gl and x buffers, accesses the gpu etc... When I run it, I have it write it's output to a file, so it never needs to open an xwindow on the "other" x display (where I ssh from).

However, the remote session can not open a display on the FC5 machine, so the program can't run.

So far I have been able to make it work in two different ways (both of which suck).

1. Log in as root locally on the FC5 machine, and run "xhost +" and remain logged in. Then log in remotely as user y and run the renderer. If the "local root" logs out then "remote user y" loses the ability to access the display.

2. Log in as user y locally on the FC5 machine and remain logged in. The I can log in remotely as user y and run the renderer. If the "local user y" logs out then "remote user y" loses the ability to access the display.

Using "-norestart" when starting the x server has no effect on this.

I have tried running xhost +{hostname} in /etc/rc.d/rc.local and it won't run because it can't access the display.

I have tried adding the host into /etc/X0.hosts with no effect.

I have tried calling xhost +{hostname} in /etc/X11/xinit/xinitrc and that never seems to even run.

I have looked at xauth and X11Forwarding in ssh, but those seem oriented towards accessing the "other" x display i.e. not the FC5 box running the renderer.

I have also tried a number of other silly things as well. I have pounded on this for 20+ hours so far, so please be kind if the answer is obvious to you.

So there are two questions here:

1. How to give something in rc.d/init.d type scripts access to the display (on the FC5 box)? I would want to do this if I wanted a daemon on the network to do renders via. gelato.

2. How to give a remote user access to the local display w/o having a concurrent login for that user logged in locally?

Thanks in advance.