TOTEM 1.6 - RoboGol 18 de setembro de 2012- Eduardo Pezutti (eduardo@xbot.com.br) Este documento está disponível em: www.robogol.com.br/totem.pdf Os códigos-fontes estão em: www.robogol.com.br/totem.txt 1 Instalação do Ubuntu 1. Instale o Ubuntu atualizado, podendo ser apartir da versão 10.10. www.ubuntu.com 2. Coloque o usuário totem e senha totem 3. Nos Ubuntus mais novos, instale o gnome: apt-get install gnome. Finalize a seção e comece utilizando o GNOME Classic 5. Para o Ubuntu iniciar automáticamente com o usuário totem, faça: Sistema > Administração > Tela de login Marcar Inicializar automaticamente 6. Baixe o navegador Google Chrome: www.google.com/chrome 7. Instale o Chrome: dpkg -i google-chrome-stable current i386.deb 1
2 Configurando o Google Chrome NÃO SINCRONIZE NENHUMA CONTA COM ESTA MÁQUINA Colocar o autostart do Google Chrome: 1. Crie o arquivo totem.sh na pasta home do usuário totem, com o conteúdo: 1 #! / bin / bash 2 3 # V e r i f i c a se o Google Chrome e s t á aberto 5 while true ; do 6 i f ( ps auxc grep chrome ) 7 then 8 echo 9 e l s e 10 google chrome k i o s k http : / /www. robogol. com. br / r e g i s t r e se 11 f i 12 done 2. No Terminal, dê permissão 777 para o arquivo totem.sh: chmod 777 totem.sh 3. NÃO EXECUTAR O TOTEM.SH COMO ROOT: digite exit para sair. Caso tenha executado o arquivo totem.sh como root, é necessário reininciar o computador.. Faça um teste, executando o arquivo totem.sh:./totem.sh (Obs.: Para sair da tela que abrirá com o comando./totem.sh digite CRT+N) 5. Coloque o arquivo totem.sh no auto executáv el do Gnome, Sistemas -> Preferências -> Aplicativos de sessão. Clique em Adicionar e em Navegar... para encontrar o arquivo totem.sh, com o nome totem e adiciona. 6. CONFIGURAR O CHROME PARA APAGAR OS COOKIES: Configurações - Avancádas - Configurações de Conteúdo - Limpar cookies e outros dados do site 7. Retirar também as opções de Senhas e formulários e Idiomas 2
Figura 1: Configurações de conteúdo. Figura 2: Configurações de conteúdo-cookies. 3
Figura 3: Desmarcar as opções de Senhas e Formulários e Idiomas. 3 Instalando os plugins no Chrome 1. Instale os plugins: Remove Scrollbars https://chrome.google.com/webstore/detail/lkfmjedfjkmfmckgcadelnfjebccjdcf Script Injector https://chrome.google.com/webstore/detail/gidddlfmjhjiibffpalikbecknoflfab 2. Os códigos-fontes estão em: www.robogol.com.br/totem.txt 3. Entre no site www.robogol.com.br/registre-se. Clique na Seringa Preta e em Manage Script, irá abrir uma nova Aba, com o ambiente para inserir os códigos CSS e Javascript em cada site. Figura : Seringa Preta e botão Manage scripts para a inserção do código CSS.
Figura 5: Colocar o código Javascript e CSS. 5. Clique em Create a new script para colocar os dois códigos CSS a seguir. 1 body. r e g i s t r a t i o n { 2 background : none ; 3 background c o l o r : #9bc ; } 5 6 #tempo { 7 backgroud c o l o r : #333; 8 } 9 10 #Top { 11 h e i g h t : 95px ; 12 background : none! important ; 13 } 1 15 #Middle. contentmargin { 16 margin bottom : 0px ; 17 } 18 19 #headerwrapper { 20 background : none! important ; 21 background c o l o r : #9bc ; 22 } 23 2 #headerwrapper >. inner 1 { 25 background : none ; 26 } 27 28 #MainHeader { 29 margin top : 20px ; 30 } 31 32 #MainHeader. btn { 33 f l o a t : r i g h t ; 5
3 margin top : 15 px ; 35 } 36 37 #MainMenu, #s o c i a l l i n k s topbar, #page r i g h t s i d e b a r c 1 c o l 1 2, # TopPanel,. breadcrumbs, h2 { 38 d i s p l a y : none ; 39 } 0 1 #page r i g h t s i d e b a r c 1 c o l 3 1 { 2 width : 100%; 3 } 5 h { 6 f l o a t : r i g h t ; 7 } 8 9. contentmargin { 50 margin top : 0 ; 51 } 52 53 form > p { 5 font s i z e : 1. 5em ; 55 text a l i g n : c e n t e r ; 56 } 57 58 #signup submit { 59 padding : 10 px 30 px ; 60 } 61 62. submit { 63 text a l i g n : c e n t e r ; 6 } 65 66 l a b e l,. l a b e l { 67 c o l o r : #eee ; 68 } 6. Entre no site do Facebook para colocar outro conjunto de CSS: www.facebook.com 1 / 2 CSS para o facebook. com 3 / 5 body { 6 font s i z e : 1. 5em ; 7 } 8 9 #b ooklet #pageheader #homelink { 10 background : u r l ( http : //. bp. blogspot. com/ AuTmcpmduNs/TilmIDegm6I /AAAAAAAAAZ/ zeid77oplsg / s1600 / f a c e b o o k l o g o. png ) no repeat 10 px 50%; 11 padding : 8px 10 px 8px 60 px ; 12 } 13 6
1. a p i l o g i n f o r m i n p o p u p { 15 padding top : 0 px ; 16 } 17 18. inputtext,. inputpassword { 19 width : 260 px ; 20 font s i z e : 0. 8em ; 21 } 22 23. p e r s i s t e n t { 2 padding top : 0 px ; 25 } 26 27 #homelink { 28 font s i z e : 2em ; 29 } 30 31 l a b e l. uibutton { 32 padding : 15 px ; 33 } 3 35 l a b e l. uibutton input { 36 font s i z e : 2em ; 37 } 7. Após colocar os CSS no Script Injector, é necessário ligar estes os CSS aos sites. 8. Clique em Create a new rule em Manage Rules; Coloque o Nome (Ex.: Robogol-Registre-se); o site em URL e clique em Add script at the beginning Figura 6: Criar uma nova R ule. 9. Escolha o CSS correto para cada site. 10. Colocar o JQuery no Add script at the beginning em todas as Rules criadas. 7
11. Acrescente tb os códigos Javascript abaixo e faça a ligação para cada site, colocando no fim do site - Add a script at the end 1 / 2 Código do s i t e : http : / /www. robogol. com. br / r e g i s t r e se 3 / 5 // Cancela a t e c l a TAB 6 $ ( document ). keydown ( f u n c t i o n ( objevent ) { 7 i f ( objevent. keycode == 9) { 8 objevent. preventdefault ( ) ; 9 } 10 }) ; 11 12 13 // Coloca o botão em cima 1 $ ( #MainHeader ). append ( <a s t y l e = padding : 15px 20px ; h r e f= j a v a s c r i p t : closeme ( ) c l a s s = btn impactbtn >SAIR</a> ) ; 15 16 // Botaão CADASTRO DE REDE SOCIAL 17 $ ( #MainHeader ). append ( <a s t y l e = padding : 15px 20px ; h r e f= http : / / www. robogol. com. br / backend / user c o n f i g / r e d e s s o c i a i s c l a s s = btn green >CADASTRO REDE SOCIAL</a> ) ; 18 19 $ ( #Bottom ). remove ( ) ; 20 21 // Tira os l i n k s das imagens do rodape 22 $ (. s t a t i c C o n t e n t ). l a s t ( ). f i n d ( a ). removeattr ( h r e f ). removeattr ( t a r g e t ) ; 23 2 $ ( #Logo a img ). a t t r ( s r c, http : / / robogol. com. br / logo totem. png ). removeattr ( width ). removeattr ( height ) ; 25 26 // Tira o l i n k do logo s u p e r i o r 27 $ ( #Logo a ). removeattr ( h r e f ). removeattr ( t a r g e t ) ; 28 29 30 // Tira o menu do botao d i r e i t o 31 $ ( f u n c t i o n ( ) { 32 $ ( t h i s ). bind ( contextmenu, f u n c t i o n ( e ) { 33 e. preventdefault ( ) ; 3 }) ; 35 }) ; 36 37 idletime = 1 0 ; 38 $ ( document ). ready ( f u n c t i o n ( ) { 39 i f ( $ ( iframe ). l e n g t h == 1) { 0 $ ( #MainHeader ). append ( <div id = tempo > ) ; 1 } 2 }) 3 f u n c t i o n timerincrement ( ) { 5 idletime = idletime 1 ; 6 7 i f ( $ ( iframe ). l e n g t h == 1) { 8 $ ( #tempo ). html ( ) ; 8
9 $ ( #tempo ). append ( Tempo r e s t a n t e : + idletime + </div> ) ; 50 } 51 52 i f ( ( idletime < 0) && ( $ ( iframe ). l ength == 1) ) { 53 var win=window. open (, s e l f ) ; 5 win. c l o s e ( ) ; 55 } 56 } 1 / 2 Código para os s i t e s : https : / /www. facebook. com/ d i a l o g / 3 / 5 // t i r a o l i n k de cima não vai pra a time l i n e 6 $ (.mrm ). a t t r ( h r e f, # ) ; 7 8 $ ( input [ name=g r a n t c l i c k e d ] ). a t t r ( value, ENTRAR! ) ; 9 10 $ (. l e g a l e s e a ). replacewith ( f u n c t i o n ( ) { return $ ( t h i s ). t e x t ( ) ; }) ;? 1 / 2 Código para os s i t e s : https : / /www. facebook. com/ e http : / /www. t w i t t e r. com 3 / 5 $ ( a ). replacewith ( f u n c t i o n ( ) { return $ ( t h i s ). t e x t ( ) ; }) ; 1 / 2 Código para o s i t e : http : / / t w i t t e r. com 3 / 5 $ ( #deny ). c l i c k ( f u n c t i o n ( ) { 6 var win=window. open (, s e l f ) ; 7 win. c l o s e ( ) ; 8 }) ; Ultimo detalhes 1. Ocultar a barra: clique com o botão direito (na barra superior) -> Propriedades -> Ocultar automaticamente (marcar). 2. Desligar a proteção de tela: Sistema -> Preferências -> Protetor de tela Desmarcar as opções: Ativar proteção de tela quando o computador estiver ocioso e Bloquear a tela quando a proteção de tela estiver ativa 9
3. Colocar o papel de parede do RoboGol, disponível em: robogol.com.br/totem_ robogol.jpg. Tempo aproximado de instalação: 2h. 10