wine over ssh
wine over ssh
Hi all,
I am running wine over ssh (with X forwarding) and I have a problem getting back into the shell after executing an app using wine.
Here's what I am doing:
ssh -X myhost 'wine notepad'
The concern is that I can get back to my shell only after I exit the notepad application. I tried appending an '&' at the end and that did'nt help.
Any help is appreciated.
cheers,
vijay.
I am running wine over ssh (with X forwarding) and I have a problem getting back into the shell after executing an app using wine.
Here's what I am doing:
ssh -X myhost 'wine notepad'
The concern is that I can get back to my shell only after I exit the notepad application. I tried appending an '&' at the end and that did'nt help.
Any help is appreciated.
cheers,
vijay.
wine over ssh
On Wed, 2009-04-22 at 17:07 -0500, vijaymk wrote:
worked with no trouble.
1) Login to the remote host where you run wine with ssh
2) run "vncserver" and take note of the display number it chooses.
At this point you can log out from your ssh session or not,
as you wish.
3) from your local machine, run "/usr/bin/vncviewer -FullColour".
You can run that in a terminal session or put a launcher on
your desktop and click the icon.
4) When prompted, enter "hostname:n" where 'hostname' is the remote
host and 'n' is the display number.
5) You'll be prompted for a password. Enter the password for the login
you started vncserver in.
6) A reduced desktop appears with an open terminal session in it.
7) Use that to run your wine application.
When you're done, click the top left corner of the VNC desktop and
select Quit from the menu. The remote desktop closes.
9) You can leave vncserver running a long as you want.
It doesn't use resources if you just leave it running.
When you want to stop it, start an ssh session to the login its
running in and run the command "vncserver -kill :1" to stop the
server.
There are variations on this scheme:
- Once vncviewer has opened a remote desktop you can open as many
windows on it as you want, just like a local desktop.
- By default VNC uses the xfce window manager, which doesn't
show icons or the remote desktop image, but you can configure
it to use Gnome or KDE instead.
- If you prefer, you can run a VNC viewer applet in your web browser
instead of using vncviewer, but its colours aren't as good as you
see on a local terminal or with the vncviewer application, but you
can usually live with that. The advantage is that you can access the
remote host from any OS provided it has a browser that can run a
Java applet.
- You can leave as many copies of vncserver running as you like
in different logins. They all advertise different display numbers,
so each display number selects a different login user.
- You can also start a single, central vncserver via xinetd.
This means that you don't have to log in to start the server.
There's only one gotcha. Its probably not a good idea to use the
vncserver -geometry option to resize its virtual desktop (default is
1024 x 768) if you also access that user from a local console because
VNC mucks about with the Xorg config if you do that.
Martin
Have you tried using VNC? I just tried it with a WINE application - itHi all,
I am running wine over ssh (with X forwarding) and I have a problem
getting back into the shell after executing an app using wine.
Here's what I am doing:
ssh -X myhost 'wine notepad'
The concern is that I can get back to my shell only after I exit the
notepad application. I tried appending an '&' at the end and that
did'nt help.
Any help is appreciated.
worked with no trouble.
1) Login to the remote host where you run wine with ssh
2) run "vncserver" and take note of the display number it chooses.
At this point you can log out from your ssh session or not,
as you wish.
3) from your local machine, run "/usr/bin/vncviewer -FullColour".
You can run that in a terminal session or put a launcher on
your desktop and click the icon.
4) When prompted, enter "hostname:n" where 'hostname' is the remote
host and 'n' is the display number.
5) You'll be prompted for a password. Enter the password for the login
you started vncserver in.
6) A reduced desktop appears with an open terminal session in it.
7) Use that to run your wine application.

select Quit from the menu. The remote desktop closes.
9) You can leave vncserver running a long as you want.
It doesn't use resources if you just leave it running.
When you want to stop it, start an ssh session to the login its
running in and run the command "vncserver -kill :1" to stop the
server.
There are variations on this scheme:
- Once vncviewer has opened a remote desktop you can open as many
windows on it as you want, just like a local desktop.
- By default VNC uses the xfce window manager, which doesn't
show icons or the remote desktop image, but you can configure
it to use Gnome or KDE instead.
- If you prefer, you can run a VNC viewer applet in your web browser
instead of using vncviewer, but its colours aren't as good as you
see on a local terminal or with the vncviewer application, but you
can usually live with that. The advantage is that you can access the
remote host from any OS provided it has a browser that can run a
Java applet.
- You can leave as many copies of vncserver running as you like
in different logins. They all advertise different display numbers,
so each display number selects a different login user.
- You can also start a single, central vncserver via xinetd.
This means that you don't have to log in to start the server.
There's only one gotcha. Its probably not a good idea to use the
vncserver -geometry option to resize its virtual desktop (default is
1024 x 768) if you also access that user from a local console because
VNC mucks about with the Xorg config if you do that.
Martin
Re: wine over ssh
Thanks for the response. I have no problem running applications; just that I am unable to return to shell until the app is closed. The reason this bugs me is because I need to use this a bunch if times in a shell script, and if I can't get back to shell, my script does not serve its purposeMartin Gregorie wrote:
Have you tried using VNC? I just tried it with a WINE application - it
worked with no trouble.
....
Martin

