{"id":403,"date":"2024-07-27T13:05:22","date_gmt":"2024-07-27T13:05:22","guid":{"rendered":"https:\/\/habett.fr\/blog\/?p=403"},"modified":"2024-07-27T13:05:24","modified_gmt":"2024-07-27T13:05:24","slug":"whos-in-here","status":"publish","type":"post","link":"https:\/\/habett.fr\/blog\/2024\/07\/whos-in-here\/","title":{"rendered":"Who&rsquo;s in here ?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Je suis pas parano mais j&rsquo;aime bien surveiller un peu ce qui se passe \u00e0 l&rsquo;int\u00e9rieur de mon Ubuntu Desktop perso. J&rsquo;ai donc mis dans mon .bashrc<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>if [ $(who | wc -l) -gt 1 ]; then<br>   notify-send -t 3000 \"Someone else logged in as me\"<br>fi<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Simple et pratique. J&rsquo;aurais pu faire un grep pour filtrer les connexions externes uniquement mais j&rsquo;aime bien comme \u00e7a. Avant je mettais directement notify-send mais cela perturbait l&rsquo;Ubuntu car le .bashrc \u00e9tait lu avant la session graphique. Je mets aussi dans mon conky.conf une ligne pour surveiller aussi:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>${font Lato:light:size=22}Who =$color ${user_number}locals ${font}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On s&rsquo;amuse comme on peut.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Je suis pas parano mais j&rsquo;aime bien surveiller un peu ce qui se passe \u00e0 l&rsquo;int\u00e9rieur de mon Ubuntu Desktop perso. J&rsquo;ai donc mis dans mon .bashrc if [ $(who | wc -l) -gt 1 ]; then notify-send -t 3000 \u00ab\u00a0Someone else logged in as me\u00a0\u00bbfi Simple et pratique. J&rsquo;aurais pu faire un grep pour &hellip; <a href=\"https:\/\/habett.fr\/blog\/2024\/07\/whos-in-here\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Who&rsquo;s in here ?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[72,74,73],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry","category-security","tag-bash","tag-gui","tag-monitor"],"_links":{"self":[{"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":2,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"predecessor-version":[{"id":405,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions\/405"}],"wp:attachment":[{"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/habett.fr\/blog\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}