{"id":117,"date":"2011-05-31T17:21:00","date_gmt":"2011-05-31T17:21:00","guid":{"rendered":"http:\/\/aldarias.es\/wordpress\/?p=117"},"modified":"2011-05-31T17:21:00","modified_gmt":"2011-05-31T17:21:00","slug":"cerrar-sesion-y-apagar-los-pcs-de-forma-automatica","status":"publish","type":"post","link":"http:\/\/aldarias.es\/wordpress\/?p=117","title":{"rendered":"CERRAR SESION Y APAGAR LOS PCS DE FORMA AUTOMATICA"},"content":{"rendered":"<p>En la biblioteca cada alumno tiene 1 horas para usar el pc.<br \/>Ello lo usan y dejan la sesi\u00f3n abierta. Este script la cierra<br \/>a la hora que le indiquemos.<\/p>\n<p>#!\/bin\/bash<br \/># Por Paco Aldarias<br \/># Fecha: 31.5.2011<\/p>\n<p>$usu=alumno<br \/>su admon -c &#8216;DISPLAY=:0 zenity &#8211;info &#8211;text=\u00bbSe cerrar\u00e1 la sesion en 2 minutos.\u00bb&#8216; &amp;<br \/>sleep 120<br \/>su &#8211; -c &#8216;\/etc\/init.d\/gdm restart&#8217;<\/p>\n<p>Al cerrar la bibloteca el ordenador debe apagarse, lo haremos<br \/>con este script:<\/p>\n<p>#!\/bin\/bash<br \/># Por Paco Aldarias<br \/># Fecha: 31.5.2011<br \/># apagar.sh<\/p>\n<p>#zenity &#8211;info &#8211;text=\u00bbSe cerrar\u00e1 la sesion en 2 minutos.\u00bb &#8211;display=:0.0<br \/>#$usu=admin<br \/>$usu=alumno<br \/>su admon -c &#8216;DISPLAY=:0 zenity &#8211;info &#8211;text=\u00bbSe apagar\u00e1 el ordenador en 2 minutos.\u00bb&#8216; &amp;<br \/>sleep 120<br \/>su &#8211; -c &#8216;halt&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>En la biblioteca cada alumno tiene 1 horas para usar el pc.Ello lo usan y dejan la sesi\u00f3n abierta. Este script la cierraa la hora que le indiquemos. #!\/bin\/bash# Por Paco Aldarias# Fecha: 31.5.2011 $usu=alumnosu admon -c &#8216;DISPLAY=:0 zenity &#8211;info &hellip; <a href=\"http:\/\/aldarias.es\/wordpress\/?p=117\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","footnotes":""},"categories":[159,160,49,158],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-halt","category-sesiones","category-ubuntu","category-zenity"],"_links":{"self":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":0,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}