Discussion:
[Wine] uninstalling something that didn't work
Doug
2014-04-01 23:50:03 UTC
Permalink
I found I had a disk of TurboCAD LTE, and installed it in Wine on
PCLOS-32-KDE, but it wouldn't run. I have tried to get rid of it, and I
don't know if I have
found all the instances of it, since neither "Find Files" gui nor
locate pointed to any of them. so I poked around in the various
directories, and I think I found
most or all instances, but if I start Wine, it shows "IMSI Design
TurboCAD LTE 4" and that entry points to 5 more files, but they are not
removable from
that utility. I don't know if any of them are still on the system.
As a matter of interest, I cannot seem to get into any of the c: or d:
(etc.) directories from a terminal, but I can find them in Konqueror
and the unwanted
programs in them that I can find I can delete via this GUI.
Before I clutter up the system with something else that may not work,
I'd like to know how to clean out those things that don't!

--Thanx--doug
Martin Gregorie
2014-04-02 14:13:47 UTC
Permalink
Post by Doug
(etc.) directories from a terminal, but I can find them in Konqueror
and the unwanted programs in them that I can find I can delete via this GUI.
I don't use KDE or Konqueror, so won't comment about that.
Post by Doug
Before I clutter up the system with something else that may not work,
I'd like to know how to clean out those things that don't!
Are you using separate Wine prefixes for each program or set of related
programs? if so, you'll be setting the $WINEPREFIX variable before
running Wine and you can completely wipe any installed Windows app by
deleting the directory named by $WINEPREFIX: the command

"rm -rf $WINEPREFIX"

but be aware that if you're just using the default prefix (so all apps
are installed in the same Wine instance, that command will wipe *all*
installed apps. The default prefix is called '.wine'

I never use the default prefix. I always create a separate prefix for
each app or group of related programs and always launch Wine apps with a
small shell script. In the following example the script, which has four
lines, is called myapp and runs a Windows app called MyApp, whose
installer put it in C:\Program Files\MyApp within a wine prefix
called .wine_myapp:

#!/bin/bash
export WINEPREFIX=$HOME/.wine_myapp
cd $WINEPREFIX/Program Files/MyApp
wine myapp.exe

After you've written the script it should be made executable:

chmod u+x myapp

and then to command "myapp" should run the Windows app. You can run it
from the command line (useful for debugging) make a KDE launcher to run
it.

The advantage if this is both that you can easily get rid of an app or
Windows program you no longer want and that some apps may need DLLs or
Windows versions that prevent other apps from running if they are all in
the same prefix. If they are in separate prefixes they can't interfere
with each other.

HTH

Martin
Doug
2014-04-02 16:16:13 UTC
Permalink
Post by Martin Gregorie
Post by Doug
(etc.) directories from a terminal, but I can find them in Konqueror
and the unwanted programs in them that I can find I can delete via this GUI.
I don't use KDE or Konqueror, so won't comment about that.
Post by Doug
Before I clutter up the system with something else that may not work,
I'd like to know how to clean out those things that don't!
Are you using separate Wine prefixes for each program or set of related
programs? if so, you'll be setting the $WINEPREFIX variable before
running Wine and you can completely wipe any installed Windows app by
deleting the directory named by $WINEPREFIX: the command
"rm -rf $WINEPREFIX"
but be aware that if you're just using the default prefix (so all apps
are installed in the same Wine instance, that command will wipe *all*
installed apps. The default prefix is called '.wine'
I never use the default prefix. I always create a separate prefix for
each app or group of related programs and always launch Wine apps with a
small shell script. In the following example the script, which has four
lines, is called myapp and runs a Windows app called MyApp, whose
installer put it in C:\Program Files\MyApp within a wine prefix
#!/bin/bash
export WINEPREFIX=$HOME/.wine_myapp
cd $WINEPREFIX/Program Files/MyApp
wine myapp.exe
chmod u+x myapp
and then to command "myapp" should run the Windows app. You can run it
from the command line (useful for debugging) make a KDE launcher to run
it.
The advantage if this is both that you can easily get rid of an app or
Windows program you no longer want and that some apps may need DLLs or
Windows versions that prevent other apps from running if they are all in
the same prefix. If they are in separate prefixes they can't interfere
with each other.
HTH
Martin
Martin, that's all very helpful for the future. For now, I didn't know
anything
about wineprefix. Let me see if I understand:
If I were to write a script, as you show, I assume that instead of
"myapp" I
would put the name of the application--like, frinstance, AutoCADLT. I asume
that would create a wineprefix just for this program.

If I were to do that, then how would I install AutoCADLT?
Right now, I just plug in the CD and run "setup" and Wine finds the
files and puts them wherever it thinks they should go. So instead, I do
what?

I guess if I want to do this, I will have to wipe whatever is now in WINE
and start over, which is not really a big deal--I hope! (This is a new setup
for Windows files--I had some on my old XP laptop, which is now
obsolete. By some good fortune the ones I had worked.)

Thanx for your help.

--doug
Martin Gregorie
2014-04-02 17:31:29 UTC
Permalink
Post by Doug
Martin, that's all very helpful for the future. For now, I didn't know
If I were to write a script, as you show, I assume that instead of
"myapp" I would put the name of the application--like, frinstance, AutoCADLT. I asume
that would create a wineprefix just for this program.
Correct.
Post by Doug
If I were to do that, then how would I install AutoCADLT?
Right now, I just plug in the CD and run "setup" and Wine finds the
files and puts them wherever it thinks they should go. So instead, I do
what?
You need to know the basics of Wine Prefixes. Here's a start:

