RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Retropie Installation on Ubuntu Server x64 18.04.1

    Scheduled Pinned Locked Moved Projects and Themes
    18.04debianubunutux64x86
    223 Posts 34 Posters 66.5k 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.
    • ethelingE
      etheling @MisterB
      last edited by etheling

      I'm glad to see the continued interest

      Very much so! :) And if I may, I really like how you wrote the script style-wise too.

      challenge going forward is finding the dividing line between "solid installation base" and "personal configuration/tweaks".

      My thinking is that 'main' setup script should probably produce a stable configuration that to a reasonable extent mimics what you get when you install RetroPie using stock image on RPi. Then more experimental / controversial / unstable modifications and e.g. build specific customizations for e.g. Arduino tools could be done from another script after the main script has executed.

      I'm still working on my post-install customizations, but I'll post my script in a week (or two or three) as one example of what can be done.

      simple dialog logic might be options

      Not my call of course, but I hope that I could run the whole install process 'unattened' without a need to interact with the script once it has launched.

      1 Reply Last reply Reply Quote 0
      • ethelingE
        etheling @etheling
        last edited by etheling

        Quick note about ScummVM (and lr-scummvm): Retropie setups scummvm.sh clones version 2.1.1 of ScummVM, which fails to compile on Ubuntu 20.04 likely because of this. Worked around by removing version tag from git clone in scummvm.sh and cloning master branch.

        This will eventually sort itself out as RetroPie moves to newer versions of ScummVM.

        scummvm-lr segfaults out of the gate on Ubunbtu 20.04. Didn't do any analysis yet as of why.

        ethelingE 1 Reply Last reply Reply Quote 0
        • ethelingE
          etheling @etheling
          last edited by etheling

          edit: See this post for updated information regarding installing wine

          I realize this may be pushing boundaries of what is in the scope of RetroPie, but it occurred to me that since I'm running RetroPie now on Intel platform, some of the games from my GOG library could be integrated to the setup and launched directly from ES through Ports. I first tried to get Linux versions of e.g. Papers Please and Secret of the Monkey Island SE to work. But getting them to run in my opinion required too much work trying to strace which 32bit copies of libraries are needed for each game. And even then I got garbled audio in some. What seems like a better route is to install Wine and run Windows versions of those (and other games).

          Although some changes were still needed, I now have all the LucasArts Remastered editions from GOG.com running through Ports ( with the exception of Grim Fandango Remastered that crashes after intro). What's great is that e.g. Day of the Tentacle and Secret of the Monkey Island appear to have been made playable using gamepad and work great on TV (instead of having to have a mouse and sit by a desk to play).

          Here's the part of my customization script that installs Wine (somehow it feels fitting that these games are run in an emulator rather than using native Linux versions ;):

          function install_wine() {
              echo " "
              echo "+-------------------------------------------------------------------------------"
              echo "| Install Wine - https://www.winehq.org/"
              echo "+-------------------------------------------------------------------------------"
              cd /tmp
              ## but use Ubuntu stock package instead of https://wiki.winehq.org/Ubuntu
              sudo dpkg --add-architecture i386
              sudo apt -y update
              sudo apt install -y wine wine64
          
              ## install wine tricks - https://wiki.winehq.org/Winetricks
              cd /usr/local/bin
              wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
              chmod +x winetricks
          
              sudo -u $USER winetricks -q corefonts
              sudo -u $USER winetricks -q xact
              sudo -u $USER winetricks -q d3dx9
          
              # these need X to run... 
              # sudo -u $USER winetricks -q vcrun6
              # sudo -u $USER winetricks -q vcrun2005
              # sudo -u $USER winetricks -q vcrun2008
          
              sudo -u $USER winetricks list-installed
              
              cd $CURDIR
              echo -e "Done\n\n"
              sleep 4
          }
          

          And a sample .sh to launch the game:

          pi@retropie:~$ cat RetroPie/roms/ports/DayOfTheTentacle-remastered.sh
          #!/bin/bash
          
          CURDIR=`pwd`
          cd "/home/pi/RetroPie/roms/ports/game-data/Day of the Tentacle Remastered/"
          wine64 ./Dott.exe 2>/dev/shm/wine64.log
          

          Note that it's better to run the GOG Windows installers on Windows and then copy the installed files to RetroPie (GOG installers didn't run great under Wine).

          ethelingE 1 Reply Last reply Reply Quote 0
          • johnodonJ
            johnodon
            last edited by johnodon

            You learn something new everyday.

            I run RetroPie on top of Ubuntu on an Asus CN65 Chromebox (Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz). I also have an Asus CN60 Chromebox (Celeron) that runs stock ChromeOS. I use this second box to stream web content (mainly sports from some nefarious sources).

            And then it dawned on me...

            Why not just install genuine Google Chrome (no need for Chromium) on the RetroPie box and create a launcher for it in Ports. It works BEAUTIFULLY!!! I can stream 4K content from Youtube without a single hiccup and I can now retire a piece of equipment.

            1.png

            2.png

            If anyone wants to do this, all I did was download the current stable release and install it using apt:

            wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
            sudo apt install ./google-chrome-stable_current_amd64.deb
            

            If not already done, add 'Ports' to your /opt/retropie/configs/all/emulationstation/es_systems.cfg:

              <system>
                <name>ports</name>
                <fullname>Ports</fullname>
                <path>~/RetroPie/roms/ports</path>
                <extension>.sh .SH</extension>
                <command>bash %ROM%</command>
                <platform>ports</platform>
                <theme>ports</theme>
              </system>
            

            Create a ~/Retropie/roms/ports/Google Chrome.sh script with the following in it:

            google-chrome &>/dev/null
            

            Create a ~/Retropie/roms/ports/gamelist.xml:

            <?xml version="1.0"?>
            <gameList>
            	<game>
            		<path>./Chrome.sh</path>
            		<name>Chrome</name>
            		<playcount>2</playcount>
            		<lastplayed>20200906T151625</lastplayed>
            	</game>
            	<game>
            		<path>./Google Chrome.sh</path>
            		<name>Google Chrome</name>
            		<desc>Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, and was later ported to Linux, macOS, iOS, and Android where it is the default browser built into the OS. </desc>
            		<image>./images/Google Chrome-image.png</image>
            		<video>./images/Google Chrome-video.mp4</video>
            		<marquee>./images/Google Chrome-marquee.png</marquee>
            		<rating>0.85</rating>
            		<releasedate>20080902T000000</releasedate>
            		<developer>Google</developer>
            		<publisher>Google</publisher>
            		<genre>Web Browser</genre>
            		<playcount>1</playcount>
            		<lastplayed>20200906T153421</lastplayed>
            	</game>
            </gameList>
            
            

            And of course add some images and video if you like.

            John

            P 1 Reply Last reply Reply Quote 3
            • ClydeC
              Clyde
              last edited by

              Nice find. 👍 I'm curious, though. Why use Chrome from an external source when there is Chromium only one sudo apt install chromium-browser from the official Ubuntu repositories away? Is there a technical reason or just by habit?

              johnodonJ 1 Reply Last reply Reply Quote 0
              • johnodonJ
                johnodon @Clyde
                last edited by

                @Clyde said in Retropie Installation on Ubuntu Server x64 18.04.1:

                Nice find. 👍 I'm curious, though. Why use Chrome from an external source when there is Chromium only one sudo apt install chromium-browser from the official Ubuntu repositories away? Is there a technical reason or just by habit?

                I remember when I was messing with ChromiumOS, widevine wasn't officially supported. I assumed the same was tru for Chromium browser.

                External source? Meaning not using 'apt'? The Chrome download is directly from Google.

                1 Reply Last reply Reply Quote 0
                • ClydeC
                  Clyde
                  last edited by Clyde

                  External meaning not from the distribution's own software repositories. On Linux, using the official repo is the preferred way to install software, as it has has several benefits to "the Windows way", i.e. downloading every application from a different website.

                  Every package from the repo is checked against tampering by its cryptographic signature, and it also will be automatically updated with the rest of the system. Simply put, Linux' repository system is a decades-old super app store for the whole system and its applications.

                  Since security updates are especially important for web browsers, your prime benefit of using Chromium from the repo would be the auto-updates – if it has the functionality that you need for your project, of course.

                  Just my two cents triggered by your description, as I see many new Linux users (don't know if you are one) who keep using the installation method they're used to from their former OS. 🧐

                  edit: two single-word changes for better wording.

                  1 Reply Last reply Reply Quote 0
                  • johnodonJ
                    johnodon
                    last edited by

                    After all of this, I ended up installing Firefox instead due to screen tearing issues in Chrome. The process is the same except Firefox can be installed via apt and naturally a new launch script needs to be created to start firefox.

                    FYI...Firefox also displayed the same tearing issues, however there is a fix that worked for me:

                    https://askubuntu.com/questions/1141291/screen-tearing-ubuntu-18-04

                    John

                    ClydeC 1 Reply Last reply Reply Quote 1
                    • ClydeC
                      Clyde @johnodon
                      last edited by

                      @johnodon Thanks for the update and for sharing the link. 👍

                      1 Reply Last reply Reply Quote 0
                      • johnodonJ
                        johnodon
                        last edited by johnodon

                        Can someone else run MisterB's script on a test device with server/mini 18.04? I'm not sure what changed but a lot of packages are failing to install (openbox, dialog, xmlstart, etc.). I had to add the universe repo (as per my original instructions above) for things to start working again.

                        Honestly, I'm not sure how the script ever worked without that repo included but I can't see anything in the history where it was removed. Did a recent update to the 18.04 ISO do something?

                        ClydeC 1 Reply Last reply Reply Quote 0
                        • ClydeC
                          Clyde @johnodon
                          last edited by

                          @johnodon said in Retropie Installation on Ubuntu Server x64 18.04.1:

                          I'm not sure what changed but a lot of packages are failing to install (openbox, dialog, xmlstart, etc.). I had to add the universe repo (as per my original instructions above) for things to start working again.

                          All of those packages are in the universe repo since at least Ubuntu 16.04 (see openbox, dialog, and xmlstarlet on https://packages.ubuntu.com/). So, that repo was needed for them as early as April 2016.

                          I don't know if universe is enabled on Ubuntu (Server) 18.04 by standard. Did you encounter this problem on a new installation or an old one?

                          johnodonJ 1 Reply Last reply Reply Quote 0
                          • johnodonJ
                            johnodon @Clyde
                            last edited by

                            @Clyde said in Retropie Installation on Ubuntu Server x64 18.04.1:

                            I don't know if universe is enabled on Ubuntu (Server) 18.04 by standard. Did you encounter this problem on a new installation or an old one?

                            I'm just fiddling around today as I am almost finished my 4-play cab and know I will have a need to completely reinstall (all new hardware). I swear that I have used his script in the past to install on 18.04 and don't recall having these issues and don't remember enabling Universe prior to running it. The again, I could just be having a senior moment. :)

                            Universe is enabled by default on 20.04 so no issue there but I am facing some other challenges with that version that I am trying to work through.

                            John

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              MisterB @johnodon
                              last edited by

                              @johnodon Just remember to use the LTS-20.04 branch of my script if you use that version of the OS. If you have issues, please report back. I recent did a test run that appeared to work OK for me.

                              johnodonJ 1 Reply Last reply Reply Quote 0
                              • johnodonJ
                                johnodon @MisterB
                                last edited by johnodon

                                @MisterB said in Retropie Installation on Ubuntu Server x64 18.04.1:

                                @johnodon Just remember to use the LTS-20.04 branch of my script if you use that version of the OS. If you have issues, please report back. I recent did a test run that appeared to work OK for me.

                                I installed 20.04 on a Lenovo T430 laptop (my sandbox device) and I get a screen like this after the first reboot when the script is finished:

                                https://imgur.com/a/qdrDJRA

                                1 Reply Last reply Reply Quote 0
                                • M
                                  MisterB
                                  last edited by

                                  Yikes! No idea what is going on there...

                                  ethelingE johnodonJ 2 Replies Last reply Reply Quote 0
                                  • ethelingE
                                    etheling @MisterB
                                    last edited by etheling

                                    @MisterB Not sure if this is what's causing @johnodon s troubles but I had the install fail few times because unattended upgrades kicked in, got lock for apt and thus made the install script fail in odd ways as apt gets from script started failing.

                                    I added this to the very beginning of the script to disable unattended upgrades:

                                    echo "Disable unattended upgrades for now. Re-enabled at the end of main install script"
                                    systemctl stop unattended-upgrades
                                    systemctl status unattended-upgrades
                                    systemctl disable unattended-upgrades
                                    # dpkg-reconfigure -plow unattended-upgrades 
                                    # dpkg --configure -a 
                                    # cat /etc/apt/apt.conf.d/20auto-upgrades
                                    

                                    And then just before reboot:

                                    function enable_unattended_upgrades () {
                                            echo " "
                                            echo "+-------------------------------------------------------------------------------"
                                            echo "| Re-enable unattended upgrades"
                                            echo "+-------------------------------------------------------------------------------"
                                            echo " "
                                            sleep 5
                                            systemctl start unattended-upgrades
                                            systemctl status unattended-upgrades
                                            systemctl enable unattended-upgrades
                                            ## dpkg-reconfigure -plow unattended-upgrades
                                            cat /etc/apt/apt.conf.d/20auto-upgrades
                                            dpkg --configure -a ; # make sure everything is in synch; unnessary..yes?
                                    }
                                    

                                    Edit #1: indicative of above problem are lines such as below in 'retropie_setup_ubuntu.log' or on terminal:

                                    Waiiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 220203 (apt-get)... 1
                                    

                                    Edit #2: I also ran to another possibly IPv6 name resolution related issue with apt where it randomly failed trying to resolve archive.ubuntu.com resulting as following error (see retropie_setup_ubuntu.log):

                                    ....
                                    Get:2 http://ppa.launchpad.net/ubuntu-x-swat/updates/ubuntu focal/main i386 Packages [5,912 B]
                                    Err:3 http://archive.ubuntu.com/ubuntu focal InRelease
                                      Could not resolve 'archive.ubuntu.com'
                                    Err:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
                                    ....
                                    

                                    I'm not sure if I'm addressing the root cause here or not, but forcing apt to stick to IPv4 appears to make this problem go away:

                                    echo "Prevent apt to use IPv6"
                                    ## https://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method
                                    echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
                                    
                                    johnodonJ 1 Reply Last reply Reply Quote 1
                                    • johnodonJ
                                      johnodon @MisterB
                                      last edited by johnodon

                                      @MisterB said in Retropie Installation on Ubuntu Server x64 18.04.1:

                                      Yikes! No idea what is going on there...

                                      OK...updating the Mainline kernel (I chose 5.8.9) per @etheling 's advice solved the issue: https://retropie.org.uk/forum/post/233967

                                      Basically, X wasn't starting but I still can't explain the craziness on the screen.

                                      1 Reply Last reply Reply Quote 0
                                      • johnodonJ
                                        johnodon @etheling
                                        last edited by

                                        @etheling said in Retropie Installation on Ubuntu Server x64 18.04.1:

                                        @MisterB Not sure if this is what's causing @johnodon s troubles but I had the install fail few times because unattended upgrades kicked in, got lock for apt and thus made the install script fail in odd ways as apt gets from script started failing.

                                        I added this to the very beginning of the script to disable unattended upgrades:

                                        echo "Disable unattended upgrades for now. Re-enabled at the end of main install script"
                                        systemctl stop unattended-upgrades
                                        systemctl status unattended-upgrades
                                        systemctl disable unattended-upgrades
                                        # dpkg-reconfigure -plow unattended-upgrades 
                                        # dpkg --configure -a 
                                        # cat /etc/apt/apt.conf.d/20auto-upgrades
                                        

                                        And then just before reboot:

                                        function enable_unattended_upgrades () {
                                                echo " "
                                                echo "+-------------------------------------------------------------------------------"
                                                echo "| Re-enable unattended upgrades"
                                                echo "+-------------------------------------------------------------------------------"
                                                echo " "
                                                sleep 5
                                                systemctl start unattended-upgrades
                                                systemctl status unattended-upgrades
                                                systemctl enable unattended-upgrades
                                                ## dpkg-reconfigure -plow unattended-upgrades
                                                cat /etc/apt/apt.conf.d/20auto-upgrades
                                                dpkg --configure -a ; # make sure everything is in synch; unnessary..yes?
                                        }
                                        

                                        this has fixed my package failure issues! Thanks @etheling . :)

                                        ethelingE 1 Reply Last reply Reply Quote 1
                                        • johnodonJ
                                          johnodon
                                          last edited by johnodon

                                          @MisterB FYA...

                                          Can someone who has used MisterB's 20.04 script on either mini or server try to install mame (not lr-mame) from the experimental packages. I get the below error and had to reinstall python to get past it.

                                          FYI...I do not have this issue when I use the 'master' branch to install on top of 18.04.

                                          = = = = = = = = = = = = = = = = = = = = =
                                          Building 'mame' : MAME emulator
                                          = = = = = = = = = = = = = = = = = = = = =
                                          
                                          Removing additional swap
                                          Adding 5075 MB of additional swap
                                          Setting up swapspace version 1, size = 5 GiB (5321519104 bytes)
                                          no label, UUID=a9d782a2-e629-4f3d-927e-4d78db137903
                                          swapon: /home/pi/RetroPie-Setup/tmp/swap: swapon failed: Invalid argument
                                          GCC 9 detected
                                          makefile:1032: *** Python is not available in path.  Stop.
                                          strip: 'mame64': No such file
                                          Removing additional swap
                                          /home/pi
                                          Could not successfully build mame - MAME emulator (/home/pi/RetroPie-Setup/tmp/build/mame/mame64 not found).
                                          
                                          ClydeC mituM 2 Replies Last reply Reply Quote 0
                                          • ClydeC
                                            Clyde @johnodon
                                            last edited by

                                            @johnodon said in Retropie Installation on Ubuntu Server x64 18.04.1:

                                            makefile:1032: *** Python is not available in path. Stop.

                                            Maybe that's because Ubuntu switched to Python 3 ex factory with 20.04. You could try to change the system's standard alternative for python, see here for instructions.

                                            johnodonJ 2 Replies Last reply Reply Quote 0
                                            • 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.