building on ubuntu server 16.04
-
Creating a i386 - x86 system that boots to retropie, without the garbage of a full OS.
1.openssh
2.sudo apt-get install xorg openbox pulseaudio --no-install-recommends
3.retropie as for the norm...make sure to go into settings and set to start on login
4.sudo apt-get install xinit
5.(nano ~/.xinitrc) and add
#!/bin/sh
exec emulationstation
6.(sudo nano /etc/default/grub) and (GRUB_CMDLINE_LINUX_DEFAULT="quiet splash")
7.sudo update-grub
8.( nano /etc/systemd/system/getty.target.wants/getty@tty1.service) and edit (ExecStart=/sbin/agetty --noclear --autologin <username> %I $TERM)
9.(nano ~/.bash_profile) and add ( pgrep 'tmux|startx' || startx) w/o the () of course.This is close but still missing something.
-
Thank you so much for the info!!! I tried to do this myself both with the Ubuntu Xenial Minimal CD and with Server 16.04. I could never get emulationstation to run at startup and also had issues in most cases where ES wouldn't launch at all claiming no display driver or something like that. Unless your server install already included it you would want SDL installed as well.
You have motivated me to try this project again myself and start with your steps and see how far I can get. I would REALLY prefer to use the Minimal CD over the server OS to make it as lean as possible but I can't find a list of what the retropie/es/retroarch dependencies are since I would to load them all manually.Oh, yeah - did you load server 16.04 with a desktop environment or with only a terminal/shell? I tried without a desktop and like I said I got video display errors and ES wouldn't run from the command prompt.
-
@esmith13 If it helped you're welcome, and i did everything through the terminal, but I am having controller input issues .
-
I am currently trying again with the minimalCD and doing a minimal lubuntu install which has a minimal x11 desktop. I'm hoping to then get it to boot straight to emulationstation and remove x11, once I figure out how to autologin to terminal and auto run ES instead of x11 that is... ;-)
-
I think I may have run into your controller issue (not that you mentioned exactly what it was).
I got everything installed and running and I used your additional steps above. when xinit launches ES for me instead of X11, keyboard, mouse and USB input devices don't register. If I allow LXDE to load and RetroPie's built-in autostart runs ES immediately thereafter - everything is fine.
Unfortunately, I am only slightly better than a beginner with linux-based OSs, so I'm not sure where to go from here...
-
@esmith13 I'm sorry my controller issues is the same as yours, i should of been more clear. To be technical, it does see that im using a USB game controller but wont let me set it up.
-
@esmith13 i also dont understand why there hasnt been a bootable image for x86 made there has been one made for Lakka but that s**t is horrable looking!
-
@esmith13 I've also looked up on how people build Internet kiosk thinking all i had to do was replace their Firefox & or chrome install with retropie.... that has NOT worked out for me.
-
@damanbaird said in building on ubuntu server 16.04:
@esmith13 I'm sorry my controller issues is the same as yours, i should of been more clear. To be technical, it does see that im using a USB game controller but wont let me set it up.
Hello,
I know it's an old topic, but have you got any news about it? I have setup Ubuntu 17.10 with your "configuration" but have the same problem with the controllers. I can't configure them at the emulationstation startup.
Best Regards
Kokomo -
This issue has not been resolved. That said - this concept was modified and continued in another thread HERE
May I suggest looking at that for my post (#29) that begins with "BACK FROM THE DEAD!!!!! :-)"
Basically, using the lightest weight full *buntu install (Lubuntu 17.10) I got the system to appear as if it booted directly to emulationstation after a 'home grown' retropie splashscreen. It doesn't waste any resources, just the 200mb of so of disk space used by lxde and a few apps being installed.
Give it a shot.
WARNING: Do NOT use *buntu 18.04. (Tested releases are 16.04 and 17.10) libretro has issues with xorg/gl/video drivers in that release and the temporary fix is to switch to wayland on the login screen but a bunch of lightweight distros like Lubuntu don't support wayland.
-
@esmith13 said in building on ubuntu server 16.04:
WARNING: Do NOT use *buntu 18.04. (Tested releases are 16.04 and 17.10) libretro has issues with xorg/gl/video drivers
Do you have any reference of this, besides the posts in the forums ?
-
I have no reference, but I have confirmed via personal experience of upgrading two existing dedicated PCs that ran 17.10 (a dell optiplex 3020 and a surface pro 3) and a clean install from scratch of 18.04 on a dell optiplex 3020 that the video freezes within about 30 seconds or less of a game rom running while sound/input/etc all continue to work fine behind the frozen image.
-
@esmith13 Have you reported this to the RetroArch devs ? Maybe providing some logs will help diagnose and fix the issue - whatever that is. Is it the same game/rom or happens with every libretro core ?
-
Hi all - I'm a bit late to the party, but I learned a good deal on my quest to get an x86 retropie box on Ubuntu server.
@damanbaird - Thanks for the writeup on the things you tried, as it saved me a ton of time!
Anyway, I was successful in building out Ubuntu server 16.04.4 and 18.04 with both Xorg and Wayland. I settled on Wayland since it allows me to run the games in DRM/KMS mode which can help a bit with input lag.
Where I got stuck (and it looks like where @damanbaird got stuck as well) was getting emulationstation to launch, which requires X. I tried the recommendations I saw in the various kiosk tutorials mentioned above and ran into the same problem - It appeared as though emulationstation could not find X or the input drivers.
The key I found was to run a window manager that allows for an autorun. This allows X to load fully and then the window manager launches emulationstation without issue.
Steps I followed 1-3 from @damanbaird's writeup, plus:
-
Once openbox is installed, create and edit ~/.config/openbox/autostart
gnome-terminal --full-screen --hide-menubar -e emulationstation
(Running emulationstation under a terminal emulator allows the runcommand program to shell out and retroarch)
-
Edit (or create and edit) the ~/.xsession file
exec openbox-session
-
Edit (or create and edit) the ~/.bash_profile file:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then startx fi
-
edit /etc/systemd/system/getty@tty1.service.d/override.conf
[Service] ExecStart= ExecStart=-/sbin/agetty --noissue --autologin username %I $TERM Type=idle
With that I got exactly what I wanted, an x86 ubuntu server build that loads right into Emulationstation with full functionality. (The one other thing you'll probably want to do is to enable your retropie account to sudo without a password)
The setup for wayland is a bit different but similar - I was able to use the .15.2 version of the swaywm and configure it similarly to openbox's autorun
-
-
I had a few more notes to help make it pretty:
SET OPENBOX BACKGROUND TO BLACK
---edit openbox autostart file
---used script example below from https://bbs.archlinux.org/viewtopic.php?id=226139
---set to black before calling emulationstation
-------->setting it after causes gray -> black transitionSET A BACKGROUND COLOR
BG="" if which hsetroot >/dev/null 2>/dev/null; then BG=hsetroot elif which esetroot >/dev/null 2>/dev/null; then BG=esetroot elif which xsetroot >/dev/null 2>/dev/null; then BG=xsetroot fi test -z $BG || $BG -solid "#000000"
CHANGE GNOME-TERMINAL BACKGROUND
--open gnome terminal in openbox
--go to profile preferences and set color
--go to profile preferences and uncheck scrollbar in "Scroll" area -
EDIT: I found an article that shows the same and instructs to create the '/etc/systemd/system/getty@tty1.service.d' folder. Trying that now.
EDIT#2: Confirmed. Both the 'getty@tty1.service.d' folder and 'override.conf' file need to be created.@praetorian55 said in building on ubuntu server 16.04:
-
edit /etc/systemd/system/getty@tty1.service.d/override.conf
[Service] ExecStart= ExecStart=-/sbin/agetty --noissue --autologin username %I $TERM Type=idle
Is this part correct? That path does not exist for me on Ubuntu Server 16.04.
-
-
UPDATE: I was able to get rid of the two errors below (menu file and dbus-launch) by installing 'menu' and 'dbus-x11.
OK. @praetorian55 I performed the first 3 steps of @damanbaird 's post followed by your steps. Server is auto-logging in but all I get is a black screen with the mouse pointer.
FYI...not sure if it helps but I see this in the ~.xsession-errors file:
Xsession: X session started for pi at Sat Jul 28 08:37:17 EDT 2018
localuser:pi being added to access control list
Openbox-Message: Unable to find a valid menu file "/var/lib/openbox/debian-menu.xml"
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Failed to execute child process "dbus-launch" (No such file or directory)
Failed to launch bus: Failed to connect to session busError constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Failed to execute child process "dbus-launch" (No such file or $
Failure: Module initialization failedAny ideas?
TIA!
John
-
...
-
...
-
I now have ES starting as expected. I am on to adding roms and testing RA and controls.
FYI...I am capturing the things I had to do to get this all to work (at least for me) and I will post a comprehensive guide.
John
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.