Loading Wine from Terminal

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tcotariu
Level 1
Level 1
Posts: 22
Joined: Fri Jul 20, 2012 3:06 pm

Loading Wine from Terminal

Post by tcotariu »

Loading Wine from Terminal

If this has already been asked, I am sorry. I could not find anything on it.

I am looking for a command line for running programs under wine. The one I am specifically trying to get going right now is Putty. Yes, there is a version of Putty that runs natively under Linux, and I have it, but it has problems with copy and paste. I also know that I can right click on putty.exe and tell it to Open With the Wine Windows Program Launcher. This works fine, but I can not use any command line parameters when I start it that way.

What I really want is to start Putty with the following script line (this is what I do for the Linux version, but it has problems with copy and paste).

(putty -ssh $1 -l manager -pw $2 &)

This will allow me to use command line arguments for the IP Address and password for the device that I am connecting to via SSH. If I was just connecting to one, or even two, devices I would be happy to open it by right clicking on putty.exe and telling it to Open With the Wine Windows Program Launcher. However, I typically have to go in and out of several, sometimes as many as 20+, devices in each session and this allows me to quickly do an up-arrow within the terminal and just change the IP Address for each successive device. Much quicker, and easier, than opening the Putty Configuration page and entering in everything manually for each device I connect to.

Anyway, I have been unsuccessful finding anything on this here, or at winehq.org, and I was hoping that somebody might be able to point me in the right direction.

Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18178
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Loading Wine from Terminal

Post by karlchen »

Hello, tcotariu.

Irrespective of the question what may be wrong with using gnome-terminal on Linux Mint, I suggest this approach to achieve your goal:

Assumptions:
(to make explaining easier)
+ your Wine folder is /home/tcotariu/.wine
+ among other things it holds the folders dosdevices and drive_c
+ the Windows Putty software has been installed in the folder /home/tcotariu/.wine/drive_c/Program\ Files/Putty

Suggested script:
In order to pass the parameters $1 and $2 on the commandline in an easy and convenient way I suggest to create a short shell script wputty.sh

Code: Select all

#!/bin/bash
if [ "$2" = "" ]
then
    echo "Usage: `basename $0` arg1 arg2. - Try again, please."
    exit 1
fi
wine "/home/tcotariu/.wine/drive_c/Program Files/Putty/putty.exe" -ssh $1 -l manager -pw $2
Suggested commandline:

Code: Select all

/path/to/wputty.sh arg1 arg2
where you replace "arg1" and "arg2" by the appropriate strings.

HTH,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Locked

Return to “Software & Applications”