• Autologin and execute app after login

     Autologin with USERNAME:

    sudo systemctl edit getty@tty1.service
    

    Insert below text:

    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --noissue --autologin USERNAME %I $TERM
    Type=idle
    

    Open file to execute program after login (/home/USERNAME/.profile)

    Do start only if user logged in intp TTY1

    if [[ "$(tty)" == "/dev/tty1" ]]; then
      # do whatever you want here
    fi

    Categories: Linux, Ubuntu, Блог

    Comments are currently closed.