Setting up Kodi on Ubuntu
#1
New to Kodi here, and wondering how to set it up properly on Ubuntu.

I have a media server box running Ubuntu 18.04 with Kodi installed. It's connected to my AV system via an HDMI cable, and I'd like to control it with an iPad.

The idea is to play music from Kodi through the sound system, and sometimes movies though a video projector, both out via HDMI.

I've installed the desktop version of Ubuntu, though normally the media server won't have a display attached. I thought to run Kodi either via a VNC connection from the iPad, or else just use the web interface UI. I've found VNC to be very complicated to configure, but the Kodi web UI seems a good alternative.

Question: is it possible to run Kodi as a service that comes up on boot, so that I don't need to open an SSH connection and run it manually? Is it possible to have this and then connect to it via VNC?

Any thoughts about how to do this right, or pointers to guides — would be greatly appreciated!
Reply
#2
Anything that involves combining Kodi and VNC sounds like a bad joke to me. Using web-interfaces or phone apps like Yatse are so much snappier and easier to use. And there is also the built-in web interface Chorus2.

You can set up a minimal Ubuntu installation and Kodi, or take pointers from it, via this thread: https://forum.kodi.tv/showthread.php?tid=231955
Reply
#3
Hi, thanks for your speedy message. Going with the web UI makes sense to me.

The thread you mentioned discusses setting up Kodi on Ubuntu server. I currently have Ubuntu desktop, so would I need to rebuild everything from scratch?

Is there a way to set up Kodi as a service on Ubuntu desktop?

I could re-install the server version of Ubuntu, but it took a long time to get some of the other services (e.g., NFS, HDMI audio, etc.) working properly.
Reply
#4
There were once talks about creating a headless Kodi, but that has never fully materialized. Kodi is still designed as a client application for use on a monitor / TV / beamer.

I didn't mean for you to do a full, fresh install of Kodi (unless you really want to, and your hardware is compliant), but things like the auto-start part may come in handy.
Setting up NFS services in Ubuntu is done in just a few minutes, if you have copies of your fstab and exports files ready.
Reply
#5
Yes, I'm not thinking of a totally headless system, as I would like to play both audio and movies via the HDMI port of the media server.

I guess I'm not clear on how I should be configuring Kodi to start on a machine with no dedicated monitor attached.

Do I need to log in via SSH, execute kodi & , and leave the SSH connection open, or is there some other way? Can I somehow set up Ubuntu so that Kodi will just start in the background when I boot up the machine, so that I can just connect via the web UI and play audio/video via the HDMI port?

I read there's something called kodi-standalone, but people here disagree about whether or not a window manager is necessary for Kodi:

https://askubuntu.com/questions/1012216/...ndow-manag

Still a bit puzzled by all this, but enjoying the Kodi experience Big Grin
Reply
#6
I tried looking at Fritsch's guide again ( https://forum.kodi.tv/showthread.php?tid=231955 ).

There's too much in his discussion that I don't understand. Will these same steps work on Ubuntu 18.04 Desktop?

I'm not a Linux expert and so going through the steps to redo Kodi, NFS, a fixed IP address, Webmin, functional HDMI audio, Postgresql, etc. on a new install is something I would prefer to avoid if possible.
Reply
#7
I don't know about Ubuntu, but on Arch, one can use kodi-standalone-service to achieve it.
Need help programming a Streamzap remote?
Reply
#8
(2018-06-25, 09:52)mrob Wrote: There's too much in his discussion that I don't understand. Will these same steps work on Ubuntu 18.04 Desktop?
It's meant for a minimal Kodi setup on an Ubuntu Server basis for Intel-based graphics PC devices. Adding OpenSSH or other goodies is all up to you of course.
Reply
#9
Ok, if I decide to reinstall Ubuntu Server, I'll try that. For the moment, I'll look a little more to see if there's a way to do this with Ubuntu Desktop.

I looked at the GitHub page for kodi-standalone-service, but it's above my understanding of Linux.
Reply
#10
Researching further, I found two pages that describe how to configure Ubuntu Desktop to auto-start Kodi:

https://kodi.wiki/view/HOW-TO:HOW-TO:Aut..._for_Linux

https://www.smarthomebeginner.com/ubuntu...u-systems/

These are both fairly complicated, though. I will have to study them a bit before diving in.
Reply
#11
(2018-06-26, 02:39)mrob Wrote: Ok, if I decide to reinstall Ubuntu Server, I'll try that. For the moment, I'll look a little more to see if there's a way to do this with Ubuntu Desktop.

I looked at the GitHub page for kodi-standalone-service, but it's above my understanding of Linux.
 There should be no reason for you to reinstall with Ubuntu Server instead of Desktop. They are almost the same thing. They just have different packages installed by default. They can be turned into each other rather easily. There is an ubuntu-server metapackage and an ubuntu-desktop metapackage. These pull in the default packages for the different flavors. Any solution for doing this with Ubuntu Server would also work on Ubuntu Desktop.
Reply
#12
Hey, thanks much for clarifying this point !
Reply
#13
you can use a desktop install with the guide given.  Also for a standalone experience just log out then choose to login to kodi (not the user, choose the application) then you will boot directly into kodi.  To return to desktop open a terminal and use killall kodi-standalone
Reply
#14
I run my server / living room htpc with ubuntu server direct boot to kodi. The systemd service is very simple

Code:
[Unit]
Description = kodi-standalone using xinit
After = remote-fs.target systemd-user-sessions.service mysql.service

[Service]
User = kodimain
Group = kodimain
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/kodi-standalone -- :0 -nolisten tcp
Restart = always
RestartSec = 5

[Install]
WantedBy = multi-user.target

This is what I use. Simple enough. To make it work with 16.04 and higher you need to install the xserver-xorg-legacy package, then edit the /etc/X11/Xwrapper.config to match this

Code:
allowed_users=anybody
needs_root_rights=yes

Packages installed are from kodi ppa. I also install xorg xinit dbus-x11 pulseaudio. Works great. Not hard at all. Every guide I've found are way over complicated. No need for all that mess.
Reply
#15
(2018-06-24, 10:14)mrob Wrote: Question: is it possible to run Kodi as a service that comes up on boot, so that I don't need to open an SSH connection and run it manually?
Yes.  I followed a guide (see https://forum.kodi.tv/showthread.php?tid...pid2741169 - but I see someone's always posted a link to the original guide) and have a small box that boots directly into Kodi.  I wanted to make it idiot-proof so that if it has any issues when I'm away on business, the missus can simply power-cycle it and let it come back up. 

(So far the only issue she's had is when the HDMI cable was slightly dislodged, preventing a normal boot.. but once it was reseated everything was back to normal).

Also agree with VNC - you don't really need it.  You want to control it with your iPad? Look for Kodi remote control apps.  Or open a browser on the iPad and point it at the web interface (will need to be configured in Kodi first).  We use a mixture of mobile apps, browsers off laptops and IR remote control to control our Kodi, and I occasionally SSH in to run a manual "update library" command to refresh programmes if we're watching something else.
Reply

Logout Mark Read Team Forum Stats Members Help
Setting up Kodi on Ubuntu0
This forum uses Lukasz Tkacz MyBB addons.