Savchenko Dmitriy's answer here explains how to get a Wine command shell in your Linux terminal. A problem with this solution is, however, that you are not working in the full wineprefix as configured in PlayOnLinux. You have, for example, no access to all the Windows drives you configured, and I don't know what else.
You can open a real Wine/Windows terminal, a command prompt it is named in Windows jargon, if I remember well, by using PlayOnLinux itself, which gives you the full wineprefix experience. For that, I configured a PlayOnLinux shortcut with as name "Win7x86PROGS console" to run in my wineprefix named "Win7x86PROGS" as follows:
#!/usr/bin/env playonlinux-bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/db-inf/.PlayOnLinux/wineprefix/Win7x86PROGS"
export WINEDEBUG="-all"
cd "/home/db-inf/.PlayOnLinux/wineprefix/Win7x86PROGS/drive_c/windows/command"
POL_Wine start.exe "$@"
The WINEPREFIX
path must be absolute (I am db-inf), the cd path can be ~/.PlayOnLinux/...
instead. The wine program start.exe
will try to open the file specified as "$@"
, according to Windows settings, or when "$@"
is empty or specifies a DOS or Windows CLI executable, it opens a console to execute that.
Thus, you can open the console in the wineprefix, and run for example your old McAfee virus scan, as follows:
$ playonlinux --run "Win7x86PROGS console" 'G:\PROGRAMS\McAfee\scan'
with Windows path and path-syntax (single quotes to retain the backslashes), or with Linux path (with the Windows G:-drive as configured in my wineprefix) as follows:
$ playonlinux --run "Win7x86PROGS console" "/opt/.win-gdrive/PROGRAMS/McAfee/scan.exe"
PlayOnLinux will convert the path to use the wineprefix's configured drives. Once the child program is finished, start.exe
will close the console. That can be a nuisance. The shell command cmd.exe
by itself would not open a Windows console, but you can use it to keep start.exe
's console open, like this:
$ playonlinux --run "Win7x86PROGS console" cmd /K "/opt/.win-gdrive/PROGRAMS/McAfee/scan.exe"
or in Windows style, where case does not matter and where you can omit the .exe
file extension:
$ playonlinux --run "Win7x86PROGS console" cmd /K 'G:\PROGRAMS\MACafee\sCaN'
It is cmd
's option /K
that will keep the console open.
I even configured a desktop file, associated with mime type application/x-ms-dos-executable
, to start Windows console programs from my Linux file manager.