Re: Configure Wine to run only one application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

1) Create a normal login called 'wineapp'
2) login to wineapp and create a directory called 'bin'
3) Use a text editor to create a script called runwineapp in bin:
==================== start of 'runwineapp' script ======================
#!/bin/bash

#
# Make sure only one user can run the application at a time
#
if [ -f in_use ]
then
	echo "Sorry - the application is in use"
        echo "Try again later"
	exit
else
	>in_use
fi

#
# CD to the directory where the application is installed
#
cd '.wine/drive_c/Program files/TheApplication' application

#
# Now run the application
#
wine application.exe

#
# Remove the in use marker
#
cd
rm in_use
exit

==================== end of 'runwineapp' script ======================

4) Make the script executable:  

	chmod uga+x /home/wineapp/bin/runwineapp

5) Use the user maintenance tool to change the shell to be used on
   login from /bin/bash to /home/wineapp/bin/runwineapp

   NOTE: If the user maintenance tool won't let you change the shell
   use the usermod command line program:
   - login as root, use sudo or su
   - run the command:

	usermod wineapp -s /home/wineapp/bin/runwineapp

6) If you, as application admin, need access as a normal user
   to wineapp, you should set up a second user that is the same in
   all respects as wineapp (including the user and group IDs) by
   using the useradd utility with the -o option, which lets you add
   add a user with a duplicate user id.


Now, when the user logs in to wineapp, the application will be run
immediately and the 'in use' marker will be set. When the user exits
from the application the 'in use' marker will be unset and the user will
be logged out, but if you log in as the wineapp admin, you'll get a
normal login desktop.


HTH

Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux