Linux - HOW TO: Minimal Ubuntu 16.04 with Kodi, Steam & EmulationStation

  Thread Rating:
  • 3 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
psxstudio Offline
Junior Member
Posts: 7
Joined: Jan 2010
Reputation: 0
Post: #46
Thanks for the write up!!! I do have 1 question though... what video card do you guys recommend to run steam? I'm currently using an old nvidia geforce gt 610 and using kodibuntu. I chose 610 for silent operations when i build the HTPC few years ago. I'll be switching over to this setup when time permits.
find quote
sveni_lee Online
Fan
Posts: 526
Joined: Jan 2013
Reputation: 9
Post: #47
I try to get it work with the Advanced Emulator Launcher... it works so far but I have problems with the resolution...
KODI has the right resolution 1920x1080 but when I start the dolphin-emu I always get the wrong resolution...
I don`t know how to solve it...

any ideas?

Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
find quote
solbero Offline
Member
Posts: 57
Joined: May 2014
Reputation: 2
Post: #48
(2016-12-03 05:24)psxstudio Wrote:  Thanks for the write up!!! I do have 1 question though... what video card do you guys recommend to run steam? I'm currently using an old nvidia geforce gt 610 and using kodibuntu. I chose 610 for silent operations when i build the HTPC few years ago. I'll be switching over to this setup when time permits.

I have heard good things about the Zotac GTX 750 Ti, or perhaps one of the new 10xx series from Nvidia. AMD could also be a good choice, there is a lot of work going into their open-source driver these days. You could also post your question to LinuxHardware sub-Reddit.

My box is only running an Intel Skylake CPU with the integrated HD-530. Works well for emulators and most indie games.

(2016-12-03 15:58)sveni_lee Wrote:  I try to get it work with the Advanced Emulator Launcher... it works so far but I have problems with the resolution...
KODI has the right resolution 1920x1080 but when I start the dolphin-emu I always get the wrong resolution...
I don`t know how to solve it...

any ideas?

What resolution have you selected in Dolphin? Have a look at the Dolphin documentation on how to change your resolution.
(This post was last modified: 2016-12-03 18:34 by solbero.)
find quote
Joontje Offline
Junior Member
Posts: 41
Joined: Mar 2014
Reputation: 0
Post: #49
Hi There, appreciate the writeup.
Unfortunately the link to https://github.com/angelscry/plugin.prog...d.launcher appears to have broken.

If you have a chance to fix this link i have a question for you:

Can i use in-home-streaming(client) when i run steam with this method?

Thanks!
find quote
Nickelino Offline
Junior Member
Posts: 12
Joined: Oct 2016
Reputation: 0
Post: #50
Hi Folks,

first of all i want to thank you for this great Tutorial!
I use Ubuntu 16.04 Desktop on a Zbox nano CI320 and it works fine.

@Joontje: I tested In-Home-Streaming and it works.

My Question now is how to get it work with only one Kodi session.
If I start an application with the "kodi-openbox-runprogram", the current kodi-session doesn't quit and if I quit the started application, a second Kodi-Session appears.

How can I make it, that only one Kodi-Session is running, no matter how many applications I start and quit?

Greetings

Nicke
find quote
gammelobst Offline
Junior Member
Posts: 13
Joined: Jan 2017
Reputation: 0
Post: #51
Hi there,

i have a solution for the pulseaudio-thing: (my user is named kodi!)

Code:
cp /etc/pulse/client.conf /home/kodi/.config/pulse
edit it:
Code:
nano /home/kodi/.config/pulse/client.conf
and change:
Code:
; autospawn = yes
to
Code:
autospawn = no

so pulseaudio won't start automatically and you have to start it before starting a program which need it.
This means Kodi uses ALSA for passthough-mode and bit-perfect-playback, but you can also start pulseaudio and use it for other applications.

cya

edit:

for Steam:

we need a startscript:
Code:
vi ~/steam_starter.sh
paste the following:
Code:
sleep 5
pulseaudio -D
sleep 5
steam -bigpicture
now edit:
Code:
vi  ~/.kodi/userdata/addon_data/plugin.program.advanced.launcher/launchers.xml
and change the <args> from Steam from:
Code:
<args>steam -bigpicture</args>
to:
Code:
<args>bash /home/kodi/steam_starter.sh</args>
(This post was last modified: 2017-02-02 21:48 by gammelobst.)
find quote
ProfFrink Offline
Junior Member
Posts: 2
Joined: Jan 2017
Reputation: 0
Post: #52
Hi all,
Thanks to OP for this guide. I'm a newb running into an audio issue. Basically, Kodi autostarts and everything seemingly runs fine, but the audio doesn't work (i.e., no menu clicking sounds or anything). However, if I go to [System > System > Video output > Resolution] and change the resolution setting, then the audio suddenly magically starts working. Alternatively, I can get the audio to work by exiting Kodi, logging into Lubuntu, and then re-running Kodi (but then I assume Kodi is no longer running in Openbox, right?). In case it's informative: I'm running Lubuntu on an Intel NUC connected to a TV via HDMI.

Anyone got any guesses on how to fix this? Many thanks in advance.
find quote
ProfFrink Offline
Junior Member
Posts: 2
Joined: Jan 2017
Reputation: 0
Post: #53
(2017-01-16 07:35)ProfFrink Wrote:  Hi all,
Thanks to OP for this guide. I'm a newb running into an audio issue. Basically, Kodi autostarts and everything seemingly runs fine, but the audio doesn't work (i.e., no menu clicking sounds or anything). However, if I go to [System > System > Video output > Resolution] and change the resolution setting, then the audio suddenly magically starts working. Alternatively, I can get the audio to work by exiting Kodi, logging into Lubuntu, and then re-running Kodi (but then I assume Kodi is no longer running in Openbox, right?). In case it's informative: I'm running Lubuntu on an Intel NUC connected to a TV via HDMI.

Anyone got any guesses on how to fix this? Many thanks in advance.


Solved.
Solution found here: http://askubuntu.com/questions/545616/wh...dn2820fykh

It's just a matter of changing an option that's buried in the Pulse settings. Sorry to have cluttered this thread with this issue, but I'm posting this solution in case it helps others.
find quote
Nickelino Offline
Junior Member
Posts: 12
Joined: Oct 2016
Reputation: 0
Post: #54
Hi guys,

I found an acceptable solution for my "Multiple-Kodi-Sessions"-problem:

The file /usr/bin/kodi-openbox-runprogram.real shall contain the script for "Closing Kodi -> Run program -> Start Kodi again", but it doesn't

In my case on my Ubuntu 16.04 Desktop it does "Run program -> Start second Kodi", so two Kodi-sessions run now.
You can test it with ALT+TAB on a usual keyboard after you started and closed a program.

To make it act like I want, I changed the /usr/bin/kodi-openbox-runprogram.real a little bit:

Code:
sudo cp /usr/bin/kodi-openbox-runprogram.real /usr/bin/kodi-openbox-runprogram.real.bak

sudo nano /usr/bin/kodi-openbox-runprogram.real

Code:
#!/bin/bash
mkdir -p ~/.kodi-openbox
mkdir -p ~/.kodi-openbox/tmp
display=$(echo "${DISPLAY}" | tr ':' '_')
echo $$ > ~/.kodi-openbox/tmp/program-running.$display
kpid=$(cat ~/.kodi-openbox/tmp/session-pid.$display)
        echo "closing kodi"
        ps axf | grep kodi.bin | grep -v grep | awk '{print "kill -9 " $1}' | sh
echo "running program"
eval "$@"
eval_result=$?
echo "finished running program"
exit $eval_result

Now it works like I want it.

Thanks again for this great tutorial!

Greetings

Nicke
find quote
Nickelino Offline
Junior Member
Posts: 12
Joined: Oct 2016
Reputation: 0
Post: #55
@solbero: I have the same issue as asphixmx. If i want to start any entry of the emulationstation, it doesn't start.

I installed EmulationStation with RetroPie for x86-systems to get a better emulation environment. RetroPie x86

There are some executable command line scripts, for example the retropie_setup.sh, that don't start. It doesn't matter which entry I try to start.

I tried to activate logging in Kodi, but there is no entry with emulationstation.

You suggested to add > ~/es-log.txt at the and of a command, so I tried for the SNES section as you see in the following code box. The file appears in my home directory, but it has no content.

Code:
<system>
    <name>snes</name>
    <fullname>Super Nintendo</fullname>
    <path>/home/htpc/RetroPie/roms/snes</path>
    <extension>.bin .smc .sfc .fig .swc .mgd .zip .BIN .SMC .SFC .FIG .SWC .MGD .ZIP</extension>
    <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes %ROM%  > ~/es-log.txt$
    <platform>snes</platform>
    <theme>snes</theme>
  </system>

