Posts Tagged ‘Linux’

Creating Web Albums with gThumb

If you want to create a web album with some images you have in your computer, with Linux as your OS, i recommend you to use gThumb.

gThumb is, as said in WikiPedia (http://en.wikipedia.org/wiki/GThumb):

… an open-source image viewer and organizer for the GNOME desktop environment released under the GNU General Public License. It was originally based on GQView, and is designed to have a clean, simple interface.

gThumb Homepage: http://gthumb.sourceforge.net/

INSTALLING GTHUMB:
I’m using Ubuntu 9.04, named Jaunty Jackalope, to write this tutorial, so the installation process is very simple, all you have to do is run:

1
# aptitude install gthumb

This should work the same way for Debian GNU/Linux, but if you’re using another distro Linux, you might have to compile gThumb.

CREATING WEB ALBUM:
When you run gThumb you’ll see this interface:

gThumb Interface

I mapped it to make it easier to follow:

gThumb Interface Mapped

The steps to create the Web Album are:
1 – Create directory to keep the images:
First create a directory and put the images you’d like to be in the album in it.

2 – Open directory with gThumb:
In gThumb interface, select the directory in which the images are (#1 in MAP)

3 – Select the images you’d like to show in the album:
After opening the directory, which contains the images, you’ll have to select the images you’d like to show in the album (#2 in MAP)

4 – Open the “Create Web Album” window and configure it:
Now, with all images selected, go to Tools > Create Web Album (#3 in MAP)
Then you should see a window like this:

gThumb Web Album Interface mapped

This is where you’ll configure your web album. The options are:

#1 – Where the web album files will be saved.
#2 – The name of the page, i recommend you to leave it as it is.
#3 – How many images per line and per column will be shown.
#4 – The title of the page, or header message, if you preffer.
#5 – The footer message of the page.
#6 – The theme that will be used in the web album.

The other options are not so important for me, so i didn’t put them in here.

In the end, you’ll have something like this: http://am.softwarelivre.org/galeria/fedora12releaseparty/

:wq

Tags: , , ,

No Comments


IpForward from Computer with Linux to PS3

I’ve recently bought my PlayStation 3 (FInaly!!!!!) and was thinking of a way to connect my PS3 to the internet using my 3G BroadBand internet connection, which is provided by the brazilian Phone Company Claro. The only thing that came to me was: IpForward.

So i did this:
1 – Connected my Notebook to the 3G Broadband:
Just connected as I normally do.

2 – Connected my PS3 to my Notebook:
Created a LAN between them, through my notebook’s interface eth0.
I configured my PS3’s network connection as follows:
In the PS3’s main menu go to Settings > Network Settings > Internet Connection Settings, then, go through this sequence of choices: custom, wired connection, auto-detect, manual (the ip settings are shown bellow), automatic, do not use (in my case i don’t use any proxy), enable.

The Ip Settings are:
Ip address: 192.168.0.2
Subnet mask: 255.255.255.0
Default Router: 192.168.0.1 (This is my Notebook’s Ip)
Primary DNS: 208.67.222.222 (This is Claro’s primary DNS Server)
Secondary DNS:
208.67.220.220 (This is Claro’s secondary DNS Server)

3 – Set Notebook to IpForward
I found a Script in the internet that does everything it needs to ipforward, all i did was add the final line, which sets a fixed ip to the interface that is connected to the LAN. I don’t remeber who wrote the script, but the credits are his/hers.
All you have to do now is save the script bellow and run it everytime you want to connect your PS3:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Basic firewall and forward/masquerade setup

PATH=/usr/sbin:/sbin:/bin:/usr/bin

# Delete/Flush old iptables rules
iptables -F
iptables -t nat -F
iptables -X

# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

echo "1" > /proc/sys/net/ipv4/ip_forward

ifconfig eth0 192.168.0.1 netmask 255.255.255.0

If you did as it is described in here, then it should work just fine.

Just for the record, I’m sing BrDesktop Lenny Linux as Operating System (a Debian Pure Blend).

Note: Everytime I try to test the connect through PS3, my notebook loses the ip 192.168.0.1 and starts o search for another one, breaking the connection between them. So i recommend you not to use that feature when using the connection method described in here.

:wq

Tags: , , , , ,

No Comments


Downloading files from Rapidshare through shell

I’ve seen, at Viva o Linux (http://www.vivaolinux.com.br, in portuguese), a post talking about a ShellScript that downloads files from RapidShare through shell. As, sometimes, i download files from that site,  i decided to try it out and it worked fine for me.

This script uses wget to download the first html page, then it gets the link to the page that contains the link to the file, download this second page, checks the timer and waits for it to finish, after it finishes, the script starts the file download. I noticed that, if the download stops, this script continues from where it stopped.

This is how it goes:

1 – Download the ShellScript:

1
$ wget http://tokland.googlecode.com/svn/trunk/rapidshare/rapidshare-dl.sh

2 – Set execution permission:

1
$ chmod +x rapidshare-dl.sh

3 – Download File:
There are two ways you can do this:
Passing the link as an argument:

1
$ ./rapidshare-dl.sh http://link.to.rapidshare

You can also add more than one link:

1
$ ./rapidshare-dl.sh http://link.to.rapidshare http://another.link.to.rapidshare

Passing a text file as an argument:
Create a text file, named links.txt for example, and put each link in a different line, like:

1
2
3
http://link1.to.rapidshare
http://link2.to.rapidshare
http://link3.to.rapidshare

Then you run the script with the text file name as an argument:

1
$ ./rapidshare-dl.sh links.txt

You can create a link to the script in, or copy it to, the /usr/bin directory, making it executable from everywhere:

1
# ln -s $PATH_TO_SCRIPT/rapidshare-dl.sh /usr/bin/rapidshare-dl
1
# cp  rapidshare-dl.sh /usr/bin/rapidshare-dl

NOTE: This script works only in Unix-like systems.

There is also plowshare, which is another shellscript that does the same thing, and more, but i haven’t tested it yet. In the project page it says that it supports Megaupload, Rapidshare, 2Shared, 4Shared, ZShare, Badongo, DepositFiles and Mediafire, and it also uploads files to those share sites.
PlowShare Page: http://code.google.com/p/plowshare/

Tags: , , , ,

No Comments


Software Freedom Day 2009 – Amazonas

Software Freedom Day

Software Freedom Day

O Software Freedom Day  é uma celebração mundial de Software Livre e de Código Aberto (FOSS – Free and Open Source Software). O objetivo desta celebração é educar o publico mundial sobre todos os benefícios de se utilizar Softwares Livres e de Código Aberto de alta qualidade na educação, no governo, em casa e nos negócios — em resumo, em todo lugar! A organização sem fins lucrativos Software Freedom International coordena o Software Freedom Day a nível global, dando suporte, brindes e um ponto de colaboração, mas times voluntários em todo o mundo organizam os eventos locais para impactar as suas próprias comunidades.

PSL-AM

PSL-AM

Em Manaus, o evento será realizado para divulgar a criação do PSL-AM, Projeto Software Livre – Amazonas, que irá, através de palestras em várias universidades, simultaneamente, divulgar o Software Livre e Open Source e explicar mais sobre esse mundo Livre e onde o PSL se encaixa neste assunto.

Site: http://am.softwarelivre.org

Tags: , ,

No Comments


DebianDay2009 Amazonas realizado!



No último Sábado foi realizado o Debian Day 2009 Amazonas, evento que, como comentei em um post anterior, comemora o aniversário da distribuição Debian GNU/Linux.

O evento, na minha opinião, foi muito bom. As pessoas que compareceram ao evento se mostraram bastante interessadas nos assuntos das palestras ministradas, muitas delas me procuraram apóas as palestras para perguntar mais sobre o Debian-AM e sobre o Software Livre em manaus.

Um dos pontos maiores do evento foi a participação do criador e mantenedor do portal Viva o Linux (http://vivaolinux.com.br), Fábio Berbet, que fez duas palestras muito interessantes: “Como gerenciar um site com 8 milhões de acessos” e “Como ingressar no mercado com Software Livre”. Gostaria de deixar aqui meu agradecimento ao Fábio, desejar que o Viva o Linux continue crescendo e que possa leválo até a Espanha! hehehe, Quem estava no evento sabe do que eu estou falando.

Gostaria de parabenizar toda a equipe do Debian-AM, pela realização do evento, e a galera de manaus do Projeto Fedora e o representante do BrOffice em manaus, Carlos Lucoli, e a todos os patrocinadores e apoiadores, que nos ajudaram muito.

Como prometi, está aqui o slide da minha palestra sobre o Projeto BrDesktop:
projeto-brdesktop-pres.pdf

:wq

Tags: , , , ,

1 Comment


Happy Birthday, Debian!

Yesterday was Debian’s birthday, and I’d like to say:


Happy Birthday, Debian!

Tags: , , ,

No Comments


Debian Day 2009 Amazonas

Debian Day é um evento realizado anualmente por vários grupos de Software Livre em todo o mundo. Também conhecido por Dia Debian e Dia D, este evento comemora o aniversário da distribuição GNU/Linux Debian, que neste ano (2009) completa 16 anos de existência.

Em Manaus, o Debian Day é realizado pelo Grupo de Usuários Debian do Amazonas, conhecido por Debian-AM, sendo patrocinado pela UniLaSalle e com o apoio do Projeto Zagaia, AIT Technologies e Gráfica Silva.

Neste ano, teremos um desafio de programação e um convidado especial, o criador e mantenedor do site Viva o Linux (http://vivaolinux.com.br), Fábio Berbert de Paula.

Convidamos todos a participarem deste evento.
Data: 22 de Agosto de 2009.
Local: UniLaSalle, Dom Pedro I, em frente à praça de alimentação do Dom Pedro I.
Horário: 9h – 17:30h, credenciamento de 8h – 9h.
Entrada: 2Kg de alimentos não perecíveis, exceto sal.

Para saber como participar do desafio de programação, visite o site de evento.

Site: http://diadebian.org/am/2009

Tags: , , ,

No Comments


Modem 3G Claro Huawei E226 no Debian Lenny/Ubuntu

Comprei, recentemente, o modem 3G da Claro, fabricado pela Huawei, modelo E226, e infelizmente não consegui fazê-lo funcionar de cara no Debian Lenny, mas após alguns minutos de pesquisa a solução apareceu!

A solução que descreverei também funcionou do Ubuntu, nas versões Intrepid Ibex e no Jaunty Jackalope.

Você precisará do pacote wvdial, instale-o com o comando:

1
# aptitude install wvdial

Para saber mais detalhes sobre o pacote acesse este link: http://packages.debian.org/lenny/wvdial.

Após isso você deverá criar um arquivo de configuração para o wvdial, chamado wvdial.conf, com o seguinte conteúdo:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[Dialer Defaults]
Carrier Check = off
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = claro
Ask Password = 0
Check Def Route = 1
Phone = *99***1#
Idle Seconds = 0
Modem Type = Analog Modem
Stupid Mode = 1
Compuserve = 0
Baud = 460800
Auto DNS = off
Dial Command = ATDT
Modem = /dev/ttyUSB0
ISDN = 0
Username = claro

[Dialer claro3g]
Stupid Mode = on
Password = claro
Auto Reconnect = off
Username = claro
Phone = *99***1#

conecte-se com o comando:

1
# wvdial -C wvdial.conf

E você estará conectado, mas ainda não será possível acessar qualquer endereço da internet, devido aos endereços dos servidores DNS estarem incorretos, então você deve adicionar as seguintes linhas ao arquivo /etc/resolv.conf:

1
2
nameserver 208.67.222.222
nameserver 208.67.220.220

Agora você poderá acessar a internet normalmente.

No Ubuntu, a configuração foi mais fácil devido à versão do network-manager, ao conectar o modem ao computador, este foi reconhecido normalmente e um assistente de configuração foi aberto automaticamente. Tudo o que tive que fazer para acessar a internet foi adicionar as linhas acima no arquivo /etc/resolv.conf após estar conectado, e deve ser após estar conectado porque o network-manager sobrescreve o arquivo /etc/resolv.conf toda vez.

Você pode, também, adicionar os endereços dos servidores DNS nas configurações da conexão da Claro no network-manager fazendo o seguinte: Sistemas > Conexões de Rede > Banda Larga Móvel > Editar conexão da Claro > Configurações IPv4 e adicionar os IPs 208.67.222.222, 208.67.220.220 na linha dos Servidores DNS e aplicar as alterações, assim você não terá que adicionar aquelas linhas no /etc/resolv.conf toda vez que conectar.

:wq

Tags: , , , ,

No Comments


VIM as a syntax highlighting pager

I’ve been looking for a way to use less with syntax highlight and ended up in a page of Ubuntu Tutorials[0] website with a very good tip: Using VIM as a syntax highlighting pager[1].

All you’ll need is the package vim-full, só, in Debian-like systems, you’ll need to execute:

1
# aptitude install vim-full

Then, you’ll have to execute:

1
$ vim -u /usr/share/vim/vim72/macros/less.vim <FILE>

And you have it working!
NOTE: Depending on the version of your VIM, the path to less.vim might be different.

You can make this command simpler by creating an alias and adding it to your .bashrc file:

1
$ echo "alias vless=\"vim -u /usr/share/vim/vim72/macros/less.vim\"" >> ~/.bashrc

Now the system will need to re-read your .bashrc file, so the changes may be applied:

1
$ . ~/.bashrc

And after this you can test vless:

1
$ vless <FILE>

[0] http://ubuntu-tutorials.com
[1] http://ubuntu-tutorials.com/2008/07/14/use-vim-as-a-syntax-highlighting-pager/

:wq

Tags: , , , , ,

No Comments


Colored Man Pages

I found an interesting tip about coloring man pages in Jônatas’ blog (http://tupinigeek.blogspot.com/2009/07/man-pages-coloridas.html <- in Portugese). This is how you do it:

1 – Install most (http://www.jedsoft.org/most/index.html):
You can download most here: ftp://space.mit.edu/pub/davis/most/
or by executing the line bellow in debian-like systems:

1
# aptitude install most

2 – Export MANPAGER variable:
After this you’ll have to execute the line bellow:

1
$ export MANPAGER="/usr/bin/most -s"

Now you should have your man pages like this:

If you don’t want to export that variable everytime you restart your computer, you can add that line to your .bashrc file:

1
$ echo "export MANPAGER=\"/usr/bin/most -s\"" >> ~/.bashrc

Tags: , , ,

1 Comment



SetPageWidth