Results 1 to 5 of 5

Thread: Wine application shortcuts in 12.04

  1. #1
    Join Date
    Nov 2007
    Beans
    131
    Distro
    Ubuntu 13.04 Raring Ringtail

    Wine application shortcuts in 12.04

    Hi guys

    Is there any way of getting a shortcut to a wine application?

    I have this .desktop file
    Code:
    [Desktop Entry]
    Name=Mp3 Tag
    Exec=wine ~/.wine/drive_c/Program\ Files/Mp3tag/Mp3tag.exe
    Icon=
    Type=Application
    the exec line works in bash, so I know it's correct, but I get no response when I click the desktop file.

    I have tried creating a link to the executable I want, but that only works in the same directory as the executable. If I move it to any other directory, I get no response at all.

    I would like to launch this app from my desktop, but I don't know what else to try.

    Hope someone can help.

    Paresh
    "How did it get so late so soon"
    To the world you may be one person, but to one person you may be the world.

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,431
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Wine application shortcuts in 12.04

    i looked at the .desktop file that was created by a game installer on my 10.04
    its exec line looks like this:
    Code:
    Exec=env WINEPREFIX="/home/yourname/.wine" wine "C:\\Program Files\\AppDir\\executable file.exe"
    user specific .desktop files are located in ~/.local/share/applications
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  3. #3
    Join Date
    Jun 2007
    Beans
    13,785

    Re: Wine application shortcuts in 12.04

    As noted above you can quote the path, (either linux or window formatting) in which case no need to escape spaces in .
    or
    Use windows formatting using \\\\ for directories & \\ for spaces.
    So 2 additional examples would be
    Code:
    Exec=wine "~/.wine/drive_c/Program Files/Mp3tag/Mp3tag.exe"
    Code:
    Exec=wine C:\\\\Program\\ Files\\\\Mp3tag\\\\Mp3tag.exe
    Sometimes it doesn't hurt to add a Path= line, though not usually needed, it is linux path to where the .exe is, like this where blue is replaced with your username -
    Code:
    Path=/home/username/.wine/dosdevices/c:/Program Files/Mp3tag
    Also doesn't hurt to have an icon, though again maybe not 100% needed.
    For icons in /usr/share/pixmaps, /usr/share/app-install/icons, or in the install folder of your wine app you only need the name of the icon, otherwise full path.

    (- the properties > permissions of a launcher should show executable for clicking on to launch

  4. #4
    Join Date
    Nov 2007
    Beans
    131
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Wine application shortcuts in 12.04

    I created the .desktop file by hand and tried the command in bash to make sure it worked before putting it in the .desktop file.

    so
    Code:
    wine ~/.wine/drive_c/Program\ Files/Mp3tag/Mp3tag.exe
    works in bash, but not in the .desktop file and
    Code:
    wine C:\\\\Program\\ Files\\\\Mp3tag\\\\Mp3tag.exe
    works in the .desktop file, but not in bash.

    Strange ...

    Btw, thanks for the help guys.
    "How did it get so late so soon"
    To the world you may be one person, but to one person you may be the world.

  5. #5
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    805
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Wine application shortcuts in 12.04

    The tilde ~ is a variable that gets interpreted and expanded by bash to your home location. Rarely will a DE do that for .desktop files i.e. it will not invoke bash to interpret the command, just execute it.
    Consequently
    Code:
    wine /home/<yourname>/.wine/drive_c/Program\ Files/Mp3tag/Mp3tag.exe
    should work as well as
    Code:
    bash -c "wine ~/.wine/drive_c/Program\ Files/Mp3tag/Mp3tag.exe"
    and
    Code:
    bash -c "wine $HOME/.wine/drive_c/Program\ Files/Mp3tag/Mp3tag.exe"
    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •