Results 1 to 4 of 4

Thread: Launcher points to the wrong folder?

  1. #1
    Join Date
    Jul 2007
    Beans
    142

    [SOLVED] Launcher points to the wrong folder?

    I set up a launcher icon to run a Windows program I use a lot. I did it with unity-launcher-editor before upgrading from 11.04 to 11.10. But it has this problem: the file is run, but the "working folder" for the program is my home folder instead of the application's folder.

    The application resides in /home/myname/path/to/app/ and creates and uses some config files; if I run it from Nautilus (or the terminal) it uses the config files in its own folder; while if I run it from the unity launcher, it creates and uses new config files in /home/myname/.
    This of course doesn't work - I don't want to have two differing sets of settings. How can I tell the launcher to point to the right folder? I used a command like this: "wine /home/myname/path/to/app/application.exe"

    Thanks,
    Cristian
    Last edited by Quaxo76; November 9th, 2011 at 03:14 PM. Reason: Marked as "solved"

  2. #2
    Join Date
    Jul 2007
    Beans
    142

    Re: Launcher points to the wrong folder?

    *Bump* Anyone?

  3. #3
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Launcher points to the wrong folder?

    Create a simple script that moves you to correct location before launching the program, and then point the launcher to that script.

    Code:
    #! /bin/sh
    cd /home/myname/path/to/app/
    wine application.exe
    (remember to make the script executable, of course)

    edit: Actually, there's a better way. You should use "wine start" in the launcher to start programs with a path. It will automatically set the working directory:
    Code:
    wine start 'C:\path\to\application.exe'
    or using Unix-style path:
    Code:
    wine start /Unix "$HOME/path/to/app/application.exe"
    http://wiki.winehq.org/FAQ#head-3b29...01a2b8edc21619
    Last edited by mcduck; November 9th, 2011 at 08:20 AM.

  4. #4
    Join Date
    Jul 2007
    Beans
    142

    Re: Launcher points to the wrong folder?

    Quote Originally Posted by mcduck View Post
    or using Unix-style path:
    Code:
    wine start /Unix "$HOME/path/to/app/application.exe"

    That worked, thank you! It now opens a terminal before opening the application, but I can live with that.

    Cristian

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
  •