Discussion:
[Wine] Not able to run app using Wine
John Rose
2014-01-11 12:33:57 UTC
Permalink
I'm using Wine 1.6.1 installed using the Ubuntu Wine Team's ppa under
Ubuntu Precise. I have a Desktop Configuration File (named
Basic4android.desktop) created by Wine when I installed the
Basic4android windows app.

The file is in directory
/home/john/.local/share/applications/wine/Programs/Basic4android/.

Contents of the file are:
[Desktop Entry]
Name=Basic4android
Exec=env WINEPREFIX="/home/john/.wine" wine
C:\\\\windows\\\\command\\\\start.exe /Unix
/home/john/.wine/dosdevices/c:/users/Public/Start\\
Menu/Programs/Basic4android/Basic4android.lnk
Type=Application
StartupNotify=true
Path=/home/john/.wine/dosdevices/c:/Basic4android
Icon=05D9_Basic4android.0

/home/john/.wine/dosdevices/c:/users/Public/Start
Menu/Programs/Basic4android/Basic4android.lnk (written using standard
Unix notation) exists. I don't know how to determine where it points to.
However, the file (basic4android.exe) that it should point to is in
directory /home/john/.wine/c:/dosdevices/c:/Basic4android/ and I can run
it successfully by double clicking it in the Nautilus File Manager.

When I try to run the app (by using the launcher in Unity (corresponding
to the Desktop Configuration File detailed above), I get a small window
showing 'File Missing' with no useful options, but it doesn't detail
which file that is missing. Help please!

PS I get the same problem with other windows apps (e.g. Windows version
of Android SDK).
--
Regards, John
Martin Gregorie
2014-01-11 16:01:25 UTC
Permalink
On Sat, 2014-01-11 at 12:33 +0000, John Rose wrote:
If you start a terminal session, cd to the Basic4Android directory and
then run the command:

ls -l Basic4android.lnk

and post a copy of the output. The colour used for the file name is
meaningful too, so:

- What colour is Basic4android.lnk shown in?
The usual Linux convention is that:
- a valid symbolic link is pale blue
- an invalid symbolic link, i.e. the file it points at doesn't exist,
is red.
- a hard link to a file is the same colour as the file it links to,
probably white or green.

- If Basic4android.lnk is pale blue or red, what is it pointing to?
This is shown at the end of the line, e.g.

lrwxrwxrwx 1 kiwi kiwi 10 Jan 11 15:47 target_sym -> target.txt

where 'target_sym' is the name of the symbolic link and 'target.txt'
is the file it points to.


Martin
John Rose
2014-01-11 16:12:28 UTC
Permalink
Martin,

Output is white:
***@JohnDesktop:~/.wine/drive_c/users/Public/Start
Menu/Programs/Basic4android$ ls -l Basic4android.lnk
-rw-rw-r-- 1 john john 611 May 31 2013 Basic4android.lnk
--
Regards, John
Martin Gregorie
2014-01-11 18:12:13 UTC
Permalink
Post by John Rose
Martin,
Menu/Programs/Basic4android$ ls -l Basic4android.lnk
-rw-rw-r-- 1 john john 611 May 31 2013 Basic4android.lnk
OK, that means this file is a hard link. and is pointing at a file that
is 611 bytes long. You can double check that its pointing to the correct
file, which I assume should be basic4android.exe, by seeing if that is
also 611 bytes.

Assuming that it is, the problem is that the hard link isn't marked as
executable. You can make it executable by changing its permissions with
Nautilus (use the permissions tab under Properties) or from the command
line with the "chmod ug+x Basic4android.lnk" command. As you'll probably
only be running it from the user its installed in, don't mark it as
world executable.

*** I don't think Basic4android.lnk is pointing at basic4android.exe but
*** its seeing what's inside the .lnk file to see what it is pointing
*** at.
*** I have a different suggestion. See below.

FYI, in Linux a symbolic link, AKA symlink, is exactly equivalent to a
Windows shortcut - a small file holding the name of the file or
directory its points to. Symlinks default to having all possible
permissions set because access is controlled by the permissions set on
the target.

However, a hard link is quite different. Creating a hard link adds
another name, with its own set of permissions, to an existing file. This
has two effects you need to know about:
(1) the hard link's permissions are the defaults for the user creating
it regardless of the permissions in the original name. This is
what you've seen: A Microsoft installer won't understand that

(2) A file with one or more hard links can only be deleted by deleting
all its hard links, which includes its original name: as long as
there is one of them left the file will continue to exist.

You can see this from the 'ls -l' output: the first number on the
line (just after the permissions) shows the number of links to the
file.

*** I notice that your Basic4android.lnk file has only one link, so it
isn't pointing at any other file. Have a look at its contents to see
what it is pointing to.

Here's what I'd do.

1) Make a safety copy
of /home/john/.local/share/applications/wine/Programs/Basic4android/

2) edit it, changing the "Exec" line so that the second argument:

/home/john/.wine/dosdevices/c:/users/Public/Start\\
Menu/Programs/Basic4android/Basic4android.lnk

becomes

/home/john/.local/share/applications/wine/Programs/Basic4android/basic4android.exe

3) Try running that. This type of fix will also solve your other
problems with the Windows version of the Android SDK.

But why are you playing with the Windows version of the SDK when there's
a Linux version available? Both versions of the SDK use Eclipse and the
Java 6 JDK.


Martin

Continue reading on narkive:
Loading...