Retropie Installation on Ubuntu Server x64 18.04.1
-
@johnodon said in Retropie Installation on Ubuntu Server x64 18.04.1:
UPDATE: See MisterB's post below (https://retropie.org.uk/forum/post/190169) for an automated script to complete all of these tasks (+ many improvements). This is the preferred method of install of RP on Ubuntu Server/Mini 18.04/20.04.
Direct link to his scripts: https://github.com/MizterB/RetroPie-Setup-UbuntuServer
This post and the remainder of this thread can be used for additional info and troubleshooting tips.
Many thanks to all the individuals who have contributed to the idea of running Retropie on an Ubuntu server distribution. Most of the discussions regarding this topic can be found in these threads:
https://retropie.org.uk/forum/topic/12037/building-on-ubuntu-server-16-04
https://retropie.org.uk/forum/topic/9346/retropie-on-ubuntu-without-unityI welcome any/all feedback and will incorporate as needed. I will post some video of the installation as well and the end product as soon as I have them. This is a 'living' how-to that is divided into 3 sections:
Required Steps: The necessary components/configuration for Retropie to run on Ubuntu Server.
Optional Steps: Additional components/configuration to make Retropie more 'appliance-like' (i.e. hiding terminal windows)
Troubleshooting: Some issues to look out for and how to correct.Disclaimer:
- I tested ONLY on Ubuntu Server x64 18.04.1 (I will update as new baseline media is released and tested)
- I tested ONLY keyboard and USB connected arcade stick.
- I DID NOT test gamepads (wired or wireless).
- I tested on 3 different physical HW and a few VMs.
- Your HW will be different and may present unknown challenges.
"Look Mom...no terminal windows or mouse pointer!" :) Here is a short video to show transitions (or lack thereof) from ES to gameplay...
Required Steps
1. Install Ubuntu Server x64 (version outlined above)
- I perform a vanilla install
- Language = English
- Keyboard/Variant = Engish (US)
- I use 'pi' for name and username and 'raspberry' for password so I can transfer settings easily from a Pi install
- I partiton the entire disk (no LVM)
- I do not install any server snaps
I perform all steps outlined below in a remote SSH session so I can copy/paste
2. Add 'pi' user to sudoers (password required first time)
sudo sed -i -e '$a\pi ALL=(ALL) NOPASSWD:ALL' /etc/sudoers
3. Enable Universe repo, update/upgrade and install dependencies
sudo apt-add-repository universe && sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install xorg openbox pulseaudio alsa-utils menu libglib2.0-bin python-xdg at-spi2-core libglib2.0-bin dbus-x11 git dialog unzip xmlstarlet --no-install-recommends -y
4. Create Openbox autostart script to launch ES using gnome terminal
mkdir ~/.config && mkdir ~/.config/openbox && echo 'gnome-terminal --full-screen --hide-menubar -- emulationstation' >> ~/.config/openbox/autostart
5. Create .xsession file
echo 'exec openbox-session' >> ~/.xsession
6. Add startx to .bash_profile
echo 'if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then' >> ~/.bash_profile && sed -i '$ a\ startx -- -nocursor >/dev/null 2>&1' ~/.bash_profile && sed -i '$ a\fi' ~/.bash_profile
7. Configure 'pi' user to autologin
sudo mkdir /etc/systemd/system/getty@tty1.service.d && sudo sh -c 'echo [Service] >> /etc/systemd/system/getty@tty1.service.d/override.conf' && sudo sed -i '$ a\ExecStart=' /etc/systemd/system/getty@tty1.service.d/override.conf && sudo sed -i '$ a\ExecStart=-/sbin/agetty --skip-login --noissue --autologin pi %I $TERM' /etc/systemd/system/getty@tty1.service.d/override.conf && sudo sed -i '$ a\Type=idle' /etc/systemd/system/getty@tty1.service.d/override.conf
8.. Get Retropie Setup script and run it
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git && sudo RetroPie-Setup/retropie_setup.sh
The following steps are performed in the Retropie Setup script GUI.
9. Accept disclaimer
10. Basic install --> OK --> Yes
11. Perform rebootRetropie should now be up and running. Copy some ROMs to the system and update RP as you see fit.
Optional Steps
- Install Herb Fargus boot themes (Plymouth)and set retropie-pacman as default
sudo apt-get update && sudo apt-get install plymouth plymouth-themes plymouth-x11 -y && git clone --depth=1 https://github.com/HerbFargus/plymouth-themes.git tempthemes && sudo cp -r ~/tempthemes/. /usr/share/plymouth/themes/ && rm -r -f tempthemes && sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/retropie-pacman/retropie-pacman.plymouth 10 && sudo update-alternatives --set default.plymouth /usr/share/plymouth/themes/retropie-pacman/retropie-pacman.plymouth && sudo update-initramfs -u && sudo cp /etc/default/grub /etc/default/grub.backup && sudo sed -i -e 's/GRUB_TIMEOUT=10/GRUB_TIMEOUT=2/g' /etc/default/grub && sudo sed -i -e 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="quiet splash"/g' /etc/default/grub && sudo update-grub
- Hide last login dialog displayed during boot
sudo sed -i -e 's/session optional pam_lastlog.so/#session optional pam_lastlog.so/g' /etc/pam.d/login && sudo sed -i -e 's/session optional pam_motd.so motd=\/run\/motd.dynamic/#session optional pam_motd.so motd=\/run\/motd.dynamic/g' /etc/pam.d/login && sudo sed -i -e 's/session optional pam_motd.so noupdate/#session optional pam_motd.so noupdate/g' /etc/pam.d/login && sudo sed -i -e 's/session optional pam_mail.so standard/#session optional pam_mail.so standard/g' /etc/pam.d/login
- Completely hide gnome terminal
sed -i '1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ use-theme-colors false' ~/.bash_profile && sed -i '1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ use-theme-transparency false' ~/.bash_profile && sed -i '1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ default-show-menubar false' ~/.bash_profile && sed -i "1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ foreground-color '#FFFFFF'" ~/.bash_profile && sed -i "1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ background-color '#000000'" ~/.bash_profile && sed -i "1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ cursor-blink-mode 'off'" ~/.bash_profile && sed -i "1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ scrollbar-policy 'never'" ~/.bash_profile && sed -i '1 i\dbus-launch gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ audible-bell false' ~/.bash_profile && cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml && cp ~/.config/openbox/rc.xml ~/.config/openbox/rc.xmlbackup && sed -i '/<applications>/a </application>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <maximized>true</maximized>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <decor>no</decor>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <layer>below</layer>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <iconic>no</iconic>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <fullscreen>yes</fullscreen>' ~/.config/openbox/rc.xml && sed -i '/<applications>/a <application class="*">' ~/.config/openbox/rc.xml
Troubleshooting
-
RA hangs/freezes or you get a black screen when launching a ROM
-
Try running 'resetromdirs' from the Configutation / Tools section of the Retropie Setup script.
-
-
No sound in ES or RA
- Run
alsamixer
and unmute channels-
Press F6 to select the correct sound card (if not already selected)
-
Use the arrow keys to move left/right
-
Press the M key to mute (MM) or unmute (##) the selected channel
-
Press the ESC key to exit
-
- Run
-
No sound in ES or RA using HDMI
- Run
pacmd list
- Scroll to bottom and look for Profiles
- Check to see if the active profile (blue bold below) is wrong and replace with the profile you wan to use for HDMI (black bold below):
- Run
profiles:
input:analog-stereo: Analog Stereo Input (priority 60, available: no)
output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
off: Off (priority 0, available: unknown)
active profile: output:analog-stereo+input:analog-stereo- Remove cloud-init to supress boot messages
sudo apt-get purge cloud-init -y && sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
Olá @johnodon , bom dia, tudo bem? cara por gentileza, me tira uma duvida em relaçõ a instalação:
Tenho um pequeno problema na minha instalação.
Utilizo o ubuntu server, rodanod em um notebook com um processador:
Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz
Apó seguir o passo a passo para configuração, tenho enfentado esse erro ao incialziar o sistema:"Last login: Mon Dec 4 03:37:51 2023
No such key “default-show-menubar”
No such key “default-show-menubar”Minha versão do Ubuntu é
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Ressalto que na inicialziação do sistema surge a imagem do controle no formato do cupcake depois surge o erro.
O qu epode ser isso?
obrigado -
@antonioamazonas said in Retropie Installation on Ubuntu Server x64 18.04.1:
[...]
O qu epode ser isso?
obrigadoCan you please use English (even with a translator) ? This is an English speaking forum.
-
@mitu for sure
Hello @johnodon, good morning, how are you? Dear, please ask a question regarding the installation:
I have a small problem with my installation.
I use the Ubuntu server, running on a notebook with a processor:
Intel(R) Core(TM) i3-2350M CPU at 2.30 GHz
After following the step-by-step configuration, I have detected this error when booting the system:"Last login: Monday, December 4 03:37:51 2023
There is no such key “default-show-menubar”
There is no such key “default-show-menubar”My version of Ubuntu is
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
I emphasize that when the system starts, the control image appears in the shape of a cupcake, then the error appears.
What can this be?
thanks
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.