Os meus 10 anos com GNU/Linux

Hugo Pereira 3 April 2009 09:04
Faz hoje precisamente dez anos que comecei a utilizar o GNU/Linux. Na altura a banda larga ainda era um sonho, o que tornava difícil obter um CD de instalação. Na altura fiquei a saber, por um post colocado no pt.comp.so.linux, que tinha sido lançado um conjunto de quatro CDs com o RedHat 5.2 e uma série de aplicações, disponível nos quiosques portugueses. No dia seguinte adquiri a minha cópia, a qual instalei um dia depois (Sábado). Nesses primeiros tempos, passei do RedHat para o SuSE (do qual adquiri a versão oficial, com seis CDs), passando depois para aquela que se tornou a minha distribuição favorita, Slackware, que utilizei até ao Verão de 2006, altura em que adquiri um portátil que tinha que ter a funcionar rapidamente, no qual o Ubuntu funcionou bastante bem, pelo que ainda a mantenho.

LinkLinkPor estes anos fora, fui de um ávido utilizador da consola, para a facilidade dos actuais ambientes gráficos. Da compilação do kernel para conseguir gravar um CD, até à simples instalações point-n-click em que tudo fica a funcionar sem ser necessário qualquer tipo de intervenção. Das guerras entre quem defendia a utilização da consola de modo exclusivo, contra quem achava que o futuro estava nas interfaces gráficas, agora substituídas pelos argumentos sobre qual o melhor ambiente Desktop, GNOME ou KDE. Da impossibilidade de se utilizar simultaneamente a unidade Iomega Zip com ligação pela porta paralela (ainda se lembram das fabulosas disquetes de 100MB? Afinal nunca chegaram a substituir as disquetes convencionais, que só desapareceram com a chegadas das memórias flash USB) e a impressora (no kernel 2.0, resolvido na série 2.2), até à existência de um suporte para quase todo o hardware existente. Foi um longo caminho de eterna melhoria.

Quero deixar aqui o meu agradecimento a todas as pessoas que contribuiram para a minha satisfação enquanto utilizador desde espectacular Sistema Operativo, que sempre preencheu em pleno todas as necessidades que tive... e satisfez a minha vontade de estar sempre a aprender. Espero que na próxima década traga pelo menos tanta evolução ao GNU/Linux como a que aconteceu até agora!

Installing Ubuntu Linux

Hugo Pereira 25 October 2008 14:10
This days everybody are trying Linux. I'm using GNU/Linux systems (mostly Slackware) for almost ten years, and I've never seen any installer simpler than the Ubuntu (based on the Debian Installer). If your haven't yet start using a Linux system, just take one minute and read this small installation guide. Please make a backup of all your important files of your old system.

First, download the CD image from http://www.ubuntu.com. Make a CD from it (read this if you need help). Now, reboot your computer with the CD inserted. Choose the "Start or Install Ubuntu" option.

Wait some minutes while it loads. From the start, you will have a full working Linux. Try some of the applications, get a feel of who it works. As you can see, it's a very friendly operating system. So, why not installing it? Is as simple as double-clicking in the Install icon that is placed in the Desktop.

The installer will start. First, you have to select your language, location (to set the timezone) and keyboard layout. With this, you have completed the three first steps of the installation.

Next is time to get some room in your hard-disk to install your new Linux. If you have already another operating system installed, and you want to keep it, just say how much space you want to devote to the new system. If you want to use the entire disk (and lost all the data you have on it), choose the option “Guided – use entire disk”. Or, if you have some experience with disk partitions, choose “Manual”. If you have choose the first option, click on the “continue” button in the following warning message.

If you have choosed the first option, click on the “continue” button in the following warning message.

If you have some popular operating system installed, you will have the opportunity to migrate your data to the new installation, so that some of your data and preferences will be copied to your Ubuntu desktop. After that, you will have to insert your name, choose a login and a password, that you will use to enter in the system, and give your computer a name (or keep the suggested).

Click “Forward”. You are ready to start the installation. Just press “Install”, and wait some minutes.

And finally... click on “Restart now".

Wait a little more and remove the CD when prompted. From now on you will have a menu when booting. From them, you can choose if you want to start your new Ubuntu Linux system, or your old operating system. Simple choose Ubuntu (will be the first choose), and... Welcome to the Linux World.

As always, use this information at your own risk. I'm not responsible for any data lost. Always keep a backup of all your important files.

Create an encrypted disk with Ubuntu

Hugo Pereira 25 October 2008 14:10
Are you working in a secret project? Writing a book that can't be read until finished? In this post I will explain a simple way to create a encrypted disk using Ubuntu, where you can keep a backup of your private files. I've tested all the steps using a small USB flash drive, but use them at your own risk.

