Loading Wine from Terminal

Questions about applications and software
Forum rules
Before you post please read this

Loading Wine from Terminal

Postby tcotariu on Tue May 07, 2013 5:58 pm

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
tcotariu
Level 1
Level 1
 
Posts: 16
Joined: Fri Jul 20, 2012 3:06 pm

Linux Mint is funded by ads and donations.
 

Re: Loading Wine from Terminal

Postby karlchen on Tue May 07, 2013 6:24 pm

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
Endless legions of bigoted, brutal, bloodthirsty Orcs from the dark land of Mordor are bringing desolation, despair and death to the poor inhabitants of the Middle East. [1]
User avatar
karlchen
Level 10
Level 10
 
Posts: 3121
Joined: Sat Dec 31, 2011 7:21 am


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 15 guests