quinta-feira, 18 de fevereiro de 2010

Gravando com Mencoder

From here you have to press 's' to take the snapshot. The snapshot will be saved in your current folder as shotXXXX.png. If you want to record continuous video:
$ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o .avi
Press Ctrl+Z to end the recording.

in reference to: http://wiki.archlinux.org/index.php/Webcam_Setup#VLC (view on Google Sidewiki)

sexta-feira, 12 de fevereiro de 2010

Acesso Remoto

Acesso Remoto

Introdução
Normalmente uma máquina remota (na internet pública) não pode iniciar comunicações com uma máquina interna (na intranet departamental). Isso protege contra ataques diretos - diariamente nosso firewall bloqueia ~50.000 sondagens procurando buracos ou fraquezas para atacar. No entanto, às vezes acesso remoto é útil ou até necessário, particularmente durante uma viagem, para rodar um programa como Fluent, por exemplo, ou para pegar arquivos importantes.

SSH/SFTP SSH/SFTP
| |
| +-SSH-+ +-SSH-+ |
| | | | | |
| :p | :22 | :22
| | | | | |
+----+ +---internet---+ +---intranet-------+

<---remota--->

<-------TÚNEL SSH---------->

<-------------------------------------------------->
<---------------CONEXÕES SSH/SFTP------------------>
<-------------------------------------------------->

Acesso remoto envolve:
A abertura de um túnel ssh seguro entre a máquina remota e acesso.fisica.ufc.br.
Criptografia assimétrica, em vez de uma senha, é usada para mais segurança durante a abertura. Duas chaves são geradas na máquina remota: a chave secreta é protegida por uma passphrase local; a chave pública é registrada em acesso.fisica.ufc.br, junto com o endereço da máquina externa e o nome da máquina interna que vai ser acessada.
A criação de conexões através do túnel entre a máquina remota e a máquina interna.
As conexões ssh abrem um shell na máquina interna para rodar programas: se um programa precisar de uma interface gráfica (janelas, mouse etc.), esta pode ser transferida para a máquina remota. As conexões sftp transferem arquivos entre as máquinas.
A máquina remota pode rodar Linux (ou outras sistemas da família Unix) ou Windows. A máquina interna precisa ser um servidor de ssh: normalmente Linux é usado.


Instruções para Linux, Solaris, FreeBSD...

Básicas

Use o comando
ssh-keygen -t rsa
para gerar um par de chaves:
uma pública (no arquivo ~/.ssh/id_rsa.pub)
uma secreta (no arquivo ~/.ssh/id_rsa), que deve ser protegida por uma passphrase
(uma frase que você não vai esquecer e que um hacker não vai adivinhar).
Mande um email para Ramos ou Tony com:
sua chave pública (id_rsa.pub);
o endereço IP da máquina remota local;
o nome da máquina interna que pretende acessar.
Depois de receber uma conta (a) na máquina acesso, teste a conectividade com o comando local:
ssh a@acesso.fisica.ufc.br
[devia pedir sua passphrase e mostrar um cabeçalho do departamento de física].
Feche o teste com Ctrl+C.
Para abrir um túnel levando conexões da porta p (por exemplo, 4000) na máquina remota para
a porta 22 (ssh/sftp) na máquina interna i, use o comando:
ssh -L p:i:22 a@acesso.fisica.ufc.br
[o comando "netstat -na" mostra as portas usadas]
A janela (shell) usada para este comando agora só serve para manter o túnel aberto.
Para criar conexões através do túnel para sua conta (b) na máquina interna, abra outras janelas (shells) e use os comandos:
ssh -C -p p b@127.0.0.1 # para abrir um shell
sftp -C -oPort=p b@127.0.0.1 # para transferir arquivos
[obs: o sintaxe para "porta p" varia entre comandos]
Interfaces Gráficas

Depois de abrir o túnel (item 4 acima), as seguintes interfaces gráficas (em vez de textuais) podem ser interessantes.
gftp

