xralf
xralf

Reputation: 3702

Running wine without displaying the GUI window

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

Answers (2)

Celuk
Celuk

Reputation: 897

You can redirect the gui to a virtual display server like xvfb to hide the GUI window.

Xvfb is an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.

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

Pedro Lobito
Pedro Lobito

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

Related Questions