Re: wine over ssh
That's correct - you asking ssh to login and start that app and not the remote shell.vijaymk wrote:ssh -X myhost 'wine notepad'
The concern is that I can get back to my shell only after I exit the notepad application. I tried appending an '&' at the end and that did'nt help.
You have to use nohup and stderr redirection if you want to start Wine program in a background like that. RTFM more about "daemonising" a program - disconnecting it from the terminal and keeping it running. This has nothing to do with Wine but the basics of using *NIX shell.
wine over ssh
On Wed, 2009-04-22 at 21:04 -0500, vijaymk wrote:
down fast and doesn't block your ssh session.
WINE app I'd expect the script to resume execution every time you exit
from the app. Why doesn't it do that?
Are you doing something more devious/convoluted than running a simple
script?
I suggest you open a second ssh session in parallel and run diagnostic
tools, e.g. top, in it to see what's going on in your script.
Martin
...which is exactly why I suggested using it. VNC starts up and closesThanks for the response. I have no problem running applications; just
that I am unable to return to shell until the app is closed.
down fast and doesn't block your ssh session.
..but if you run the script in an ssh session and the script runs theThe reason this bugs me is because I need to use this a bunch if times
in a shell script, and if I can't get back to shell, my script does
not serve its purpose
WINE app I'd expect the script to resume execution every time you exit
from the app. Why doesn't it do that?
Are you doing something more devious/convoluted than running a simple
script?
I suggest you open a second ssh session in parallel and run diagnostic
tools, e.g. top, in it to see what's going on in your script.
Martin
Re: wine over ssh
So how will he run a VNC on non-existing X server?Martin Gregorie wrote:...which is exactly why I suggested using it. VNC starts up and closes
down fast and doesn't block your ssh session.
wine over ssh
On Thu, 2009-04-23 at 09:29 -0500, vitamin wrote:
- Xvnc (the program launched by the vncserver script) publishes an X
server interface for use by the application and provides a private
VNC service interface for accepting connections as well as an HTTP
server interface for the vnc applet.
- vncviewer comes in an X-aware versions (you run that on *nix hosts)
and a Windows version. Probably there are others too.
- there's also a Java applet that runs in any Java-enabled web browser
that can be used in place of vncviewer.
In short, you can use VNC to run X-applications on a headless server.
That's what it was designed to do.
Martin
VNC doesn't need an X-server:Martin Gregorie wrote:So how will he run a VNC on non-existing X server?...which is exactly why I suggested using it. VNC starts up and closes
down fast and doesn't block your ssh session.
- Xvnc (the program launched by the vncserver script) publishes an X
server interface for use by the application and provides a private
VNC service interface for accepting connections as well as an HTTP
server interface for the vnc applet.
- vncviewer comes in an X-aware versions (you run that on *nix hosts)
and a Windows version. Probably there are others too.
- there's also a Java applet that runs in any Java-enabled web browser
that can be used in place of vncviewer.
In short, you can use VNC to run X-applications on a headless server.
That's what it was designed to do.
Martin
Re: wine over ssh
Right, you have to start it first. Or there is nothing to vnc into.Martin Gregorie wrote:- Xvnc (the program launched by the vncserver script) publishes an X
server interface for use by the application and provides a private
VNC service interface for accepting connections as well as an HTTP
server interface for the vnc applet.
VNC or not you still have to "daemonize" the process before you can disconnect. And vnc client connection is not scriptable.
Anyway, it's hard to guess exactly what OP wanted. What his program does, why does he want to run it in background.
wine over ssh
On Thu, 2009-04-23 at 13:51 -0500, vitamin wrote:
running "vncserver" and logging out again is enough. VNC stays available
until the next reboot unless you log in again and stop it.
an ssh session and use it to run a script on the remote host: the script
would start a WINE application several times and would use X11
forwarding to display its window(s) on the local machine. Now I'm not so
sure. A re-reading suggests he might want to run a script on his local
machine that starts the WINE app on a remote host.
I've decided I don't understand what he wants to do and will say no more
about it until we hear a clear explanation from him.
Martin
Correct.Right, you have to start it first. Or there is nothing to vnc into.
Logging in via ssh to the user you want to access access via VNC,VNC or not you still have to "daemonize" the process before you can disconnect. And vnc client connection is not scriptable.
running "vncserver" and logging out again is enough. VNC stays available
until the next reboot unless you log in again and stop it.
I can't work that out. My first assumption was that he wanted to startAnyway, it's hard to guess exactly what OP wanted. What his program
does, why does he want to run it in background.
an ssh session and use it to run a script on the remote host: the script
would start a WINE application several times and would use X11
forwarding to display its window(s) on the local machine. Now I'm not so
sure. A re-reading suggests he might want to run a script on his local
machine that starts the WINE app on a remote host.
I've decided I don't understand what he wants to do and will say no more
about it until we hear a clear explanation from him.
Martin
Re: wine over ssh
Yes, you are correct. This is what I intend to do.Martin Gregorie wrote: ....
I can't work that out. My first assumption was that he wanted to start
an ssh session and use it to run a script on the remote host: the script
would start a WINE application several times and would use X11
forwarding to display its window(s) on the local machine. Now I'm not so
sure. A re-reading suggests he might want to run a script on his local
machine that starts the WINE app on a remote host.
I've decided I don't understand what he wants to do and will say no more
about it until we hear a clear explanation from him.
Martin
[#] I ssh into server1, and run a wine application.
[#] With that app running in the background, I ssh into server2 and run another wine app.
[#] This goes on to 10 different servers..
[#] Once an app finishes running (in any server), I need to detect that and re-run the app with slightly different arguments.
.... and I want to script this whole thing

I'm still new to shell scripting and i'll RT(F)M to get that going!
