2015-04-23, 13:21
Hi there,
I bought an Intel NUC N2820 (4GB RAM + 1 TB Hard-Drive) I want to turn into a HTPC.
Of course, I've chosen to use Kodi.
As OS, I've chosen Ubuntu 14.04 LTS.
I've chosen this full distribution instead of alternatives like OpenELEC or KodiBuntu for the following reasons:
- Even if the usage of the NUC will be primarly a media-center, I want also to be able to use it a desktop PC when I need.
- Because after few years, I'm back using Linux and this installation is a good exercise to refresh my Linux knowledge.
What I already did (and works ):
- Install Ubuntu 14.04 LTS
- In /home, create a folder "Media" which will contain all the movies, music, ... I had to create this folder as root (since it's under /home which belongs to root) but I moved the ownership to my main user (the user created during Ubuntu installation).
- I've also created a group "nuc-media". This group has full rights on the folder "Media". All the users of the nuc will belong to the group "nuc-media". I did this in order that the folder "Media" is shared amongst all users of the HTPC.
- I installed Samba and shared the folder "Media" accrossed my local network so I can remotely add videos, movies, music, ... For security reasons, I exluded the possibility to log as a guest and defined a Samba password for my user.
- Install KODI.
Now, what I want to do is to configure the NUC so KODI starts automatically and only when loging out KODI, it's possible to login to the regular Ubuntu desktop (just as in KodiBuntu in fact).
I read a lot of documentation, forum, ... and understood that it can be managed via a lightdm and xsession.
But the pre-requisite for this, is to have a Kodi user defined. Hence my questions:
1) What are the privileges I should give to him ? From what I read, the following should be ok but I'd like to get confirmed that I don't miss anything:
Is the "-m" required ?
It would have been nice if the way KodiBuntu kodi user is created was documented.
2) For security purposes, I'd like that the kodi user can log on kodi-standalone without password but that the password is required if someone tries to log to Ubuntu using this user or if another user different than "kodi" (e.g. my personal user) tries to log in KODI desktop. Is it feasible ?
I'm thinking of doing the following:
In /etc/lightdm/lightdm.conf:
And in /usr/share/xsessions/KODI.desktop
Should it be enough ?
I bought an Intel NUC N2820 (4GB RAM + 1 TB Hard-Drive) I want to turn into a HTPC.
Of course, I've chosen to use Kodi.
As OS, I've chosen Ubuntu 14.04 LTS.
I've chosen this full distribution instead of alternatives like OpenELEC or KodiBuntu for the following reasons:
- Even if the usage of the NUC will be primarly a media-center, I want also to be able to use it a desktop PC when I need.
- Because after few years, I'm back using Linux and this installation is a good exercise to refresh my Linux knowledge.
What I already did (and works ):
- Install Ubuntu 14.04 LTS
- In /home, create a folder "Media" which will contain all the movies, music, ... I had to create this folder as root (since it's under /home which belongs to root) but I moved the ownership to my main user (the user created during Ubuntu installation).
- I've also created a group "nuc-media". This group has full rights on the folder "Media". All the users of the nuc will belong to the group "nuc-media". I did this in order that the folder "Media" is shared amongst all users of the HTPC.
- I installed Samba and shared the folder "Media" accrossed my local network so I can remotely add videos, movies, music, ... For security reasons, I exluded the possibility to log as a guest and defined a Samba password for my user.
- Install KODI.
Now, what I want to do is to configure the NUC so KODI starts automatically and only when loging out KODI, it's possible to login to the regular Ubuntu desktop (just as in KodiBuntu in fact).
I read a lot of documentation, forum, ... and understood that it can be managed via a lightdm and xsession.
But the pre-requisite for this, is to have a Kodi user defined. Hence my questions:
1) What are the privileges I should give to him ? From what I read, the following should be ok but I'd like to get confirmed that I don't miss anything:
Quote:useradd -m -G audio,cdrom,video,cdrw,usb,users,nuc-media -p encrypted_password kodi
Is the "-m" required ?
It would have been nice if the way KodiBuntu kodi user is created was documented.
2) For security purposes, I'd like that the kodi user can log on kodi-standalone without password but that the password is required if someone tries to log to Ubuntu using this user or if another user different than "kodi" (e.g. my personal user) tries to log in KODI desktop. Is it feasible ?
I'm thinking of doing the following:
In /etc/lightdm/lightdm.conf:
Quote:[SeatDefaults]
autologin-user=kodi
autologin-user-timeout=0
user-session=KODI
greeter-session=lightdm-gtk-greeter
And in /usr/share/xsessions/KODI.desktop
Quote:[Desktop Entry]
Name=KODI
Comment=Auto start of KODI with "kodi" user without password
Exec=kodi-standalone (or xbmc-standaone )
TryExec=kodi-standalone (or xbmc-standaone )
Type=Application
Should it be enough ?