First you need to install the cryptsetup package:

sudo apt-get install cryptsetup

Now is time to plug your flash drive. To know the device associated with your drive, you can use the mount command (in my case, /dev/sdc1). You will see something like this:

/dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077)

So, in my case is the /dev/sdc1. Now is time to format the partition and create a password, using the luksformat command, choosing the file system. I will use ext3. So, type the following:
sudo luksformat -t ext3 /dev/sdc1

You will see a message like this:

WARNING!
========

This will overwrite data on /dev/sdc1 irrevocably.
Are you sure? (Type uppercase yes):

Type YES. At this point you will lost every data in that partition. Now you will have to insert a password, that will be used do unlock your device.

Enter LUKS passphrase:
Verify passphrase:

Please enter your passphrase again to verify it

Enter LUKS passphrase:

Now you will have to way until the partition until the format operation and the file system is created. After that, you can remove the device and insert then again. A window like this will appear:


Type the password and press Connect. The encrypted partition will be mounted.

If you have used the ext3 file system (like in my case), you will have create a directory in you flash drive using the superuser, and change the permissions. Use the mount command again, to see where the partition have been mounted:

/dev/mapper/luks_crypto_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx on /media/disk type ext3 (rw,noexec,nosuid,nodev)

In this case, the partition have been mount on /media/disk, so just make something like this:

cd /media/disk
sudo mkdir osmeusficheiros

sudo chmod 777 osmeusficheiros/

Now you can start using your new encrypted disk to save your important stuff. Don't forget that there's no perfect backup device, and one day or another your device may fail, so keep more than one copy of your data. For more information, visit the LUKS website.

Disable Touchpad in GNU/Linux

Hugo Pereira 25 October 2008 14:10
Sometimes, while typing, I touch in the touchpad, the pointer moves and the cursor goes to another place in the text. I really hate that. Soo... who to disable the touchpad while typing?

It's simple. In GNU/Linux you can use a small application called syndaemon. With that, you can specify the time between the last key press and the next accepted mouse click.

First, as root, edit the file /etc/X11/xorg.conf, and add, in the Input Device section, the SHMConfig option, with the on value, like this:

Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "SHMConfig" "on"
EndSection

Now, save the file and restart the X.Org. The fastest way to restart it is pressing ctrl+alt+backspace (before doing this, make sure that you have closed all applications running and saved any document you may be using).

After that, open a terminal, and type:

syndaemon -i 1 -t -d

The -i switch specify the amount of time (in seconds) between the last key press and the next accepted mouse click (the default is two seconds). The -t switch disables the click and scrolling features. That way, you can still move the pointer. The last switch, -d puts the application running in the background (as a daemon). You can run this command every time you start your session. In the gnome, go to System -> Preferences -> Sessions and add it.

Gaim 2.0beta6

Hugo Pereira 25 October 2008 14:10
For those having problems with gaim 2.0beta3.1 present in the Ubuntu 6.10 (like frequent crashes), and want do install the lastest version without breaking future systems upgrades, and without installing third-part packages (of unknown quality), fallow this small tutorial that will teach who to install it on your home directory.

First, you need to download the latest version of gaim, from the official homepage, and installing the base Ubuntu packages for compiling it:

sudo apt-get install build-essential

Next step is download and installing the GNU TLS library development tools, needed to provide encrypted comunications with the instant messaging system (for more information go to the official homepage):

sudo apt-get install libgnutls-dev

Now that we have all the components, lets uncompress the files downloaded from the gaim site, and compile, like this:

tar xvfz gaim-2.0.0beta6.tar.gz
cd gaim-2.0.0beta6
./configure --prefix=$HOME --enable-gnutls=yes
make
make install

It will create some directories in your home directory, with all the files needed to run gaim. To run gaim, just type:

/home/yourlogin/bin/gaim

That's all!

A very interesting plugin is the guifications, that shows a little message on the right corner of your screen, when, for example, some of your friends is online. You can download the sources from where.

To install it, like with gaim, you need to uncompress the sources package and compile:

tar xvfz gaim-guifications-2.13beta6.tar.gz
export PKG_CONFIG_PATH=$HOME/lib/pkgconfig
./configure --prefix=$HOME
make
make install

Now you have the gaim with guifications! Just configure it and enjoy!

Firefox Extras

Hugo Pereira 25 October 2008 14:10
The Mozilla Firefox browser have a very nice feature: the ability to add extras to enhance your browsing experience. In this article I will show you some of them.

Keeping your browser bookmarks synchronized between your desktop and, for example, your laptop computer can be a problem. To help avoid it, there's an extra that give you the possibility to keep a backup of you bookmarks online. It's called Foxmarks. It's particularly interesting because you can keep you bookmarks in your own server or in the Foxmarks server. If you want something more powerful, you can choose the Google Browser Sync, that can keep your bookmarks, history, cookies and saved password in just one place.

