You are not logged in.

#1 2010-08-18 20:35:34

Dropsy
Member
Registered: 2010-08-16
Posts: 7

[Solved] Create wine launcher with thunar

I would love some help with the following problem.

I would like to create a desktop launcher for a wine application, which I can open from the CLI or via browsing to the folder in thunar. However when I try to create the launcher on the desktop, using the same path I would in the CLI, nothing happens. I am not sure if the command needs to be different and somehow wine needs to be specified to "open with" even though that file association is set already, or if this needs to be done via a script (I tried this, but I really have no scripting skills--my terminal skills are minimal at best).

TIA

Last edited by Dropsy (2010-08-18 21:25:18)

Offline

#2 2010-08-18 20:59:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Create wine launcher with thunar

#! /bin/sh
wine /path/to/file

should be enough but sometimes you need to navigate to the app's dir and then launch it, otherwise it may throw an error about missing one thing or another.
IIRC, double-clicking an exe file opens wine (in Dolphin), so you can launch your app this way.

Last edited by karol (2010-08-18 21:01:26)

Offline

#3 2010-08-18 21:08:59

Dropsy
Member
Registered: 2010-08-16
Posts: 7

Re: [Solved] Create wine launcher with thunar

Well, I am using xfce with thunar, and as you suggest it launches fine navigating to the app and launching, but I would like to do this from a desktop icon. I'm sure it is just a matter of the proper syntax. I tried pasting the series of commands I would use to do this from the terminal into a bash script but it failed to run.

Offline

#4 2010-08-18 21:12:52

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: [Solved] Create wine launcher with thunar

You need to remember to escape all those backslashes

#!/bin/sh
wine "C:\\\\Program Files\\\\World Time\\\\WorldTime.exe"

Offline

#5 2010-08-18 21:14:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Create wine launcher with thunar

Dropsy wrote:

Well, I am using xfce with thunar, and as you suggest it launches fine navigating to the app and launching, but I would like to do this from a desktop icon. I'm sure it is just a matter of the proper syntax. I tried pasting the series of commands I would use to do this from the terminal into a bash script but it failed to run.

Mind posting them here?
By 'desktop icon' you mean a .desktop file? I think the 'Exec' line must be in $PATH to work.

Offline

#6 2010-08-18 21:15:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Create wine launcher with thunar

skunktrader wrote:

You need to remember to escape all those backslashes

#!/bin/sh
wine "C:\\\\Program Files\\\\World Time\\\\WorldTime.exe"

I'm not sure about that, but IIRC you need to escape spaces.

Offline

#7 2010-08-18 21:17:38

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: [Solved] Create wine launcher with thunar

Backslashes do need to be escaped, but not when they are within quotes.

Offline

#8 2010-08-18 21:19:36

Dropsy
Member
Registered: 2010-08-16
Posts: 7

Re: [Solved] Create wine launcher with thunar

Thanks. It was the quotes I was missing. Knew it was something like that.

Offline

#9 2010-08-18 21:20:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Create wine launcher with thunar

bobdob wrote:

Backslashes do need to be escaped, but not when they are within quotes.

I just used bash tab-completion to get the correct path and pasted it into a .bashrc alias.

Offline

#10 2010-08-20 10:45:03

Vamp898
Member
From: 東京
Registered: 2009-01-03
Posts: 907
Website

Re: [Solved] Create wine launcher with thunar

skunktrader wrote:

You need to remember to escape all those backslashes

#!/bin/sh
wine "C:\\\\Program Files\\\\World Time\\\\WorldTime.exe"

No

either you do that

wine .wine/drive_c/Program\ Files/World\ Time/WorldTime.exe

or you do that

wine ".wine/drive_c/Program Files/World Time/WorldTime.exe"

or you do that

wine "C:\Program Files\World Time\WorldTime.exe"

As you see, if you use the "" you dont have to escape such stuff cause the BASH keeps it as a string and not as a path and just gives the string to the application.

Offline

Board footer

Powered by FluxBB