Autologin

Ivan
Ivan New Member Posts: 2
edited October 2016 in UP Board Linux
Hi! I have installed ubilinux-3, and now I need to make autologin for KODI (autostart). The problem is that the checkbox for "Do not ask password on startup" (actually, I do not know the right sentense, because I am using russian language) is not active in the properties of users. What should I do to make auto-login? Thx.

Comments

  • Björn Reichert
    Björn Reichert New Member Posts: 48
    Change the following file:
    sudo nano /etc/lightdm/lightdm.conf
    
    ...
    #autologin-guest=false
    autologin-user=USERNAME
    autologin-user-timeout=0
    #autologin-in-background=false
    ...
    
  • Ivan
    Ivan New Member Posts: 2
    It works! Thank you Björn very much!
  • dennis
    dennis New Member Posts: 5
    I've used following lines to get the same setup (I used SSH but it does not matter)

    clean ubilinux install

    sudo systemctl disable gdm
    sudo apt-get install software-properties-common -y
    sudo add-apt-repository ppa:team-xbmc/xbmc-nightly
    sudo apt-get update
    sudo apt-get install kodi -y
    sudo adduser --disabled-password --disabled-login --gecos "" kodi
    sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev kodi
    sudo nano /etc/init.d/kodi


    #! /bin/sh

    ### BEGIN INIT INFO
    # Provides: kodi
    # Required-Start: $all
    # Required-Stop: $all
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: starts instance of Kodi
    # Description: starts instance of Kodi using start-stop-daemon and xinit
    ### END INIT INFO

    ############### EDIT ME ##################

    # path to xinit exec
    DAEMON=/usr/bin/xinit

    # startup args
    DAEMON_OPTS=" /usr/bin/kodi-standalone -- :0"

    # script name
    NAME=kodi

    # app name
    DESC=kodi

    # user
    RUN_AS=kodi

    # Path of the PID file
    PID_FILE=/var/run/kodi.pid

    ############### END EDIT ME ##################

    test -x $DAEMON || exit 0

    set -e

    case "$1" in
    start)
    echo "Starting $DESC"
    start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
    ;;
    stop)
    echo "Stopping $DESC"
    start-stop-daemon --stop --pidfile $PID_FILE
    ;;

    restart|force-reload)
    echo "Restarting $DESC"
    start-stop-daemon --stop --pidfile $PID_FILE
    sleep 5
    start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
    ;;
    *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
    esac

    exit 0


    sudo chmod a+x /etc/init.d/kodi
    sudo dpkg-reconfigure x11-common
    "anyone"
    sudo /etc/init.d/kodi start
    # if no error
    sudo update-rc.d kodi defaults
    sudo reboot

    have fun !!!
  • Mircea Bogdan
    Mircea Bogdan New Member Posts: 15
    edited November 2016
    @laandennis i tried this but kodi wont boot , i just get "Starting kodi" if i run "sudo /etc/init.d/kodi start".

    might be because i am missing kodi.pid from /var/run. [strike]How did you install kodi?[/strike] do you have that file there? Myself I have not instaled kodi, it is included in the latest release of ubilinux. tnx