Auto USB mount like Kodibuntu
#1
Hi there,

I've use Kodibuntu in the past [Lubuntu14.04 LTS] on my Xtreamer Ultra.
As it is no longer maintainted I start to build my own with help of Lubuntu Desktop 16.04
Everything seems to be working, after many hours of searching and trying:
- Video, via Nividia driver
- Audio [HDMI/analogue+spdif]
- Remote control
- Audio and video settings
- Plugins
- Autostart [without login and start application manual]

Except to make it detect USB drives automatically and mount them Sad
I've tried many suggestions online which should give me this functionality, non of them realy worked udev/usbmount/fstab etc
I still have my old Kodibunt setup, and try to extract this fuctionality from this machine. But can't seem to locate it.

What did Kodibuntu use to make usb sticks autodetect and auto mount without any issues AND show status in GUI.

Thanks in advance.

Albert
Reply
#2
Ubuntu has its tweak tool for stuff like enabling/disabling automount. Doesn't Lubuntu have something similar?
Reply
#3
Lubuntu has something similar called Disk. It is enabled, but not working. Maybe because I'm using:

sudo apt-get Install lightdm
sudo vi /etc/lightdm/lightdm.conf

[Seat:*]
autologin-user=kodi
autologin-session=kodi

To auto start kodi

I don't want to start kodi from the desktop. But just after you start your HTPC
Reply
#4
Search for "udevil" in this forum - I had some howtos showing how to set polkit permissions and howto use udevil there
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Here: https://forum.kodi.tv/showthread.php?tid...pid2051115 make sure to make the polkit file and then just start devmon & before kodi
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Thanks for the quick reply.

Is that do-able for a not super experienced Linux user. Just want them to mount to a kodi user. Is that not always the same command line.
And will this path inform via kodi GUI that a disk was successfully mounted?


I found something like usbmount which should do the trick aswell. It pops up it founds the usb drive. With is great. But when you access it it show Path not found or invalid.
So, it seems I'm close.....
Reply
#7
Yes.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
...
Reply
#9
Hi Fritsch,

According to your post I did following, which resulted in a non working stand-alone kodi machine...... After lubuntu logo everything goes to black.... This is what I've done: [SEE BELOW]

What Did I do wrong?



Standalone Kodi setup on Xtreamer Ultra

Install Lubuntu 16.04 LTS

Update Lubuntu
Code:
sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)


Install SSH [for remote access]
Code:
sudo apt-get install openssh-server
sudo apt-get install net-tools

Install udevil & devmon
Code:
sudo apt-get install udevil devmon

Install latest Nvidia drivers via ppa:
Code:
http://www.webupd8.org/2016/06/how-to-install-latest-nvidia-drivers-in.html
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-304


Install latest stable kodi version:
Code:
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update && sudo apt-get install kodi

Make remote control work 100% correct
Code:
sudo dpkg-reconfigure lirc

Use following answers

Remote control configuration: -> Windows Media Center Transceivers/Remotes (all)
IR transmitter, if present:   -> None


Open LIRC configuration
Code:
sudo vi /etc/lirc/hardware.conf

Change the following three lines in configuration
Code:
REMOTE="Windows Media Center Transceivers/Remotes (all)"
REMOTE_MODULES="lirc_dev mceusb"
REMOTE_DRIVER=""

into this

REMOTE="Nuvoton Transceivers/Remotes"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="default"


Restart LIRC to apply the changes
Code:
sudo service lirc restart


Add Kodi user
Code:
sudo adduser --disabled-password --disabled-login --gecos "" kodi
sudo usermod -a -G cdrom,netdev,audio,video,plugdev,users,dialout,dip,input kodi

Create polkit file, to give permission to shutdown, suspend the computer
Code:
sudo vi etc/polkit-1/localauthority/50-local.d/custom-actions.pkla

Add:
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.login1.*;org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Make Kodi autostart
Code:
sudo apt-get Install lightdm

Edit lightdm.conf file
Code:
sudo vi /etc/lightdm/lightdm.conf

Add folowing lines
Code:
[Seat:*]
session-setup-script=devmon
autologin-user=kodi
autologin-session=kodi
Reply
#10
Fritsch's link uses Ubuntu not Lubuntu if you want to create your own Ubuntu/Kodi setup.
That setup has been tested many times, so you probably have made an error somewhere.
There is no need to copy all your steps here.
Try again with an Ubuntu ISO, not Lubuntu.
Reply
#11
(2017-09-18, 19:00)Klojum Wrote: Fritsch's link uses Ubuntu not Lubuntu if you want to create your own Ubuntu/Kodi setup.
That setup has been tested many times, so you probably have made an error somewhere.
There is no need to copy all your steps here.
Try again with an Ubuntu ISO, not Lubuntu.
At Klojum,
I'm working on 2nd line ICT desk. I love it when customers show what they have done to get to the error state. So I can understand what they are doing.

The URL is pointing to Ubuntu server with Intel graphics. I think when I follow that path I will run into different matters, as I'm using NVidia
There is also an Ubuntu Desktop topic, but there people are also complaining about auto detecting of USB disks. So that won't be an option aswel I guess.

This line:
Code:
session-setup-script=devmon
Is the giving the black screen. Without it the USB stick seems to be recognized, but a valid path to the location is failing.

Just tested Librelec, everything works out of the box. But missing apt-get and non changeable root password are showstoppers for. Shame that they don't explain what Linux distro they use and unfold the magic of auto usb recognition within Lightdm mode........
Reply
#12
LE is a complete build distribution, fully build from source. Whatever you follwed in the above post is NOT my howto. You know, a howto does not work when one picks out everything from everywhere. The only thing you need is I will repeat: polkit files (see my link) and starting devmon before kodi -> done.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#13
Found the answer here:
https://michelbonten.wordpress.com/2016/...s-minimal/

Super explanation
Reply

Logout Mark Read Team Forum Stats Members Help
Auto USB mount like Kodibuntu0