Este programa oferece uma interface gráfica local que simplifica a transferência de arquivos por sftp.
Configure o menu FTP|Options|SSH assim:
SSH Extra Params: -C
SSH2 sftp-server path: /usr/lib
Use SSH2 SFTP subsys
Connecte através do túnel assim:
Host: 127.0.0.1
Port: p (de item 4 acima)
User: b (conta na máquina interna)
SSH2 (em vez de FTP)
X11 Forwarding
Para rodar um programa gráfico na máquina interna, é necessário t

in reference to: http://www.fisica.ufc.br/rede/acesso/ (view on Google Sidewiki)

segunda-feira, 8 de fevereiro de 2010

É como se fosse o Twitter para homepages

Com o Google Sidewiki, além de compartilhar opiniões de páginas da web, podemos também compartilhar nossos perfis no Google e ao mesmo tempo publicar essas opiniões nos nosso blogs no blogspot. Ahhh claro, também no twitter e no facebook (ué ? Por que não no Orkut?)

in reference to: Google (view on Google Sidewiki)

Mount remote folder

Hello
I can mount in bash with this command

CODE: SELECT ALL
mount -t cifs //xx.xx.xx.x.x/folder /mnt/somefolder


and when I type it in bash I recive:

password:

then I type enter (I dont put password, just press enter) and my remote folder is mounted!

But when I add

mount -t cifs //xx.xx.xx.x.x/folder /mnt/somefolder

by optimize me on Mon Sep 07, 2009 8:48 pm

Entries in fstab are not mount commands like what you use in a terminal. Since everything in fstab is meant to be mounted, the mount command itself is left out and entries are formatted like so:

/mounted/folder /local/mount/point type options

so to use your own example for mounting a Windows share, it would look something like:

host:/folder /mnt/somefolder smb user,rw,auto


That's just an example. The options used will vary depending on the access level you want (e.g., read-only, read-write), whether it's auto-mounted at boot time or not, etc..

Some good fstab reading:
https://help.ubuntu.com/community/Fstab
http://ubuntuforums.org/showthread.php?t=283131

http://www.techotopia.com/index.php/Sharing_Ubuntu

sexta-feira, 5 de fevereiro de 2010

Update the GlobalMenu in Ubuntu 9.10

[Updated 25 November to include a link to the release notes. -Peng]

I’ve noticed for some time that when I open the Epiphany browser the GlobalMenu identifies it as “Epiphany Web Bookmarks”. Since the web browser and the bookmark manager are two different apps I wanted to file a bug against it. (...)

http://nancib.wordpress.com/2009/11/24/update-the-globalmenu-in-ubuntu-9-10/

in reference to: http://nancib.wordpress.com/2009/11/24/update-the-globalmenu-in-ubuntu-9-10/ (view on Google Sidewiki)

segunda-feira, 1 de fevereiro de 2010

Instalação do Molekel

How to install Molekel under Ubuntu and Debian (Thanks to Olly)

If you tried to install Molekel under a recent version of Ubuntu or Debian you might have faced some difficulties. Here I report the step by step procedure to get it running. The biggest problem is that Molekel needs the old version of libstdc++6 which isn't in Debian/Ubuntu. All the commands that start with "sudo" are exectuted as root, so you have to get the root passwd before installing Molekel (or get your sysadmin to do it for you).

Download molekel4.3.linux.tar.gz or molekel4.3.linux-mesa.tar.gz, after registering on the web-site.
Untar with:
$tar -xvzf molekel4.3.linux.tar.gz (or $tar -xvzf molekel4.3.linux-mesa.tar.gz )
Create the Molekel library directory under /usr/local/lib:
$sudo mkdir /usr/local/lib/molekel/
Copy everything from the molekel tarball in the lib/ dir to /usr/local/lib/molekel:
$sudo cp lib/* /usr/local/lib/molekel/
Download libstdc++-libc6.1-2.so.3
Unzip it with:
$gunzip libstdc++-libc6.1-2.so.3.gz
Move it to /usr/local/lib/:
$sudo mv libstdc++-libc6.1-2.so.3 /usr/local/lib/
Add the path to the library configuration file, if not already present:
$sudo echo "/usr/local/lib" >> /etc/ld.so.conf

Update the library cache, running:
$sudo ldconfig


Go into molekel/bin and run the executable:
$./molekel4.3.linux

in reference to: http://www.srcf.ucam.org/~sp422/fordummies/ (view on Google Sidewiki)