RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Wine Explorer and Wine command line

    Scheduled Pinned Locked Moved Help and Support
    winewine explorerwine librairiesshader
    15 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nash @mth75
      last edited by Nash

      @mth75 Thank you, I will investigate.

      I see Unreal Tournament 99 on a screen in your gamelist. Do you run the native linux bin or the exe ? I have a strange problem when starting the linux bin :

      https://retropie.org.uk/forum/topic/35433/xboxdrv-or-xinit-problem/2

      M 1 Reply Last reply Reply Quote 0
      • M
        mth75 @Nash
        last edited by

        @Nash I'm using the Windows (exe) version.

        1 Reply Last reply Reply Quote 0
        • N
          Nash @mth75
          last edited by

          @mth75 Interesting but I don't find the answer to my question : How to launch a game with wine command with the same configuration of wine Explorer ?

          Somes games works when launched in Wine Explorer but they don't work any other way.

          ectoE 1 Reply Last reply Reply Quote 0
          • ectoE
            ecto @Nash
            last edited by

            @Nash iirc it's: wine explorer /desktop=shell,1920x1080 game.exe.
            I don't know if you always need the resolution, but some games might need a specific desktop resolution.
            You have to set the same resolution in the runcommand menu.

            N 1 Reply Last reply Reply Quote 0
            • N
              Nash @ecto
              last edited by Nash

              @ecto Not working. Error box "UNKNOWN_STRING" when launch Trials2SE with this command line and same resolution in runcommand. But the game start in wine explorer.

              Same thing with Castle Crashers, error box about shaders but run in wine explorer.

              Today it is on Pi5, Bookworm 64bit, RetroPie 4.8.9, Wine 9.17 installed with pi-apps.

              ectoE 1 Reply Last reply Reply Quote 0
              • ectoE
                ecto @Nash
                last edited by

                @Nash Can you post your command line for this game, please?

                N 1 Reply Last reply Reply Quote 0
                • N
                  Nash @ecto
                  last edited by

                  @ecto

                  emulators.cfg

                  trial2se = "XINIT-WM: wine explorer /desktop=shell,1280x720 '/home/pi/RetroPie/roms/ports/Trials 2 Second Edition/trials2.exe'"
                  
                  default = "trial2se"
                  
                  ectoE 1 Reply Last reply Reply Quote 0
                  • ectoE
                    ecto @Nash
                    last edited by

                    @Nash Thanks! My first guess would be that your wine executable is not set in your path.
                    So either you add the path to your wine executable to the $PATH variable or you put the path in front of the wine command like this:

                    trial2se = "XINIT-WM: /path/to/wine explorer /desktop=shell,1280x720 '/home/pi/RetroPie/roms/ports/Trials 2 Second Edition/trials2.exe'"
                    
                    N 1 Reply Last reply Reply Quote 0
                    • N
                      Nash @ecto
                      last edited by Nash

                      @ecto Same errors with :

                      trial2se = "XINIT-WM: /opt/wine-9.17/bin/wine explorer /desktop=shell,1280x720 '/home/pi/RetroPie/roms/ports/Trials 2 Second Edition/trials2.exe'"
                      

                      Maybe some specific libs of wine explorer are not loaded, or have no time to be loaded before game ? Can I add timer just before gamepath in the command line ?

                      EDIT : I found a solution that I accidentally discovered while debugging another game that required Windows arguments. I launch a .cmd with wine :

                      emulators.cfg :

                      trial2se = "XINIT-WM: wine '/home/pi/RetroPie/roms/ports/Trials2se/trials2se.cmd'"
                      

                      Here the trials2se.cmd :

                      cd RetroPie/roms/ports/Trials2se
                      start trials2.exe
                      

                      Like this, not starting.

                      But if I add "@pause" for debugging like this :

                      cd RetroPie/roms/ports/Trials2se
                      start trials2.exe
                      @pause
                      

                      It's working, game start without error. But I don't understand why. And Wine does not close when I quit game, propably because of the @pause. But, strangely, I can quit and return to EmulationStation with the key ² (on azerty keyboard, under escape)

                      Same problem, same successful "@pause solution" with Castle Crashers and Team Fortress 2 (on Pi5, Bookworm Lite 64bit, RetroPie 4.8.9, Wine 9.17).

                      Does anyone understand what's going on ? lol

                      1 Reply Last reply Reply Quote 1
                      • N
                        Nash
                        last edited by Nash

                        I found something. Halo launched with wine command give me an error "file not found in /home/pi/". Like others games, Halo start with the .cmd trick.

                        Looks like some games launched with wine command thinks there are not in there directory but in /home/pi. It works with Wine Explorer and cmd trick because they give good "path environement" to the game.

                        Is there a way to force wine command to do the same thing ?

                        ectoE 1 Reply Last reply Reply Quote 0
                        • ectoE
                          ecto @Nash
                          last edited by

                          @Nash In fact I'm basically using shell scripts to start my wine games. In there I first change into the game's executable directory, and then start wine just with the executable. Something like this:

                          #!/bin/bash
                          cd "/home/pi/RetroPie/roms/ports/Trials 2 Second Edition"
                          /opt/wine-9.17/bin/wine explorer /desktop=shell,1280x720 trials2.exe
                          

                          What I do is a little more complicated than this, but basically that's what happens. The shell script is then the "game that's started by runcommand.sh

                          N 2 Replies Last reply Reply Quote 0
                          • N
                            Nash @ecto
                            last edited by Nash

                            @ecto This is how I did on Pi4 when I created this topic. Now I use runcommand to simplify display management. I will retry with your example.

                            1 Reply Last reply Reply Quote 0
                            • N
                              Nash @ecto
                              last edited by Nash

                              @ecto

                              xinit: unable to connect to X server: Connection refused

                              I failed to debug this on Pi5. That's why I use runcommand now. Can you show me how do you initialize display in your shell script please ?

                              EDIT : Ok, I just understand that you run your script with runcommand. I tried this, but not starting.

                              RE-EDIT : Ok it's working, somes stupid errors from me. Thank you for your help !

                              This is working too :

                              #!/bin/bash
                              cd "/home/pi/RetroPie/roms/ports/Trials 2 Second Edition"
                              wine trials2.exe
                              
                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post

                              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.