Wine prefixes
=============
If there isn't a WINEPREFIX shell variable when Wine is called, it sets
up the default prefix by creating the WINEPREFIX variable with a value
of '$HOME/.wine' and then does its thing. $HOME is a shell variable that
is created at login with the absolute name of your login directory as
its value, so '.wine' is, by default, created in your login directory.
Names starting with '.' are hidden by default. You can see them by
changing Konqueror preferences or running 'ls -a' from the command line.

A directory with the absolute name given in $WINEPREFIX is created when
wine is run if it doesn't exist.

If WINEPREFIX already exists but you've set it to use a different name,
then this is used exactly the same as I've described above.

It is a Wine convention to refer to the directory containing the
application, 'drives', etc as a Wine Prefix. It is also a convention
that this name starts with a '.' and so is a hidden directory, but it
doesn't have to do that. Similarly, a common convention is to use a name
starting with '.wine' for non-default prefixes v- the advantage if this
is that the command 'ls -a .wine*' lists all the prefixes in your login
directory.

Installing an application from a CD
===================================
There are two ways of installing an application from the CD, assuming
there isn't a default wine prefix in your login directory:

(1) do just as you did already and then rename .wine to something
specific to the app you just loaded. Then do:

export WINEPREFIX=$HOME/.new_prefix_name

before attempting to run the app.

(2) Start by running "export WINEPREFIX=$HOME/.prefix_name" and then run
the install. If your login name is 'myself', this should install the
app in a directory called /home/myself/.prefix_name and attempting
to run it.

This may not work if the installer is launched as a separate job,
created when the CD is put into the drive, because the $WINEPREFIX
is only accessable to the login session it was set up in and its
child processes.

Using simple shell scripts to run Wine apps
===========================================
My four line script is just a way of:

- saving you from remembering to recreate WINEPREFIX each time
you log in

- Reflecting the fact that Windows Apps expect the directory
they're installed in to be the current working directory when
they are started (Linux programs don't make any such assumption)


General
=======
Go visit the WineHQ website and read at least the introductory pages on
Wine. You're likely to progress much faster by doing that than by just
asking questions.

If, like me, you learn best from reading books, get a copy of 'Linux in
a Nutshell' if you're a Windows power user or are familiar with another
operating system. Otherwise (despite its title) 'Linux for Dummies' may
be a better bet.

Get to know the two commands 'man' and 'apropos'. Man lists manpages -
there's a manpage for almost every Linux program and library subroutine,
so 'man less' tells you about using the 'less' utility. 'apropos term'
lists all the manpages with 'term' in their title line, so 'apropos
wine' will list all the manpages about wine and its helper programs.
Most major programs have websites, which are your next port of call if
the manpage doesn't cover what you want to know.
Post by Doug
I guess if I want to do this, I will have to wipe whatever is now in WINE
and start over, which is not really a big deal--I hope!
Correct.
Post by Doug
(This is a new setup for Windows files--I had some on my old XP laptop, which is now
obsolete. By some good fortune the ones I had worked.)
Don't forget that you can import your old files into the prefix once its
up and running. Using ZIP is probably easiest though you can also use
ftp of burn them to a CD.


Martin
James E Lang
2014-04-02 19:07:24 UTC
Permalink
That's a good approach Martin. Here is a single generalized version of your script that can be used to run any of many Windows programs. In addition to the ability to work with various programs, it includes some comments and the ability to restore the initial working directory upon completion.

<code>

#!/bin/bash
# usage: I install this executable script as $HOME/bin/runwine
# To run the Windows program e-sword I simply type runwine e-sword
# or I click a graphic shortcut that does that.
export WINEPREFIX=$HOME/.wine_${1}
pushd $WINEPREFIX/Program Files/${1}
wine ${1}.exe
popd

</code>

This script can be made more robust by adding a couple of validity tests and more flexible by supporting command line parameters to be passed to the Windows program.
--
Jim

-----Original Message-----
From: Martin Gregorie <***@gregorie.org>
To: wine-***@winehq.org
Sent: Wed, 02 Apr 2014 7:16
Subject: Re: [Wine] uninstalling something that didn't work

---->8====

I never use the default prefix. I always create a separate prefix for
each app or group of related programs and always launch Wine apps with a
small shell script. In the following example the script, which has four
lines, is called myapp and runs a Windows app called MyApp, whose
installer put it in C:\Program Files\MyApp within a wine prefix
called .wine_myapp:

#!/bin/bash
export WINEPREFIX=$HOME/.wine_myapp
cd $WINEPREFIX/Program Files/MyApp
wine myapp.exe

After you've written the script it should be made executable:

chmod u+x myapp

and then to command "myapp" should run the Windows app. You can run it
from the command line (useful for debugging) make a KDE launcher to run
it.

The advantage if this is both that you can easily get rid of an app or
Windows program you no longer want and that some apps may need DLLs or
Windows versions that prevent other apps from running if they are all in
the same prefix. If they are in separate prefixes they can't interfere
with each other.

HTH

Martin
Loading...