You are not logged in.

#1 2021-09-04 03:00:02

bohokash
Member
Registered: 2019-11-30
Posts: 76

How can I set a Wine environment variable with a bash command?

I have made a bash script, which starts a windows program by Wine. Unfortunately the windows program can't accept parameters, but can read environment variables. So I would like to set the wine environment variable in my bash script. How can I do that?

Offline

#2 2021-09-04 09:14:54

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: How can I set a Wine environment variable with a bash command?


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#3 2021-09-04 09:31:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,289

Offline

#4 2021-09-04 13:23:01

Flemur
Member
Registered: 2012-05-24
Posts: 72

Re: How can I set a Wine environment variable with a bash command?

Function winepath might help, it converts /a/linux/path to D:\a\windows\path; e.g. to make irfan-view act like a linux program with "Open [a .jpg file] with" in a file-browser, or command-line like:
$ iview filename.jpg

cat ~/bin/iview

#!/bin/sh

PAR=`winepath -w "$*"`

LOC=~/.wine/drive_c/pgms/IrfanView/i_view32.exe

wine "$LOC" "$PAR" 

exit 0

"If you do not change direction, you may end up where you are heading." -- L.T.

Offline

Board footer

Powered by FluxBB