1

I have installed bottles for Windows application emulation.

I am trying to start an application via command line but have not been able to start the application automatically. It opens up the bottle but the application does not start and it requires a manual start.

I would like to get this to work so I can create a systemd service which launches this app on system boot. OS is AlmaLinux 8.

Here's the variation of commands I have tried.

flatpak run com.usebottles.bottles -b NetSync -e 'C:\windows\system32\start.exe /wait C:\Program Files (x86)\BigNet\NetSync\NetSync.exe'
flatpak run com.usebottles.bottles -b NetSync -e 'C:\Program Files (x86)\BigNet\NetSync\NetSync.exe'
flatpak run com.usebottles.bottles -b NetSync -e '/home/rlee/.var/app/com.usebottles.bottles/data/bottles/bottles/NetSync/drive_c/Program Files (x86)/BigNet/NetSync/NetSync.exe'
flatpak run com.usebottles.bottles -b NetSync -e /home/rlee/.var/app/com.usebottles.bottles/data/bottles/bottles/NetSync/drive_c/Program\ Files\ \(x86\)/BigNet/NetSync/NetSync.exe
4
  • I'm not familiar with bottles; is that a graphical thing? And, in any case: How does your systemd service file look like, where do you place it and are you running it as user or system service? Commented Jul 6, 2023 at 10:04
  • Bottles is a Windows emulator. The command I run launches the bottles application and it opens the NetSync bottle. However, I need to manually press the "Play" button to run the actual NetSync application. Once I can get this to run automatically via command, then next step is to configure it as a systemd service. Commented Jul 6, 2023 at 10:31
  • ok, but this means bottles is a graphical application, right? Because that would suggest the whole approach is a dead end.- Commented Jul 6, 2023 at 10:40
  • 1
    I run it in VNC. In the [Unit] section, I set After=vncserver@:1.service. In [Service], environment is set as Environment="DISPLAY=:1". ExecStart starts a BASH script which executes flatpak run --command=bottles-cli com.usebottles.bottles run -b NetSync -p NetSync. App loads after system reboots. Commented Jul 6, 2023 at 16:01

1 Answer 1

4

A cursory glance at the bottles documentation (usebottles.com homepage top, "docs", CLI) suggests you should be running bottles-cli, instead of the graphical frontend.

So,

flatpak run --command=bottles-cli com.usebottles.bottles --help

points out you can run subcommands (instead of --help); especially, the run subcommand:

usage: bottles-cli run [-h] -b BOTTLE [-e EXECUTABLE] [-a ARGS] [-p PROGRAM]

optional arguments:
  -h, --help            show this help message and exit
  -b BOTTLE, --bottle BOTTLE
                        Bottle name
  -e EXECUTABLE, --executable EXECUTABLE
                        Path to the executable
  -a ARGS, --args ARGS  Arguments to pass to the executable
  -p PROGRAM, --program PROGRAM
                        Program to run
1
  • 1
    Works. I've opted for the shorter program instead of the executable flatpak run --command=bottles-cli com.usebottles.bottles run -b NetSync -p NetSync Commented Jul 6, 2023 at 15:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.