The problem seems to appear only in die kodi-openbox-session.
If I start EmulationStation from Unity Desktop and start a rom, everthing works fine.

Do you have some more suggestions to find a solution?

I really want to use the openbox-session because I'm using a Zbox Nano CI320 with very bad graphics hardware and running other graphical applications like Unity Desktop wouldn't be well. Confused

Greetings

Nicke
(This post was last modified: 2017-01-21 21:41 by Nickelino.)
find quote
gammelobst Offline
Junior Member
Posts: 13
Joined: Jan 2017
Reputation: 0
Tongue  RE: HOW TO: Minimal Ubuntu 16.04 with Kodi, Steam & EmulationStation
Post: #56
@Nickelino

the content from /opt/retropie/supplementary/runcommand/runcommand.sh would help to analyze, as we don't have it in our guide here.
Or try to start the emulator directly without the use of runcommand.sh...
Oh and not to forget: do you have passwordless sudo already activated?

cya

BTW: I also use a Zbox Nano CI320 and please don't use "very bad graphics hardware" - as "low-end" is a much better term...
There is unsupported graphics hardware out there and this is "very bad graphics hardware" - at least for our use TongueTongueTongueTongueTongue
(This post was last modified: 2017-01-22 00:34 by gammelobst.)
find quote
Nickelino Offline
Junior Member
Posts: 12
Joined: Oct 2016
Reputation: 0
Post: #57
@gammelobst: This script is very long and I'm not really good in shell scripting. So i cannot say where could be the issue with it.

I do not post the file here because it's too long.

Here is the Link to the file in the developer's git repository. I think it's basically the same:
runcommand.sh

EDIT: ...and thanks for your litte hint Big Grin I said very bad because Steam says running in big picture mode that the graphics memory is too low and I found no way to increase it.... HuhSad That's bad Tongue

Greetings

Nicke
(This post was last modified: 2017-01-22 00:55 by Nickelino.)
find quote
gammelobst Offline
Junior Member
Posts: 13
Joined: Jan 2017
Reputation: 0
Post: #58
(2017-01-22 00:34)Nickelino Wrote:  @gammelobst: This script is very long and I'm not really good in shell scripting. So i cannot say where could be the issue with it.

I do not post the file here because it's too long.

Here is the Link to the file in the developer's git repository. I think it's basically the same:
runcommand.sh

EDIT: ...and thanks for your litte hint Big Grin I said very bad because Steam says running in big picture mode that the graphics memory is too low and I found no way to increase it.... HuhSad That's bad Tongue

Greetings

Nicke

ok, this script is a little longer - but it will install itself to /opt and i hope it will not break my system so i'll install and play with it a bit...

for the Steam - graphics memory to low thing - as far as i noticed this is only important if you want to start a game locally - for in-home-streaming only va-api and pulseaudio is required.
I stream with [email protected] without any problem that is not also happening on my steam-link in the bedroom and in the bathroom. (like green-screen in Castlevania) But as i said - this is also happening on my steam-links so not a specific BayTrail-Issue.
I also tried different things to make steam recognize the video-ram correctly - until i tried streaming, which is perfectly smooth and no noticeable lag - so i can live with the laggy steam-ui for selecting a game as i am here for streaming not for being idle in big-picture-mode. Real bad graphics hardware would leave us alone with cpu-decoding the stream which could need a little more CPU-power as we have in our boxes...

cya
(This post was last modified: 2017-01-22 01:27 by gammelobst.)
find quote
Nickelino Offline
Junior Member
Posts: 12
Joined: Oct 2016
Reputation: 0
Post: #59
Thanks for your try. I really appreciate it.

I destructed my Linux several times so I decided to do backups before changes.

I recommend you to do the same (clonezilla is really nice to do it) and you have to install Retropie with the setup script. Retropie x86

Code:
cd ~

git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git

cd RetroPie-Setup

sudo ./retropie_setup.sh

Hope you're able to get it working.
In my opinion RetroPie is the best emulation solution and it's a must-have in the Kodi-Openbox-Environment.

Greetings

Nicke
(This post was last modified: 2017-01-22 02:26 by Nickelino.)
find quote
gammelobst Offline
Junior Member
Posts: 13
Joined: Jan 2017
Reputation: 0
Post: #60
@nickelino

Thanks, but you already linked to it in your First post and i am compiling ATM.
find quote
Post Reply