Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I create a shortcut to start a Windows application with Wine?

For example I have Notepad++

/media/DATA/Progs/Notepad++/notepad++.exe

and I would like to have a shortcut to it on the desktop.

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted
  • Right click on your Desktop and then select Create Launcher. alt text

  • Then enter the name and in command box enter the path of your wine application. alt text

  • Now you can simply click the launcher in your Desktop to open your wine application.
  • Also have a look at this link.
share|improve this answer
    
Right-clicking my ubuntu desktop does not present a create launcher menu, only create new folder, create new document. –  Mittenchops Oct 17 '13 at 13:42
    
this does not work with 13.10 at least - there is no such right-click option. –  comrademike Mar 5 at 12:09
add comment

"Create Launcher" isn't an option in the context menu anymore.

Here's what i do. It's not the easiest but once it's in place you can just duplicate/edit the existing files.

  1. Open a terminal session

  2. Create a storage folder for the launcher script

    mkdir $HOME/.bin
    
  3. Create the launcher script

    nano $HOME/.bin/appname.sh
    

    Insert the following code without the quotes

    #!/bin/bash
    
    cd "$HOME/.wineprefix/drive_c/Program\ Files/programfolder/"
    
    WINEPREFIX="$HOME/.wineprefix" wine exefilename.exe
    

    Press Ctrl+X
    Press Y to save changed
    Press Enter to confirm file name

  4. Make the script executable

    sudo chmod +x ~/.bin/appname.sh
    
  5. Create the desktop link

    nano /Desktop/appname.desktop
    

    Insert the following code. Don't use ~/<path> to indicate home directory, it does not work in .desktop files. I made a subdirectory in .bin for icons. If you don't have an icon you can leave the line blank.

    [Desktop Entry]
    
    Name=<Appname>
    
    Comment=Wine Program
    
    Exec=$HOME/.bin/appname.sh
    
    Icon=$HOME/.bin/ico/icofilename.ico
    
    Terminal=false
    
    Type=Application
    
    Categories=Game;
    
    GenericName=appname
    

    Press Ctrl+X
    Press Y
    Press Enter

Now your done.

To create additional launchers just copy the existing file and edit it in terminal

cp $HOME/.bin/appname.sh $HOME/.bin/newappname.sh

nano $HOME/.bin/newappname.sh

Edit and Close

cp $HOME/Desktop/appname.desktop $HOME/Desktop/newappname.desktop

nano $HOME/Desktop/newappname.desktop

Edit and Close

share|improve this answer
add comment

WLCreator is a Python program (script) that creates Linux desktoplaunchers for Windows programs (using Wine).

Usage

WLCreator will try to extract icons from exe file, and to search for all ico files in exe's directory and its subdirectories, and to convert them to png files. Additionaly, it will search for png files in application's main directory. After that, the user is presented with a graphical interface where he/she can choose the icon and launcher's name.

The program can also be integrated in Nautilus (as nautilus-script). This makes easy creation of launchers even easier!

You’ll need to ensure you have python-qt4, icoutils, and imagemagick installed to get full use of the application.

Download .deb package from here and once you have deb package you need to double click on it to install.

enter image description here

enter image description here

enter image description here

Source and further information

share|improve this answer
add comment

I want a shortcut for Fox, so here's what I did:

$ touch "$HOME/Desktop/fox.desktop"
$ sudo touch "/opt/fox.sh"

$ chmod +x "$HOME/Desktop/fox.desktop"
$ sudo chmod +x "/opt/fox.sh"

$ editor "$HOME/Desktop/fox.desktop"  # Add the data
$ editor "/opt/fox.sh"  # Add the data

$ cat "/opt/fox.sh"
#!/bin/bash

WINEPREFIX="$HOME/.wineprefix" wine "$HOME/.wine/drive_c/Program Files (x86)/firstobject/foxe.exe"

$ cat "$HOME/Desktop/fox.desktop"
[Desktop Entry]
GenericName=Fox
Exec=/opt/fox.sh
Icon=/home/<username>/.wine/drive_c/Program Files (x86)/firstobject/foxe.exe_14_128_1033_1_32x32x4.png
MapNotify=true
Type=Application
Name=Fox

EDIT: If you want to grab the icon from the exe; follow this guide or use the "gExtractWinIcons" GUI (available with apt-get install).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.