Running a wine app from a control panel.

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Sapro
Level 1
Level 1
Posts: 5
Joined: Thu May 26, 2011 11:07 am

Running a wine app from a control panel.

Post by Sapro »

Hello, I wonder if anyone has experienced this, or knows of a way to fix this problem I have.

I am trying to host a game server that needs wine to launch. I can run the game fine through an SSH terminal using wine game.exe.

I do get this message:

Code: Select all

Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
This is not the issue, the server runs fine still even tho it throws this up.

I get this issue when I try and launch the server through a game control panel I have.

Code: Select all

Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Error opening terminal: unknown.
I don't have a clue why it's throwing up the error opening terminal.

The SSH terminal is set to xterm, and the user that controls the control panel is also set to xterm.

Any ideas would be much appreciated!
Sapro
Level 1
Level 1
Posts: 5
Joined: Thu May 26, 2011 11:07 am

Post by Sapro »

MelissaDaisy99 wrote:Well, great work! You have helped me to improve my knowledge about this field. Thank you so much for sharing.
Are you on drugs? or is it simply an attempt to get people to click on that stupid movie link?

Can any moderators delete above post please!
John Drescher

Running a wine app from a control panel.

Post by John Drescher »

Are you on drugs? or is it simply an attempt to get people to click on that stupid movie link?
SPAMMERS. Sometimes I think they are on drugs as well.

John
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Post by ischou »

I don't think SSH automatically forwards your DISPLAY, and for security reasons you should explicitly do the SSH port forward. If you are using any current version of SSH try adding the "-Y" or "-X" flags when you start your SSH session to get SSH to port-forward the X11 ports.
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Post by ischou »

Didn't notice your actual problem. As for starting the server from the game itself, does the game require wine to run? How does the game know how to start the server, if the server also requires wine? (ie. Did you replace the server executable with some kind of shell script that starts up in wine?)

If your game can display, then the new sub-process that it spawns should inherit the DISPLAY.
Sapro
Level 1
Level 1
Posts: 5
Joined: Thu May 26, 2011 11:07 am

Post by Sapro »

It runs fine through SSH, it does throw up the display error but I can still connect to the game server via my windows based PC fine.

If I do it through terminal I use the wine /gamelocation/game.exe -m (parameters to run) and it runs fine with the display error.

But the problem is I want it to launch from an apache based website control panel. It's controlled by the user www-data. It does launch the game with setting wine as the executable with the game as a parameter. But it gets killed by Error opening terminal: unknown.

This only occurs if I try use the control panel to launch the game. Im not entirely sure it's a wine problem, just curious as to whether anyone else has had this error before?
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Running a wine app from a control panel.

Post by jjmckenzie »

On Fri, May 27, 2011 at 8:49 AM, Sapro <[email protected]> wrote:
It runs fine through SSH, it does throw up the display error but I can still connect to the game server via my windows based PC fine.

If I do it through terminal I use the wine /gamelocation/game.exe -m (parameters to run) and it runs fine with the display error.

But the problem is I want it to launch from an apache based website control panel. It's controlled by the user www-data. It does launch the game
with setting wine as the executable with the game as a parameter. But it gets killed by Error opening terminal: unknown.

This only occurs if I try use the control panel to launch the game. Im not entirely sure it's a wine problem, just curious as to whether anyone else
has had this error before?
A search of the forums will reveal that, yes, others have had problems
running 'stand alone servers' without setting a legitimate DISPLAY
variable. There are x-server stubs that will take care of this as
well. Suggest that you search the forums for helpful hints.
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Post by ischou »

ok. So if you call ssh with "ssh -Y" you will probably get rid of your DISPLAY error.

As for triggering your game from apache, that will be highly problematic. apache usually runs as a "nobody" or "http" user and often chrooted to the apache directory for security purposes. Unless you are running apache as your own user, you're likely going to have permission problems all over the place. If you run it as a local user, then you're likely to create all kinds of insecurities.
Sapro
Level 1
Level 1
Posts: 5
Joined: Thu May 26, 2011 11:07 am

Re: Running a wine app from a control panel.

Post by Sapro »

[/quote]A search of the forums will reveal that, yes, others have had problems
running 'stand alone servers' without setting a legitimate DISPLAY
variable. There are x-server stubs that will take care of this as
well. Suggest that you search the forums for helpful hints.[/quote]

I have tried to search, but have not found anything that relates to my problem. Could you tell me what you searched for?

Im also learning linux and have no idea what an x-server stub is :)

ischou - I have managed to get the control panel to run other games as user www-data and have corrected permissions for it.
It does launch the game fine, but the problem is something is killing it when it starts up.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Running a wine app from a control panel.

Post by jjmckenzie »

On 5/28/11 1:25 AM, Sapro wrote:
A search of the forums will reveal that, yes, others have had problems
running 'stand alone servers' without setting a legitimate DISPLAY
variable. There are x-server stubs that will take care of this as
well. Suggest that you search the forums for helpful hints.[/quote]

I have tried to search, but have not found anything that relates to my problem. Could you tell me what you searched for?

Im also learning linux and have no idea what an x-server stub is :)
[/quote]This is an exercise for the student. Google is your friend (X Server no
screen).
ischou - I have managed to get the control panel to run other games as user www-data and have corrected permissions for it.
It does launch the game fine, but the problem is something is killing it when it starts up.
Yes, Wine needs an X Display to run and it will crash without one.
Sapro
Level 1
Level 1
Posts: 5
Joined: Thu May 26, 2011 11:07 am

Post by Sapro »

I find that a bit strange, as I can still run the server through SSH without x server. I tried it anyhow, and I still end up with the same

Error opening terminal: unknown.
Locked