Is it possible to run an application automatically?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
venstar
Newbie
Newbie
Posts: 1
Joined: Mon May 25, 2009 7:36 am

Is it possible to run an application automatically?

Post by venstar »

Hi,

I am pretty new in the wine world and maybe I am asking a stupid question, so please have mercy.

I would like to run an application under wine directly, without waiting for the prompt and without executing it manually there. Something like autostart - I execute a Linux shell command that starts the wine and the needed application directly. Is this possible?

My application dumps some plain text info on the stdout and opens a socket so I can communicate with it remotely, no GUI needed. The ultimate goal is to run it remotely (over ssh) and leave it in backgroud.

It seems that it works but I do not know how correct is this. This is the dump I got from putty (no X-forwarding):
test@test-pc-nl001:~/.wine/drive_c$ wine test_wrapper.exe 5000
E: client-conf-x11.c: XOpenDisplay() failed
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
Listening on port: 5000
[native] ConnectTest: 1
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.
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.
fixme:comm:GetCommProperties (0xa8 0x33f9ac )
fixme:comm:set_queue_size insize 4096 outsize 2048 unimplemented stub
fixme:comm:GetCommProperties (0xa8 0x33f968 )
fixme:comm:io_control Unsupported IOCTL 1b009c (type=1b access=0 func=27 meth=0)
fixme:comm:set_queue_size insize 128 outsize 32 unimplemented stub
fixme:comm:GetCommProperties (0xa8 0x33f9dc )
Thank you in advance!

Kindest regards
User avatar
Daemon
Level 4
Level 4
Posts: 101
Joined: Wed Nov 12, 2008 2:24 pm

Post by Daemon »

You'd have to read up on how to make it into a daemon process for your distro. As far as what the Unsupported IOCTL is (or if it's causing a major problem) you'd have to do some Googling.
WINEDEBUG=+comm wine test_wrapper.exe 5000 will give you more specific output

ed: Thinking about it you probably wouldn't want the wine process to run as root unless you can run it as a different user context somehow. Right, if it's non-GUI based then why is trying to create a X-session.
Last edited by Daemon on Mon May 25, 2009 1:13 pm, edited 1 time in total.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Is it possible to run an application automatically?

Post by vitamin »

venstar wrote: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 indicates your program creates (or uses some part of Wine that creates) window(s). For that you absolutely have to have valid X session.

Unless you write you program in such a way that it doesn't create window(s) itself, and does not use any part of Wine that create windows, you can not run it as a daemon.
Locked