Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:flatpak [2023/10/05 21:25] – Fix: Minor grammar mistakes. grandmabettysystems:flatpak [2023/12/24 02:56] (current) – Put the x86_64 warning in an alert box because it's currently invisible to users maximumentropy
Line 7: Line 7:
 [[https://flatpak.org/|Flatpak]] is a portable software packager for native Linux software deployment. It has been designed to offer a sandbox environment in which users can run applications in isolation from the rest of the system. This means that Flatpak software can run on virtually any Linux distribution... including Batocera. [[https://flatpak.org/|Flatpak]] is a portable software packager for native Linux software deployment. It has been designed to offer a sandbox environment in which users can run applications in isolation from the rest of the system. This means that Flatpak software can run on virtually any Linux distribution... including Batocera.
  
 +<WRAP center round alert>
 This is currently supported only for x86_64, as most Flatpak packages are only provided for Linux on the x86/x86_64 platform. This is currently supported only for x86_64, as most Flatpak packages are only provided for Linux on the x86/x86_64 platform.
 +</WRAP>
 +
  
 <WRAP center round help> <WRAP center round help>
Line 20: Line 23:
  
 <WRAP center round tip> <WRAP center round tip>
-[[systems:steam|Steam now has its own dedicated page!]]+[[systems:steam|Steam]], [[systems:heroic|Heroic]], [[systems:geforcenow|GeForce NOW]] and [[systems:bottles|Bottles]] have their own pages.
 </WRAP> </WRAP>
  
Line 159: Line 162:
  
 ===== Updating Flatpak packages ===== ===== Updating Flatpak packages =====
 +
 +<WRAP center round important>
 +Note: Flatpak is an isolated environment by default unless you are configuring it otherwise manually. Therefore you can always safely update any flatpak packages without having to worry your Batocera system will be affected in any way other than flatpak package installations. All packages appearing in the //flatpak-config// update list are only part of existing flatpak package installations on your system and will only affect those. However, keep in mind, that updating those packages //could// affect an existing flatpak package installation in a negative way but this is very unlikely. Generally said, it is safe for existing flatpak package installations to install any of those updates.
 +</WRAP>
  
 Updating Flatpak packages is simple: open ''flatpak-config'' and click **Upgrade**. All applicable packages will be updated to their latest version. You may be asked to reboot. Updating Flatpak packages is simple: open ''flatpak-config'' and click **Upgrade**. All applicable packages will be updated to their latest version. You may be asked to reboot.
Line 199: Line 206:
 flatpak uninstall --unused flatpak uninstall --unused
 </code> </code>
- 
-===== Heroic Games Launcher (Epic Games store) ===== 
- 
-[[https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher|Heroic Games Launcher]] is an open-source launcher available on Flathub which supports launching games from the Epic Games Store using [[https://github.com/derrod/legendary|Legendary]] and GOG Games. Unfortunately this launcher is not as fully integrated into Batocera as Steam is so some manual work is required. 
- 
-==== Install ===== 
- 
-<WRAP center round important> 
-If you already have the Heroic Launcher Flatpak package installed, it will conflict. [[#uninstalling_flatpaks|Uninstall it first.]] 
-</WRAP> 
- 
-Search for "Heroic Games Launcher" and install it. 
- 
-{{:systems:heroic_15.png?nolink&400|}} 
- 
-To do so from SSH: 
- 
-<code> 
-flatpak install com.heroicgameslauncher.hgl 
-batocera-flatpak-update 
-</code> 
- 
-==== Launch Heroic Games Launcher ==== 
- 
-The Heroic Games Launcher Flatpak is bugged and will not launch correctly using the default flags. You **must** launch via SSH using the following command: 
- 
-<code> 
-flatpak run com.heroicgameslauncher.hgl --no-sandbox 
-</code> 
- 
-{{:systems:heroic_16.png?nolink&400|}} 
- 
-<WRAP center round help> 
-This may be worked around in the future. As alternative you can create a .sh launcher at ports system: [[systems:flatpak#my_flatpaks_including_steam_won_t_launch|add launcher at ports section]] 
-</WRAP> 
- 
-==== Login ==== 
- 
-Heroic Games Launcher will offer two services to login to. Log in to the appropriate one (or select **Manage Accounts**): 
- 
-{{:systems:heroic_01.png?540|}} 
- 
-<WRAP center round tip> 
-As alternative for Epic Store login, the External Login is available, this way you have to inform your Epic Store Account [[https://www.epicgames.com/help/en-US/epic-accounts-c74/general-support-c79/what-is-an-epic-account-id-and-where-can-i-find-it-a3659|SID]] to log in properly. 
-</WRAP> 
- 
-<WRAP center round help> 
-If the log in fails, press the reload symbol at the top of the launcher window to try again. 
- 
-{{:systems:heroic_13.png?540|}} 
-</WRAP> 
- 
-Your games will appear in the **Library** split between **Epic Games** and **GOG**. It could take a while to download all games' information and boxart. 
- 
-{{:systems:heroic_04.png?540|}} 
- 
-==== Download Game ==== 
- 
-  - Go to **Library** 
-  - Select the game 
-  - Select **Install** 
- 
-{{:systems:heroic_04.png?540|}} {{:systems:heroic_05.png?540|}} {{:systems:heroic_06.png?540|}} {{:systems:heroic_07.png?540|}} {{:systems:heroic_08.png?540|}} 
- 
-<WRAP center round tip> 
-[[#wine_install_for_windows_games|Windows games will need to have their intended version of WINE selected.]] 
- 
-{{:systems:heroic_12.png?460|}} {{:systems:heroic_14.png?380|}} 
-</WRAP> 
- 
-==== Install Wine (for Windows games) ==== 
- 
-  - Select **Wine Manager** 
-  - Select the desired version of Wine to be downloaded. In order of recommendation: "Wine-GE", "Wine-Lutris" and "Proton-GE", the rest are older versions (some games do not work with the latest versions) 
- 
-{{:systems:heroic_03.png?540|}} 
- 
-=== Global Wine setting === 
- 
-  - Go to **Settings** -> **Wine** -> **Wine Version** and select the desired version of Wine. 
- 
-{{:systems:heroic_10.png?540|}} 
- 
-=== Per game Wine setting === 
- 
-  - Go to **Library** 
-  - Select the downloaded Windows game 
-  - Go to **Settings** 
-  - Select the desired version of Wine to use for that game. 
- 
-{{:systems:heroic_08.png?540|}} 
-{{:systems:heroic_09.png?540|}} 
- 
-==== Launch game ==== 
- 
-  - Go to **Library** 
-  - Select a [[#download_game|downloaded]] game 
-  - Select **PLAY NOW** ([[#wine_install_for_windows_games|Windows games require Wine to be set up first]]) 
-    * Heroic Games Launcher will say "Opening the Game..." and then eventually "Playing (STOP)" <WRAP center round important> 
-Games may take a while to initially launch as they need to compile shaders for your hardware. 
-</WRAP> 
-  - If playing a Windows game, confirm the Wine installation dialogue box. 
-  - Game start! 
- 
-{{:systems:heroic_08.png?540|}} {{:systems:heroic_11.png?500|}} 
- 
-<WRAP center round info> 
-Right now, Batocera isn't integrated to Heroic Games Launcher; its games will not be automatically added and launchable with EmulationStation like Steam does. This may change in the future. 
-</WRAP> 
- 
-=== Uninstall a game === 
- 
-  - Go to **Library** 
-  - Select an installed game 
-  - Select **Tools** at the top of the window 
-  - Select **Uninstall** 
- 
-=== Other option === 
- 
-Other options can be found in **Settings** -> **Other**. 
- 
-{{:systems:heroic_17.png?400|}} 
- 
-===== GeForce NOW Electron ===== 
- 
-[[https://flathub.org/apps/details/io.github.hmlendea.geforcenow-electron|GeForce NOW Electron]] is an unofficial open-source launcher available on Flathub which supports launching games for the GeForce NOW streaming service. Unfortunately this launcher is not as fully integrated into Batocera as Steam is so some manual work is required. 
- 
-==== Install ===== 
- 
-Search for "GeForce NOW Electron" and install it. 
- 
-{{:systems:geforce_now_electron_01.png?nolink&400|}} 
- 
-To do so from SSH: 
- 
-<code> 
-flatpak install flathub io.github.hmlendea.geforcenow-electron 
-batocera-flatpak-update 
-</code> 
- 
-==== Launch GeForce NOW Electron ==== 
- 
-The GeForce NOW Electron Flatpak is bugged and will not launch correctly using the default flags. You **must** launch via SSH using the following command: 
- 
-<code> 
-flatpak run io.github.hmlendea.geforcenow-electron --no-sandbox 
-</code> 
- 
-<WRAP center round help> 
-This may be worked around in the future. As alternative you can create a .sh launcher at ports system: [[#my_flatpaks_including_steam_won_t_launch|add launcher at ports section]] 
-</WRAP> 
- 
-==== Login ==== 
- 
-GeForce NOW Electron offers many ways to log in, but the only one that works for now is the E-mail and password login. Make sure to log in using the regular GeForce NOW with only your E-mail and password. 
- 
-    - So, create a [[https://abya.gfn.la/en-US/account|ABYA account]] with your E-mail and password. 
-    - And log in to GeForce NOW Electron with an ABYA account with the E-mail and password options. 
- 
-==== Play Games ==== 
- 
-To play games on GeForce NOW, you can syn your Steam, Epic Store and Ubisoft stores. 
-{{:systems:geforce_now_electron_06.png?nolink&400|}} 
-   - Goes to Settings and sync your accounts 
-   - Select the game into Library and select to PLAY it. {{:systems:geforce_now_electron_02.png?nolink&400|}} 
-     - **PAID plan**s: You will play as soon as possible. 
-     - **FREE plans**: you will be waiting in a line to be able to play the game and for a couple of minutes when ready (around 20 minutes) [So, do not quit game until time ends, otherwise the game's session will shutdown before that!]. Also do not schedule a game you don't have on your library, e.g. The Witcher 3 has it's versions for Steam, Gog and Epic Store, if you have it on Steam but opens the Epic Store version, you can't play the game! This way, you will have to finish your game section, and open the correct version and wait again in line.  
-   - After you get access to the GeforceNOW virtual machine, you will be pop up with the game's store application, log in into, download the game, and play, just as a regular Steam, Epic Store or Ubisoft softwares. {{:systems:geforce_now_electron_03.png?nolink&400|}} 
-   - It supports Gamepad, even if the tools indicate it have no controller connected to it (just make sure the game you selected has support, or play it with a mouse/keyboard plug-in). 
  
 ===== Freely distributed games ===== ===== Freely distributed games =====
Line 427: Line 265:
 For further troubleshooting, refer to the [[:support|generic support pages]]. For further troubleshooting, refer to the [[:support|generic support pages]].
  
-===== Bottles ===== 
- 
-//[[https://usebottles.com/|Bottles]]// is a virtual application/gaming platform for setting up preconfigured environments to support a large set of Windows applications/games on Linux. In other words: //Bottles// gives you the possibility to run almost any Windows application/game on Linux with currently much better compatibility than Batocera's [[systems:windows|native WINE implementation]]. Chances are high that you will be able to run any Windows game not running on the native Batocera WINE implementation. Nevertheless, be aware that //Bottles// is not officially supported by Batocera developers, which means in case of problems you "only" have the unofficial troubleshooting support of the Batocera community (mostly via [[https://discord.com/invite/ndyUKA5|Discord]]). 
- 
-==== Installation ==== 
- 
-On the Batocera main menu press ''Alt+F1'' on your keyboard, then navigate to ''Applications'' → ''flatpak-config'' (if a warning message appears, just confirm by clicking ''OK''). Then, in the searchbar on the top of the screen, search for //Bottles// and install the //Bottles// application by clicking on ''Install'': 
-[{{:systems:bottles_01.png?400|"Bottles" installation}}] 
-Confirm by clicking on ''Yes'' and wait for the installation process to be finished (click on ''Show details'' if you want to check the installation progress, which can take a couple of minutes). 
-As soon as the Installation process has finished, click on ''Close'', then click on ''File'' → ''Close Window''. Now, back on the Batocera main screen, update the gamelist. //Bottles// application should now be available in the ''Ports'' section. If so, you have already successfully installed //Bottles// on your Batocera system! 
- 
-==== Preparing the Bottles environment ==== 
- 
-To keep things abstracted it is recommended to create a new gaming system folder ''/userdata/roms/bottles'' which holds all Windows game data source folders you want to play (you could also keep all your Windows games inside the ''/userdata/roms/windows'' folder if you want to keep things together and be able to use //Bottles// and Batocera's native WINE implementation in parallel for any of your Windows games). To do so launch a [[:access_the_batocera_via_ssh|SSH/Xterm]] session and execute the following command: 
-<code>mkdir -p /userdata/roms/bottles</code> 
-The according ''/userdata/roms/bottles'' folder has now being created. Now you have to make sure that //Bottles// has access to the ''/userdata'' folder and all of its subfolders because it obviously needs access to the according game files. Do so by executing the following command: 
-<code>flatpak override com.usebottles.bottles --filesystem=/userdata</code> 
- 
-==== Setting up a game (example) ==== 
- 
-The following example will cover the game [[https://store.steampowered.com/app/2022910/Twin_Cobra/|Twin Cobra]]: \\ First of all, [[:add_games_bios|copy]] the game's main source data folder to ''/userdata/roms/bottles''. Then start //Bottles// via the Batocera ''Ports'' system section: 
-[{{:systems:bottles_02.png?200|Start "Bottles"}}] 
-Navigate through the initial //Welcome to Bottles// screen (don't close it!). Then, on the according last screen, confirm by clicking on the ''Continue'' button and then on ''Start using Bottles'' (the initial setup can take a couple of minutes, this step only has to be done once after a fresh //Bottles// installation). 
-First of all, additionally to the bottle runners already installed by default, you should add the most common and most compatible one(s) as follows: 
-From the //Bottles// main menu click on the "Hamburger" icon: 
-[{{:systems:bottles_03.png?300|"Hamburger" icon}}] 
-Click on ''Preferences'' and navigate to ''Runners''. From there click on ''Proton GE'' which opens a dropdown menu. Select the most recent one from the top of the list (currently ''ge-proton8-16'') by clicking on the download icon (''Download & Install''): 
-[{{:systems:bottles_04.png?400|Install additional runner(s)}}] 
-It can take a couple of minutes for an additional runner to install, just wait for it to finish installing. 
-Now close the ''Runners'' window which brings you back to the main //Bottles// menu.  
-From there, on the left upper corner, create a new bottle by clicking on the ''+'' symbol: 
-[{{:systems:bottles_05.png?300|Create a new bottle}}] 
-In the ''Name'' input field give the bottle a meaningful custom name by inserting the game's name (''TwinCobra'' in this case). For the ''Environment'' section select the ''Gaming'' radio button (which will set up an optimized gaming environment bottle automatically) and then click on ''Create'' (don't worry, you can change the according runner later): 
-[{{:systems:bottles_06.png?300|Initial bottle settings}}] 
-Wait for the bottle to be set up which can take a couple of minutes. 
-Confirm the success message by clicking on ''Close''. 
-Navigate to ''Bottles'' on the top register card menu. From there you can see all available bottle(s) you have created, in this case the one you have just created: 
-[{{:systems:bottles_07.png?500|Bottle}}] 
-Click on the bottle, which will open up the bottle's settings menu. 
-From there you can do a lot of stuff to customize the according bottle. We will only cover the most common settings here as every game potentially needs its own settings to run successfully and optimized. 
-First of all let's take on look on how you can change the according bottle runner: 
-Click on ''Runner'' and from the appearing dropdown menu select the according //ge-proton// runner you have just installed previously (Sidenote: This is just an example on how to install/change a bottle runner. For the specific game //Twin Cobra// leave the runner on ''soda'' as ''ge-proton'' will currently not work for //Twin Cobra//!): 
-[{{:systems:bottles_08.png?400|ge-proton runner}}] 
-Wait for the runner to be changed which can take a couple of seconds. 
-Scroll down to the ''Compatibility'' section and click on ''Working Directory''. From the newly opened window click on ''+ Other Locations'' and navigate to the according game's main folder, then click on ''Open'': 
-[{{:systems:bottles_09.png?400|Working directory}}] 
-Now scroll up to the top and on the top left corner click on the back arrow symbol (''Go Back''), which brings you back to the main bottle screen. From there click on ''Add Shortcuts...'', navigate to your game's main folder where the according game's executable file (''<myGame>.exe'') is located, highlight the according game's executable file and click on ''Add'': 
-[{{:systems:bottles_10.png?400|Executable (.exe) file}}] 
-Now, for later automation reasons, you have to remember two things: 
-  * There is the bottle's unique **main name** being shown on top of the main bottle menu screen. 
-  * There is the bottle's unique **executable name** being shown under the ''Programs'' section (This is due to you can have multiple executables per bottle which in theory gives you the possibility to install multiple games within a single bottle, but for abstraction and compatibility/dependency reasons it is strongly recommended to set up an unique bottle per game (you have been warned!).): 
-[{{:systems:bottles_11.png?400|Bottle's name and game's executable name}}] 
-Keeping the bottle's name and the game's executable name in mind, let's now do the automation part which lets you start the bottle's according executable with just a single click like usually in every other gaming system in Batocera: 
-Via [[:access_the_batocera_via_ssh|SSH/Xterm]] create an according start script file by executing the following command: 
-<code>nano /userdata/roms/bottles/<myGame>.sh</code> 
-Paste the following content (adjust the according ''<myBottleMainName>'' and ''<myBottleExecutableName>'' variables with the according values according to your setup: 
-<code> 
-#!/bin/bash 
-killall -9 bottles 
-chown -R root:audio /var/run/pulse 
-chmod -R g+rwX /var/run/pulse 
-su - batocera -c "DISPLAY=:0.0 flatpak run --command=bottles-cli com.usebottles.bottles run -b '<myBottleMainName>' -p '<myBottleExecutableName>'" 
-</code> 
-Here's an example for the game ''Twin Cobra'': 
-[{{:systems:bottles_12.png|Start script example}}] 
-Save the file and quit the editor. 
-Now make the according start script executable by executing the following command (replace ''<myGame>'' with the according game name (avoid spaces if possible)): 
-<code>chmod +x /userdata/roms/bottles/<myGame>.sh</code> 
-Now symlink the according start script to your ''/userdata/roms/ports'' folder by executing the following command (replace ''<myGame>'' with the according game name (avoid spaces if possible)): 
-<code>ln -s /userdata/roms/bottles/<myGame>.sh /userdata/roms/ports/<myGame>.sh</code> 
-Now, from the Batocera main screen, update the gamelist. The according game's start script you've just created should now appear in the ''Ports'' system section: 
-[{{:systems:bottles_13.png?400|Ports}}] 
-You can now start the according game like every other game in Batocera. 
- 
-**Optional:** Feel free to add the according ''/userdata/roms/bottles/videos'' and ''/userdata/roms/bottles/images'' folders manually via [[:access_the_batocera_via_ssh|SSH/Xterm]] to add the according media data per game afterwards. You can create those folders by executing the following command: 
-<code>mkdir -p /userdata/roms/bottles/videos /userdata/roms/bottles/images</code> 
- 
-**Optional:** If for the future you want to keep in mind which games are set up by //Bottles//, you can add a ''[Bottles]'' tag to the according games by renaming them via ES as follows: \\ Highlight the according game → long-press the "Enter" key on the keyboard → Select ''EDIT THIS GAME'S METADATA'' → Select ''Name'' → Add a ''[Bottles]'' tag to the game's name: 
- [{{:systems:bottles_15.png?400|"[Bottles]" tag}}] 
-This way the according games will appear with an additional ''[Bottles]'' tag on the ''Ports'' section: 
-[{{:systems:bottles_16.png?300|"[Bottles]" tag}}] 
- 
-==== Troubleshooting ==== 
- 
-=== Game not starting === 
- 
-As always, when a game does not start as expected, this can have multiple reasons. From experience it can be said that the most common problems for games failing to run via //Bottles// is due to missing dependencies (see below on how to install dependencies), wrong bottle runners (see tutorial step //Setting up a game (example)// above on how to install/change a bottle runner), and/or wrong CPU synchronization settings. \\ 
-For changing CPU synchronization settings, open the according bottle and then navigate to: \\ 
-''Options'' → ''Settings'' → ''Performance'' → ''Synchronization'': \\ Changing this setting from ''Esync'' (default) to ''Fsync'' often resolves the problem of games not starting as expected. \\ 
-You can also have a look into the main Batocera [[:troubleshooting|logfiles]] which may be helpful sometimes too. 
- 
-=== Dependencies === 
- 
-If you know or you want to try which additional dependencies (e.g. //Microsoft Visual C++ Redistributable// (vcrun), //.NET//, etc.) your game needs to run, you can add/remove those dependencies as follows: \\ 
-Open the according bottle and then navigate to: \\ 
-''Options'' → ''Dependencies'' \\ 
-From here you can add/remove any dependencies listed. 
- 
-=== Controller issues === 
- 
-Open the according bottle and then navigate to: \\ 
-''Tools'' → ''Legacy Wine Tools'' → ''Control panel'' \\ 
-From there you can check the ''dinput'' and/or ''xinput'' controllers being recognized by //Bottles// (Beware: This option is only available if the according chosen runner for your bottle supports this setting (e.g. //ge-proton//). 
- 
-=== Map hotkeys to quit bottle games === 
- 
-If you want to map the hotkey-combo keys to the according game to quit the according game as for other Batocera gaming systems, you can do so by creating an according ''.keys'' file as follows by executing: 
-<code>nano /userdata/roms/ports/<myGame>.sh.keys</code> 
-Paste the following content: 
-<code> 
-{ 
-    "actions_player1": [ 
-        { 
-            "trigger": [ 
-                "hotkey", 
-                "start" 
-            ], 
-            "type": "exec", 
-            "target": [ 
-            "killall -9 bottles" 
-            ] 
-        } 
-    ] 
-} 
-</code> 
-Save the file and quit the editor. \\ 
-If you need the same for the //Bottles// application itself, this can be done by creating the following file with the same content as described above: \\ 
-''/userdata/roms/flatpak/Bottles.flatpak.keys'' 
  • systems/flatpak.1696541118.txt.gz
  • Last modified: 3 years ago
  • by grandmabetty