If you think your page loading is getting slower and slower because of the flash ads, video ads, etc, you can just block then with Adblock Plus. Just install it, restart your browser, select one of the lists of ad providers, and it's done. But remember: the ads are the only way most of the sites have to pay the hosting bill, so, use with care!

There's lots of sites that requires a registration just to allow you to access some information. Sadly, some of them will sell your email information to spammers. To avoid it, you can use a fake email, temporary email, to just complete your registration, with this extension, that make the use of the spamavert.com accessible with just a mouse right click, and choosing the option "Show Spamavert address".

Extras para o Firefox (II)

Hugo Pereira 21 October 2008 21:10
Há algum tempo atrás destaquei um conjunto de extras que utilizava diariamente no Mozilla Firefox. Na altura sentia-me particularmente incomodado com o crescente número de anúncios publicitários em flash, que atrasavam o carregamento das páginas. Indiquei como solução o Adblock Plus, que eliminava por completo a exibição de publicidade. Apesar de ser eficaz, referi que este extra deveria ser utilizado com alguma reserva já que limitava a capacidade de sobrevivência de muitos sites, ou, pelo menos, o acesso gratuito aos conteúdos.

Felizmente encontrei um extra que me permite bloquear apenas estes grandes consumidores de tempo. Chama-se Flashblock e substitui todos os conteúdos flash por uma botão, permitindo que o utilizador escolha quais é que quer efectivamente ver.

Para quem quer estar sempre a par das últimas actualizações de sites noticiosos e não só, sugiro a utilização do NewsFox, o único leitor de feeds Atom e RSS que, pela sua simplicidade, me convenceu.

Com o inverno a aproximar-se, convém saber com alguma antecedência se vai ser necessário sair com guarda-chuva ou não. O Forecastfox permite ter sempre disponível a informação sobre o estado do tempo actual, assim como a previsão para os próximos dias, para que se evite ser apanhado de surpresa.

Mozilla Firefox portátil

Hugo Pereira 5 January 2008 13:01
Para quem, como eu, muitas vezes recorre a computadores diferentes para aceder a páginas web, e já se sabe que muitas vezes acabam por haver comportamentos diferentes conforme a configuração do browser em cada uma delas, encontrei a solução.

Trata-se de uma versão o Mozilla Firefox com algumas alterações para funcionar correctamente a partir de dispositivos de memória USB, que agora estão tanto na moda.

Podem aceder à página do projecto aqui (ou, futuramente, aqui). Mas o autor não ficou por aqui, e também disponibiliza o Thunderbird, também para ser usado da mesma forma. E está aqui.

Notas sobre o Kanguru no GNU/Linux

Hugo Pereira 11 November 2007 22:11
Para quem está com problemas na utilização do Kanguru com o modem USB Huawei E220, experimentem colocar o cartão num telemóvel comum e retirar o PIN. Se mesmo assim não conseguirem ligação, iniciem o portátil sempre com o modem já ligado. Seguindo estes dois passos, parece que tudo já funciona bem (pelo menos com o kernel 2.6.20, parece que há algo que falha na detecção automática caso se ligue o modem já com o computador ligado). Sugiro, para quem quiser ajuda na configuração de forma gráfica, estas instruções. Para ligar, basta fazer click no icon do network-manager e escolher a opção de ligação por modem:


No meu caso a ligação funciona tanto utilizando como número *99# como *99***1#, mas no primeiro caso parece haver a tendência para a obtenção de endereços de DNS inválidos.

A Consola do GNU/Linux

Hugo Pereira 6 October 2007 19:10
Há uns anos atrás, quando comecei a utilizar o GNU/Linux, havia a ideia de que quem utilizava o ambiente gráfico não era um utilizador de segunda.

Em cerca de uma década esta ideia mudou, mas a verdade é que nessa altura todos se esforçavam muito para aprender a utilizar a consola. E, sejamos sinceros, é verdadeiramente poderosa. Nos sistemas UNIX não há nada que não se possa fazer utilizando apenas o teclado.

Para o crescente número de utilizadores que só descobriram as maravilhas dos sistemas UNIX numa era em que a guerra deixou de ser entre o ambiente gráfico vs consola para passar a ser mais entre qual o melhor desktop, se o KDE ou GNOME, ou entre um dos sistemas mais leves, como o XFCE, ou utilizando apenas um gestor de janelas, deixo aqui um site onde são descritos os comandos básicos da linha de comandos do GNU/Linux (neste caso utilizando a bash).
‹‹ previous 1 2 3 next ››