Find the answer to your Linux question:
Results 1 to 3 of 3
Hey guys I am a noob to Linux entirely (working on it through Vbox for the past couple of days!). We have a windows program that requires the use of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    4

    Windows program with target line how to work in Wine


    Hey guys I am a noob to Linux entirely (working on it through Vbox for the past couple of days!). We have a windows program that requires the use of target line commands to operate. I know that Wine for Linux allows the use of some windows programs. The problem i am running into is how in the world do i go about setting up the target command lines in the shortcut (Linux i guess calls it a "link") in order to get these commands to allow the program to open?

    I am using Mint 14 if anyone needs to know that. Be gentle i have been a windows user for years and its my first step into Linux.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,346
    Hi and welcome

    In linux, you would use a wrapper script like this:
    Code:
    #!/usr/bin/env sh
    
    echo "foo $@"
    $@ represents all arguments given to this wrapper, in case you need this.

    Instead of echo, you will want to use wine and your exe together with the parameters you need.
    The wrapper needs to be executeable (e.g. chmod 755 wrapper.sh) and potentially be in a $PATH directory.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Posts
    4
    Quote Originally Posted by Irithori View Post
    Hi and welcome

    In linux, you would use a wrapper script like this:
    Code:
    #!/usr/bin/env sh
    
    echo "foo $@"
    $@ represents all arguments given to this wrapper, in case you need this.

    Instead of echo, you will want to use wine and your exe together with the parameters you need.
    The wrapper needs to be executeable (e.g. chmod 755 wrapper.sh) and potentially be in a $PATH directory.
    Thanks for the information. At first i was looking at this like japanese writing but after a little while with playing with and looking up what a wrapper even is i finally was able to get it working. (Told you i was a serious noob) I have included my steps and wrapper script below in case anyone else needs it for future use.


    Step 1) Install Wine (for running windows applications/games/programs only)
    Step 2) Install the windows program you want to run under the .wine/drive_c directory
    Step 3) Create a document and give it a name "myfilename.sh" on your desktop
    Step 4) Edit the newly created document and paste the following code
    Code:
    #!/bin/bash
    cd
    cd .wine/drive_c/HOTEL
    wine wrun32.exe "$@" -w -c wruncbl.fil start 07
    Notes:
    Replace "/HOTEL" with the directory location of your application you want to run
    Wine is the program used to run windows programs/games/apps.
    Replace "wrun32.exe" with the windows .exe your wanting to run.
    Replace "-w -c wruncbl.fil start 07" with any command triggers with the ones you use in your windows target field in your windows shortcut.

    Step 5) Open your Terminal in Linux and type "sudo /home/USERNAMEHERE/Desktop/myfilename.sh

    This should execute the wrapper that forces wine to open the program with your target parameters.

    Thanks again to Irithori for helping me out with this. You put me on the right path!
    Last edited by kveldulv_halvard; 01-19-2013 at 06:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •