Good day, I wonder if this is even possible...
I need to run a windows application on linux at boot up, The application run very well if I start it manually, but really need to be able to start it up at boot up, since the Linux Box will be on a remote site, not easyly accessable.
Thanks and Happy Ney Year.
Jean
Run a Windows app on Linux with Wine at boot up
Re: Run a Windows app on Linux with Wine at boot up
This depends on whether you want to start the Windows program as a service or at a user login.
As a service create a systemd service file.
For the user, see the example at:
viewtopic.php?p=142246#p142246
As a service create a systemd service file.
For the user, see the example at:
viewtopic.php?p=142246#p142246
Re: Run a Windows app on Linux with Wine at boot up
I like to run it as a service,
I tried few thing, but dosen't work,
get this error: nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
I am missing something.
this is my vara.service file
[Unit]
Description=Run VARA - Wine application
[Service]
ExecStart=/usr/bin/wine start /unix "/home/ve2pkt/.wine/drive_c/VARA FM/VARAFM.exe"
[Install]
Alias=vara.service
I tried few thing, but dosen't work,
get this error: nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
I am missing something.
this is my vara.service file
[Unit]
Description=Run VARA - Wine application
[Service]
ExecStart=/usr/bin/wine start /unix "/home/ve2pkt/.wine/drive_c/VARA FM/VARAFM.exe"
[Install]
Alias=vara.service
Re: Run a Windows app on Linux with Wine at boot up
Systemd does not know about a display until a user is logged in. In other words, you can't run a graphical program as a system wide service.
Move the vara.service file to the ~/.local/share/systemd/user/ directory.
(Create the systemd and user directory if they do not exist.)
And modify the file to something like:
Test and enable the service file:
Move the vara.service file to the ~/.local/share/systemd/user/ directory.
(Create the systemd and user directory if they do not exist.)
And modify the file to something like:
Code: Select all
[Unit]
Description=Vara FM - Wine application
[Service]
Type=forking
ExecStart=/usr/bin/wine start /unix "/home/ve2pkt/.wine/drive_c/VARA FM/VARAFM.exe"
ExecStop=/usr/bin/wineserver -k
[Install]
WantedBy=graphical-session.target
Code: Select all
systemctl --user start vara
systemctl --user stop vara
systemctl --user enable vara
Re: Run a Windows app on Linux with Wine at boot up
Thanks for the info's
I did all that but get thiserror:
ve2pkt@VE2PKT-NucBox-G3:/usr/local/bin/packet/linbpq$ cd ~/.local/systemd/user/
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$ ls
vara.service
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$ systemctl --user start vara
Failed to start vara.service: Unit vara.service not found.
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$
did a lot of reading on systemctrl, all seen OK for my, since a a Newbe at that stuff.
Thanks, I will keep digging.
I did all that but get thiserror:
ve2pkt@VE2PKT-NucBox-G3:/usr/local/bin/packet/linbpq$ cd ~/.local/systemd/user/
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$ ls
vara.service
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$ systemctl --user start vara
Failed to start vara.service: Unit vara.service not found.
ve2pkt@VE2PKT-NucBox-G3:~/.local/systemd/user$
did a lot of reading on systemctrl, all seen OK for my, since a a Newbe at that stuff.
Thanks, I will keep digging.
Re: Run a Windows app on Linux with Wine at boot up
The exact location of the service file varies between Linux distributions. Probably a search engine can answer which location should be used for your distribution.
-
- Newbie
- Posts: 1
- Joined: Thu Feb 01, 2024 12:39 pm
Re: Run a Windows app on Linux with Wine at boot up
I'm in need of a solution that allows me to run a Windows application on Linux during the system's boot-up sequence. While the application functions seamlessly when initiated manually, the crux of the matter lies in automating its launch during boot-up. This is particularly crucial as the Linux box in question is located at a remote site, making regular manual intervention impractical.
If anyone has experience or expertise in configuring such setups, your guidance would be immensely appreciated. I'm open to exploring different avenues, whether it involves specific tools, scripts, or any other innovative approaches to ensure the smooth initiation of this Windows application on Linux at system startup. Thank you in advance for any assistance you can provide!
Thank you.
If anyone has experience or expertise in configuring such setups, your guidance would be immensely appreciated. I'm open to exploring different avenues, whether it involves specific tools, scripts, or any other innovative approaches to ensure the smooth initiation of this Windows application on Linux at system startup. Thank you in advance for any assistance you can provide!
Thank you.