2022年3月

全部修改完成后 reboot 后即可自动登录 root

修改文件: 
sudo vim /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
新增内容: 
greeter-show-manual-login=true 
all-guest=false

修改文件:
sudo vim /etc/pam.d/gdm-autologin
注释内容:
auth required pam_succeed_if.so user != root quiet_success

修改文件:
sudo vim /etc/pam.d/gdm-password
注释内容:
auth required pam_succeed_if.so user != root quiet_success

修改文件:
sudo vim /root/.profile
最后一行:
mesg n 2 || true 修改 tty -s && mesg n || true

修改文件:
sudo vim /etc/gdm3/custom.conf
取消注释:
AutomaticLoginEnable=True
AutomaticLogin=root

    template<class Fun, class... Args>
    constexpr auto wrap_call(Fun&& f, Args&&... args)
        noexcept(std::forward<Fun>(f)(std::forward<Args>(args)...))->decltype(std::forward<Fun>(f)(std::forward<Args>(args)...))
    {
        return std::forward<Fun>(f)(std::forward<Args>(args)...);
    }
    template<typename R, typename Fun, typename... Args>
    constexpr auto wrap_call_ex(Fun&& f, Args&&... args)
    {
        return std::invoke(reinterpret_cast<R(__stdcall*)(Args ...)>(typename::std::forward<Fun>(f)), typename::std::forward<Args>(args)...);
    }