You are not logged in.

#1 2009-10-15 14:34:47

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

Adding a wine application to the menus

Hi,

I have successfully installed some games with wine, which work just fine, when I run them from command line. However I want to add them to the menus, so I can start them more easily. Therefore I've installed alacarte, and the basic usage of it should be clear.

Unfortunately it doesn't work as intended. When I just put something like

wine "C:\Program Files\Call of Duty\CoDSP.exe

it doesn't work due to the fact wine reads from the wrong folder, so the config and some mods aren't recognized. The trick is to change the dir before starting wine, which works just fine on console with the following comand:

env WINEPREFIX="/home/johnpatcher/.wine"; cd "/home/johnpatcher/.wine/drive_c/Program Files/Call of Duty"; wine "codsp"

But when I add this command as command in the menus, it doesn't work. Is there a way how I can find out what is wrong, or could you tell me what I have to change in order to start an wine application from the menu?

Best regards
johnpatcher

Offline

#2 2009-10-15 15:21:17

skualito
Member
Registered: 2008-11-19
Posts: 203

Re: Adding a wine application to the menus

What about creating a desktop entry for it ?
for example copy the following into /usr/share/applications/CallOfDuty.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=CallOfDuty
Icon=/PATH/OF/A/PNG
Exec=/home/johnpatcher/bin/callOfDuty
Terminal=false
Type=Application
Categories=Application;Game;

and create ~/bin/callOfDuty with the following:

#!/bin/sh
cd /home/jonhpatcher/.wine/drive_c/Program\ Files/Call\ of\ Duty/
/usr/bin/wine CoDSP.exe

chmod +x the script.

I guess it should work...

Offline

#3 2009-10-15 18:26:53

cahr_g
Member
Registered: 2009-09-24
Posts: 35

Re: Adding a wine application to the menus

use:

wine "/linux/path/to/the/program/file.exe"

linux does not understand C:\...

Offline

#4 2009-10-15 18:47:21

skualito
Member
Registered: 2008-11-19
Posts: 203

Re: Adding a wine application to the menus

cahr_g wrote:

use:

wine "/linux/path/to/the/program/file.exe"

linux does not understand C:\...

I think it's more about finding a way to start wine from the game directory , and linux might not understand "C:\" but wine does.
Try starting a wine app from the commandline with wine "C:\Path To The Program\Program.exe" and you'll see it works.

Offline

#5 2009-10-15 19:18:27

cahr_g
Member
Registered: 2009-09-24
Posts: 35

Re: Adding a wine application to the menus

oh, stupid me, sorry big_smile

how about adding to the menu:

bash -c "cd '/home/user/.wine/drive_c/Program Files/Adobe/Adobe Photoshop CS2'; wine 'Photoshop.exe'"

replace the path
works for me, but I dont if will work for COD

Last edited by cahr_g (2009-10-15 19:25:12)

Offline

#6 2009-10-15 20:42:44

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Adding a wine application to the menus

Have you checked out ~/.local/share/applications/wine/Programs yet?


Knute

Offline

#7 2009-10-17 12:23:06

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

Re: Adding a wine application to the menus

Thanks for all the answers, I think the way to go is the one from Knute. But could you tell me how I make entries in this folder visible? I have put some desktop files in there (which work just fine, when I start them), but when I put them in /home/johnpatcher/share/application/wine/Programs/Call of Duty I can't see them in my wine start menu? Is there any trick for that?

Offline

#8 2009-10-17 13:07:19

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Adding a wine application to the menus

Since you don't say what wm/de you are using, I would guess that in general, you have alacarte look in that directory for the desktop files, but that's just a general guess.   A more specific answer could be given if we knew more of your setup.


Knute

Offline

#9 2009-10-17 13:50:03

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

Re: Adding a wine application to the menus

I'm using Gnome (2.28) and have alacarte installed for editing the menus. I think I figured it out, thanks for your advise.

Offline

#10 2009-10-17 14:13:02

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Adding a wine application to the menus

You're welcome.


Knute

Offline

Board footer

Powered by FluxBB