adding a wine program to application menu

Tim Frost timfrost at xtra.co.nz
Thu Sep 23 07:13:56 UTC 2010


Tapas,

I have a couple of windows programs that I need to run at work on
occasion.


A windows shortcut has two key properties:
a: Directory to start in
b: The target, which is the command line to invoke.


Because each program needs to start in a specific directory, my solution
was:
1: create a shell script in my personal bin directory that mimics the
windows shortcut:
  a: switch to the correct directory to start in
  b: invoke wine with the required parameters to run the application

2: create a launcher on the panel that starts the shell script.


There are a couple of traps with the shell script:
- use UNIX path separators and escape characters in the cd command at
step (a):
   cd $HOME/.wine/drive_c/Program\ Files/App\ Name/lib
 or
   cd $HOME/.wine/drive_c/"Program Files"/"App Name"/lib

- the wine command line (b) uses DOS path separators:
  wine "C:\Program Files\App Name\app.exe" param1 ...

The above example assumes the default wine location for its C: drive,
and also assumes that the program is installed under the default
DOS/Windows directory "C:\Program Files".  The script needs to be
adjusted to match the actual paths if that assumption is incorrect.

On Thu, 2010-09-23 at 10:45 +0530, Tapas Mishra wrote:
> On Thu, Sep 23, 2010 at 10:37 AM, Vaibhav Dalvi <vaibhav.dlv at gmail.com> wrote:
> >
> > Hey,
> > The launcher he suggested is the desktop shortcut itself.
> I understand it is a desktop shortcut but I am looking in applications
> menu to add this.

If you invoke the menu editor (System->Preferences->Main Menu), you can
add a new item, of type application, to run the shell script that I
describe above.


> I most of the time have a lot of applications open and in that case
> for me switching to desktop shortcut is very painful minimizing each
> application.
> > And yes there
> > should be keybindings available for shortcuts but right now I'm on KUbuntu.


The Gnome menu editor doesn't appear to allow you to set key bindings at
all, unless it recognises a flag character such as  "_" before the
character that you want to be the shortcut key.


> > I'll try to get you exact proc when I get home at the end of this day(that's
> > about 7-8 hrs to that).
> >
> No problem I shall wait.
> 
> 
> 
> -- 
> Tapas
> 

Hope this helps


Tim

-- 
Tim Frost <timfrost at xtra.co.nz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100923/9aaa7bc6/attachment.sig>


More information about the ubuntu-users mailing list