{"id":716,"date":"2020-11-26T16:25:51","date_gmt":"2020-11-26T10:25:51","guid":{"rendered":"https:\/\/workit.kz\/?p=716"},"modified":"2020-11-26T16:29:27","modified_gmt":"2020-11-26T10:29:27","slug":"autologin-and-execute-app-after-login","status":"publish","type":"post","link":"https:\/\/workit.kz\/?p=716","title":{"rendered":"Autologin and execute app after login"},"content":{"rendered":"<p>&#160;Autologin with USERNAME:<\/p>\r\n<pre>\r\nsudo systemctl edit getty@tty1.service\r\n<\/pre>\r\n<p>Insert below text:<\/p>\r\n<pre>\r\n[Service]\r\nExecStart=\r\nExecStart=-\/sbin\/agetty --noissue --autologin USERNAME %I $TERM\r\nType=idle\r\n<\/pre>\r\n<p>Open file to execute program after login (\/home\/USERNAME\/.profile)<\/p>\r\n<p>Do start only if user logged in intp TTY1<\/p>\r\n<pre>\r\nif [[ \"$(tty)\" == \"\/dev\/tty1\" ]]; then<br \/>&#160; # do whatever you want here<br \/>fi\r\n<\/pre>\r\n","protected":false},"excerpt":{"rendered":"<p>&#160;Autologin with USERNAME: sudo systemctl edit getty@tty1.service Insert below text: [Service] ExecStart= ExecStart=-\/sbin\/agetty &#8212;noissue &#8212;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 [[ &#171;$(tty)&#187; == &#171;\/dev\/tty1&#187; ]]; then&#160; # do whatever you want herefi<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,30,1],"tags":[],"class_list":["post-716","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","category-blog"],"_links":{"self":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=716"}],"version-history":[{"count":3,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/716\/revisions"}],"predecessor-version":[{"id":720,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/716\/revisions\/720"}],"wp:attachment":[{"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}