Tunneling ZSNES over SSH

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
as2100
New Member
Posts: 6
Joined: Fri Nov 11, 2005 2:51 am

Tunneling ZSNES over SSH

Post by as2100 »

Hey all.

I've been toying around with tunneled X sessions over SSH. I have a server machine with a database of ROMs, a fresh install of ZSNES, but no X server.

On my workstation (on a local LAN) I have succesfully been able to tunnel video, applications, etc. over from the file/media server machine.

The X forwarding is working fine for all software other than ZSNES. The error I receive seems to be a common one around here:

Code: Select all

Could not set 512x448 video mode: No available video device
I have tried changing the video mode in the ZSNES configuration file to every available resolution, but this was no help.

On my workstation, I have added multiple entries in my /etc/X11/xorg.conf to allow the video device (which does have OpenGL support) to switch to these available resolutions.

Considering the SSH tunnel and video are working properly, I am wondering if this is an issue with how ZSNES addresses the Xserver's display. It seems like ZSNES is trying to access a local display without actually reading my environment's $DISPLAY variable. Since I have no Xserver installed on the machine ZSNES runs on, it would obviously fail every time when trying access a video device if it weren't looking for the $DISPLAY variable. Any ideas?

Thanks,
andrew.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

Can you tunnel SDL apps? I'm not sure.

In any case, try FreeNX.
[u][url=http://bash.org/?577451]#577451[/url][/u]
as2100
New Member
Posts: 6
Joined: Fri Nov 11, 2005 2:51 am

Post by as2100 »

The tunnel isn't necessary, X forwarding in any manner would be fine with me. I'll give FreeNX a shot, first. Thanks for the quick reply!

andrew.
aminalshmu
Rookie
Posts: 26
Joined: Fri Jan 21, 2005 3:17 am

Post by aminalshmu »

http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

apparently in this guide, the author managed to get openGL games such as tuxracer working over SSH-forwarded X, so i don't see why zsnes wouldn't work. have you tried other openGL apps, or do you have zsnes compiled without openGL? (not even sure if that's possible at this point...)

....

after carefully re-reading your post, i'm a little confused about what exactly you are trying to do. why can't you execute zsnes from and on the workstation machine, and just load the roms from the server? it seems like executing it remotely is unnecessary...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Is SDL setup properly on the machine you're tunneling?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
as2100
New Member
Posts: 6
Joined: Fri Nov 11, 2005 2:51 am

Post by as2100 »

On the machine I am trying to tunnel ZSNES from does have libsdl installed properly and ZSNES was compiled with OpenGL support.
http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

apparently in this guide, the author managed to get openGL games such as tuxracer working over SSH-forwarded X, so i don't see why zsnes wouldn't work. have you tried other openGL apps, or do you have zsnes compiled without openGL? (not even sure if that's possible at this point...)

....

after carefully re-reading your post, i'm a little confused about what exactly you are trying to do. why can't you execute zsnes from and on the workstation machine, and just load the roms from the server? it seems like executing it remotely is unnecessary...
The application I am working is a web application using PHP to access the MySQL database of roms, and executes several BASH scripts in order to redirect the X client to any remote Xserver. The intent of this project is to be able to execute ZSNES and load the ROM specified by the web app to any machine on my LAN without having to install ZSNES on each of these machine. Also, I probably should change the title of this thread, because the final application won't be using SSH at all. SSH automatically exports many environment variables upon connection. And, I've been able to get many applications (including OpenGL) forwarded over X via a local/telnet/SSH login. This is a ZSNES specific problem, not a general X forwarding issue.
Can you tunnel SDL apps? I'm not sure.

In any case, try FreeNX.
FreeNX is not possible. This requires you to simply tunnel an Xsession from a remote machine. However, I do not have an Xserver installed on this server machine.
Is SDL setup properly on the machine you're tunneling?
I'm positive SDL is compiled correctly, and ZSNES wouldn't compile without errors if SDL wasn't installed properly, would it? Besides I have ran many applications friends have written using SDL that ran just fine on this machine.

I'm about stumped. Looking through the source, specifically: linux/sw_draw.c, I'm beginning to suspect this is an SDL issue. The problematic function while using a non-OpenGL video mode is "SDL_SetVideoMode()" which seems to fail no matter what.

Any other ideas? or will installing X on the server machine be the only possible way to do what I want... I'm really trying, at all costs, to get this fixed _without_ installing X on the server.

Thanks everyone for the help,
andrew.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

as2100 wrote:
Is SDL setup properly on the machine you're tunneling?
I'm positive SDL is compiled correctly, and ZSNES wouldn't compile without errors if SDL wasn't installed properly, would it? Besides I have ran many applications friends have written using SDL that ran just fine on this machine.
You misunderstood me. Not SDL development setup correctly, SDL itself. Does it properly send output to X? Does it try to use libsvga?

If you don't have it knowing the proper output and to send it to X, you will have issues.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
as2100
New Member
Posts: 6
Joined: Fri Nov 11, 2005 2:51 am

Post by as2100 »

Nach, you are a god among men. Recompiled libsdl with X support, and video is now working perfectly. Thank you all for the help!
funkyass
"God"
Posts: 1128
Joined: Tue Jul 27, 2004 11:24 pm

Post by funkyass »

as2100 wrote:Nach, you are a god among men. Recompiled libsdl with X support, and video is now working perfectly. Thank you all for the help!
Not a god, just on good terms with some. Not all tho.
as2100
New Member
Posts: 6
Joined: Fri Nov 11, 2005 2:51 am

Post by as2100 »

Anyhow. Thanks for the help. This should nearly finish up the backend for a nifty web-based ZSNES application/ROM database server. Everything resolved.
Post Reply