[Wine] wine over ssh

Martin Gregorie martin at gregorie.org
Wed Apr 22 18:18:07 CDT 2009

On Wed, 2009-04-22 at 17:07 -0500, vijaymk wrote:
> 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.
Have you tried using VNC? I just tried it with a WINE application - it
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.

8) 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

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.


More information about the wine-users mailing list