Reputation: 3702
I would like to run
wine myapp.exe
without displaying the GUI window.
myapp.exe
is a command-line application.
Is it possible?
Upvotes: 6
Views: 19797
Reputation: 897
You can redirect the gui to a virtual display server like xvfb
to hide the GUI window.
So, you can do the following:
Install xvfb
and possible dependencies:
sudo apt install xorg xvfb xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
Then, use wine
with xvfb-run
:
xvfb-run wine myapp.exe
For using just wine
command to do it, you can use alias:
alias wine='xvfb-run wine'
However aliases could not work in subprocesses, to make it permanent, you can create a script that named wine
in your /usr/local/bin
directory like this (/usr/bin/wine
is your actual wine
binary):
cd /usr/local/bin
sudo nano wine
#!/bin/bash
xvfb-run /usr/bin/wine "$@"
Then make the script executable:
sudo chmod +x wine
After this, every wine
command will be executed with xvfb-run
prefix and that means every wine
will work without gui.
Upvotes: 2
Reputation: 98991
Yes, it is.
Use the /nogui
switch, i.e.:
wine "myapp.exe /nogui"
If this doesn't work, you may be able to get it working by installing gdiplus extension for WINE.
Upvotes: 6