[Wine] Configure Wine to run only one application

Martin Gregorie martin at gregorie.org
Sat Jun 12 05:49:37 CDT 2010


On Fri, 2010-06-11 at 20:15 -0700, James McKenzie wrote:
> Martin Gregorie wrote:
> > On Fri, 2010-06-11 at 09:04 -0500, Bonxie wrote:
> >   
> >> I persuaded my friends to convert to Linux, now they want Sketchup!
> >> They are the sort of people who would click on anything and I don't want them to get malware etc.
> >> Is there a way to make Wine run *only* Sketchup and nothing else?
> >>
> >> I did try searching for the answer but couldn't find one.
> >>
> >>     
> > One way would be to install it in a dedicated login on a server. The
> > setup could be done like this.
> >   
> What happens if he wants more than one user to be able to use the 
> 'application' at one time?
> 
There are almost no Windows apps that can handle multiple simultaneous
users. Those that can are designed to be installed on a server or
written explicitly as desktop servers. 

Since a Windows desktop box can't be used by more than one user at a
time it follows that the OS will lack file access locks (only Windows
Server has those) and there's no requirement for a normal Windows app to
support more than one user at a time either. All those that can
apparently do so are either servers (e.g. SQL Anywhere) or operate as a
single program with multiple windows (e.g. text editors, Word).

>From a fairly quick look at the Google SketchUp! it would appear that
the program is a normal Windows desktop application, so if the OP wants
several friends to use a single copy, he'll have to protect it from
simultaneous access by something like the method I outlined. Otherwise
he'll need multiple installations regardless of whether they are under
separate users on a single Linux box or on separate boxes - and still
need the single user locks to prevent accidental multiple use. 

Yes, it is probably possible to finangle things so one install can be
used from a single prefix, but can the program be run that way without
it tripping over itself when more than one user accesses the same
internal structures or on-disk workspace? Only Google would know the
answer to that. 

> I'll investigate, but the solution should be simple, but the problem is 
> very complex. 
> 
Agreed. My plot was tested with a Wine app before I described it: I have
a copy of XCSoar set up on my Fedora 10 server with both a normal
desktop login and a captive login exactly as described. XCSoar is
specialist navigation software for glider pilots, not in the AppDB: its
something I normally run from a wrapper script from the desktop so it
was straightforward to add a captive login that only runs XCSoar and
logs out as soon at XCSoar exits.

The only change I'd make to the script I posted would be to use  zenity
or xmessage rather than echo to tell the user that the app is in use:

     zenity --error --text="SketchUp! is being used: try again later"   

because this gives a somewhat more user friendly error display than
simply using echo. This works OK with a remote login. I use ssh with X11
forwarding enabled.


Martin





More information about the wine-users mailing list