Ubuntu hardy
De Guia Ubuntu PT
* Em Desenvolvimento e Tradução * Ajuda agradecida
http://ubuntuguide.org/images/b/b2/Ubuntuguide_logo.png
Guia não oficial para iniciantes do Ubuntu 8.04 (Hardy Heron)
Ubuntu Hardy Heron, o sucessor do Gutsy Gibbon foi lançado no dia 24 de Abril de 2008. Por favor ajude testando este guia.
Este guia foi começado por Chua Wen Kiat (Kuala Lumpur, Malásia). Neste momento está a ser mantido pela Universidade da Letónia e todos estão convidados a contribuir.
Este guia pode ser discutido no fórum oficial UbuntuGuide.org Forum em ubuntuforums.org. Entre na discussão.
Pode encontrar no GuiaUbuntuPT.org um wiki com mais guias e informações para o ajudar.
Para editar páginas precisa de se registar -- register
Se tiver alguma dúvida, envie um e-mail para ubuntuguide -at- ubuntuguide.org
Prefácio
Sobre Hardy
- Em 24 de Abril de 2008 o Ubuntu 8.04 foi lançado.
- Foi apelidado de Hardy Heron e é o sucessor do Ubuntu 7.10 Gutsy Gibbon.
- Hardy é uma versão LTS (ou Long Term Support), e por isso vai ser apoiada por três anos em desktop, e cinco anos em servidores - mais do que o normal que são 18 meses.
Como descobrir que versão do Ubuntu estás a usar
Usar o comando:
lsb_release -a
Como descobrir qual a versão do Kernel do Ubuntu que estás a usar
Usar o comando:
uname -r
Novas versões do Ubuntu
- Ubuntu tem um período de 6 meses entre o lançamento de cada nova versão
- Os lançamentos ocorrem geralmente em Abril e Outubro
- Espera-se que a nova versão seja lançada dia 30 de Outubro de 2008 e será o Ubuntu 8.10 (Intrepid Ibex) que será Hardy+1.
- Hardy Heron é uma versão LTS (Long Term Support) e será suportada com updates regulares por cinco anos em servidores e por três anos em desktop.
Sobre o Ubuntu e as distribuições oficiais baseadas nele
Ubuntu 8.04 Guias e Links
- Website oficial do Ubuntu
- Official About Ubuntu Page
- Fóruns oficiais do Ubuntu
- Wikipedia: Ubuntu (Linux Distribution)
- Ubuntu Geek includes Tips,Howtos,Tutorials and Articles about Ubuntu Linux
Screenshots do Ubuntu
Ubuntu 8.04 Screenshots Gallery
Conhecimento útil
Esta secção contém informação que poderá servir de assistente no decorrer do resto do guia.
Utilizando a consola / terminal / shell
Todos os termos referidos acima referem-se à mesma coisa - uma interface de linha de comandos que pode ser usada para controlar o sistema como alternativa à interface gráfica. Muitas das acções neste guia podem ser feitas através do ambiente gráfico, mas por vezes é bastante mais simples a explicação de algumas tarefas se estas forem executadas na consola.
Para abrir a consola:
Aplicações --> Acessórios --> Consola - isto abrirá uma janela onde é possível escrever.
Qualquer comando que comece por 'sudo' significa que está a ser executado como administrador do sistema (ou root), e como tal, irá sempre pedir a password do utilizador.
Ler o manual de um comando ou programa - Manpages
A maioria dos programas e comandos vêm com as suas "manpages", um manual de utilização.
Pode ver o que o comando faz escrever no terminal, por exemplo:
man apt-get
ou
man gedit
É muito útil para saber o que faz um comando antes de o utilizar.
Mantendo o sistema actualizado
É importante ter um sistema actualizado, por isso nós temos os últimos patches, reparações de segurança e actualizações de pacotes nos repositórios.
Primeiro, vamos ao menu:
Sistema --> Administração --> Fontes de Aplicações
e verificar se todos os repositórios estão activos.
Depois, abrimos a consola:
Aplicações --> Accessórios --> Consola
e escrevemos:
sudo apt-get update
O sistema vai pedir uma password. Tu NÃO vais conseguir ver a password a ser digitada (por razões de segurança), mas o sistema irá reconhecer o que tu estás a escrever.
sudo apt-get upgrade
sudo apt-get dist-upgrade
E está tudo terminado.
Instalando pacotes (programas) e bibliotecas
No Ubuntu há duas maneiras de instalar pacotes no sistema.
Podes instalar pacotes através da consola ou através do Synaptic Package Manager
A.Como instalar um pacote com o APT - através da consola
Abre a consola
Aplicações --> Acessórios --> Consola
Apt é o Debian Package Manager e também é usado no Ubuntu.
Agora, vamos instalar o pacote escrevendo o seguinte:
sudo apt-get install pacote
por exemplo, Amarok, um reprodutor de música:
sudo apt-get install amarok
Isto é tão simples como se pode ver.
Às vezes é necessário remover pacotes.
Escrevemos:
sudo apt-get remove pacote
Por exemplo, se desejamos remover exaile music player, escrevemos:
sudo apt-get remove exaile
Apt verifica as dependências do programa automaticamente quando o removemos ou instalamos.
B. Como instalar um pacote através do Synaptic - Graficamente
Abrir o menu:
Sistema --> Administração --> Gestor de pacotes do Synaptic
Podes instalar qualquer pacote que queiras fazendo uma simples pesquisa, carregando no botão de procurar.
Ai terás uma lista dos pacotes com uma caixa vazia à esquerda. Clicas e entrarás dentro do queue para a instalação.
Agora carregas em "Aplicar" e o Synaptic instala o pacote calculando primeiro as dependências.
Procurando por um pacote/programa
Existem quatro formas de encontrar um pacote nos repositórios. Todos eles são de fácil execução.
A. Como encontrar um pacote no Synaptic
Abrir o Synaptic:
Sistema --> Administração --> Gestor de pacotes do Synaptic
e clicar no botão procurar. Aí terás um espaço vazio onde preenches com o que queres procurar no Synaptic.
B. Como seleccionar o servidor mais rápido no Ubuntu
Se desejas seleccionar o servidor mais rápido próximo da tua localização vê this simple Tip
C. Como encontrar um pacote via internet
Abre o teu navegador WEB favorito e vai a:
http://packages.ubuntu.com/
Se estás interessado em a. http://packages.ubuntu.com/hardy/ , b.http://packages.ubuntu.com/hardy-updates/ , c.http://packages.ubuntu.com/hardy-backports/ , d.http://packages.ubuntu.com/hardy-backports/main/newpkg
D. Como encontrar um pacote via APT
Abrir a consola:
Aplicações --> Acessórios --> Consola
Se queres procurar um pacote chamado, por exemplo, "pack-age" escreves:
apt-cache search package
Como no Synaptic, que usa o apt-cache search graficamente, tu encontrarás pacotes com as palavras que digitaste.
Se estás à procura de um reprodutor de música escreve:
apt-cache search music player
E. Como encontrar um pacote no Aptitude
Aptitude é o "terminal alter-ego of Synaptic". Existe uma opção "Search" na barra de menu no topo. Tu deves clicar nela ou navegar até lá com o teclado.
Eu instalei um programa, mas ele não aparece no menu "Aplicações".
Felizmente isto começou a ser de fácil resolução desde o Gnome 2.12
Podes clicar com o botão direito do rato na barra de menu e escolher a opção "Editar Menus" e editar o conteúdo do menú.
No caso de teres problemas a aceder ao editor, abre a consola e escreve:
alacarte
A partir daqui conseguirás editar os menus do topo do ecrã, e adicionar novos items para ter acesso a novos programas (presumindo que sabes onde estes estão instalados). Se estiveres com problemas, tenta:
locate nomedaaplicação
Isto deve-te indicar as possíveis localizações.
Placas Gráficas e displays
Installation of both ATi and nVidia Graphics drivers
There are three available methods - the first ensures you are always running the latest version of the drivers, and the second is marginally simpler. The third one is an alternative method for those that have older ATi GPU installed. The last one is for those that own the latest ATi cards (2xxx and 3xxx generations) and can't have appropriate display with the latest ATi drivers (via EnvyNG) or with the repository driver.
A. Ultimo driver de instalação com EnvyNG (ATi & nVidia)
Leia primeiro faq: http://albertomilone.com/envyngfaq.html#A
Abra um terminal e escreva :
sudo apt-get install envyng-gtk
Depois de reiniciar, as drivers devem estar instaladas e funcionais.
B. Repository Driver installation (ATi & nVidia)
Navigate to:
System --> Administration --> Hardware Drivers
and there you'll see your Graphics Card and an option for installation of its drivers.
Choose it and the press "Apply". It shall install the repository driver - a reboot may be required.
(Applicable for both ATi/AMD and nVidia)
C. ATi Open Source radeon driver (ATi only)
Navigate to https://help.ubuntu.com/community/RadeonDriver
for more instructions.
D. RadeonHD driver (ATi only)
Check with Synaptic Package Manager for
xf86-video-radeonhd
package.
Always make sure that you don't have another ATi driver installed.
More info: http://www.phoronix.com/scan.php?page=article&item=842&num=1
E. Fix for Video Playback Problem in Compiz-Fusion
While running Compiz-Fusion, You wouldn’t be able to see any video play while either moving the window, viewing desktops in expo, 3d cube, or any other cool effect for that matter; instead you would see a blue screen, including when viewing in full screen.
Try This fix
Configuring multiple monitors with a nVidia graphics card
Install the nVidia graphics control panel:
sudo apt-get install nvidia-settings
And then run the configuration utility:
sudo nvidia-settings
You should be able to configure all your monitors, set them to seperate resolutions, and change their positioning relative to one another. When you are finished, make sure you click 'Save to X Configuration File'. It is possible that you may have problems with the boundries of monitors; logging off and back on again should resolve this.
Como instalar suporte multimedia no Hardy Heron
Instalar Codecs
Abrir a consola e escrever :
sudo -s -H
ou
sudo -i
e por a password do utilizador.
Depois disso :
apt-get update
apt-get upgrade
Para ficar actualizado. Por favor verifica se todos os repositórios estão activos nas fontes de software.
Depois estes comandos :
apt-get install gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg libxine1-ffmpeg libdvdread3
Agora tens a maioria dos codecs que necessitas para a maioria dos formatos multimedia.
Instalar suporte DVD
If you want to install codecs in i386 and 64 bit check This
At the console, type:
sudo gedit /etc/apt/sources.list
Αnd paste in the end of the file the below:
## Medibuntu - Ubuntu 8.04 "hardy" ## Please report any bug on https://bugs.launchpad.net/medibuntu/ deb http://packages.medibuntu.org/ hardy free non-free
save the document and then in the terminal type:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
in order to receive the appropriate key.
Finally, at the terminal, type:
sudo apt-get update sudo apt-get install libdvdcss2
Pulseaudio
On Xubuntu, you may experience some glitches with Pulseaudio like no sound at all after upgrading from Gutsy. The reason may be that the Pulseaudio daemon is not started. Take note that the sound server is not started at boot time (to reduce the risk of inter-user audio corruption), but at login time. So, you will have to add an entry to your autostarted applications for Pulseaudio. Here is an example:
:[Desktop Entry]
:Encoding=UTF-8
:Version=0.9.4
:Type=Application
:Name=Pulseaudio
:Comment=
:Exec=pulseaudio
:StartupNotify=false
:Terminal=false
:Hidden=false
Instalar leitor de multimedia VLC
Na consola, escreve:
sudo apt-get install vlc
Para remover,
sudo apt-get --purge autoremove vlc
If you encounter sound problems (due to PulseAudio ), type:
sudo apt-get install vlc-plugin-pulse
and choose PulseAudio as output in VLC options.
How to make VLC open when you insert a DVD
Totem is the default program for DVD-playback in Hardy, and the is no obvious way to change it. A lot of tips that worked in previous versions no longer work. The main problem is that VLC does not register itself as a DVD-capable application.
At the console, type:
cp /usr/share/applications/vlc.desktop /home/hildenae/.local/share/applications/vlc-dvd.desktop
edit the file
gedit ~/.local/share/applications/vlc-dvd.desktop
replace the line
Exec=vlc %U
with either
- 1. (all you really need)
Exec=vlc %f
- 2. (recommended settings from ubuntuforums for better dvd playback)
Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %f
- 3. (recommended settings from ubuntuforums for better dvd playback and automatic full screen playback)
Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 --fullscreen %f
Save the file and close gedit. At the console, type:
gedit ~/.local/share/applications/mimeapps.list
make the line «x-content/video-dvd=» under [Added Associations] read:
[Added Associations] x-content/video-dvd=vlc-dvd.desktop;totem.desktop;
Open Nautilus (default file manager), and navigate to Edit->Preferences>Media>DVD Video and select VLC media player (you should be able to choose between Totem and VLC)
Installing Amarok (a Music Player)
Whilst Amarok is a KDE/Qt application, it will work fine on Ubuntu, and can be installed by typing:
sudo apt-get install amarok
Installing Exaile (Amarok-like Music Player)
Exaile is a GTK, Amarok-like Music Player and it is very easy to install. In terminal, type:
sudo apt-get install exaile
Make sure you have the appropriate multimedia codecs installed.
Installing Pulseaudio Tools
This will install pulseaudio utilities such as individual application volume controls and audio server tools.
Open a Terminal window and type the following:
sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter libflashsupport
Run Pulseaudio Device Manager from the Applications > Sound and Video menu to access the tools.
Installing XMMS
Note: XMMS is no longer included in the package tree and must be installed from source. This guide is based on <http://blog.sartek.net/2008/04/install-xmms-on-ubuntu-804-hardy-heron.html>.
Be extra carefull. The installation of a package out of PMS (package management system, that means apt and its frontend, Synaptic) may be dangerous, since the system doesn't have a trace of the binaries that are installed after the compilation.
Be sure that you know very well what you do.
Instead of that you should consider of making a .deb package so that you may do an appropriate installation'
XMMS depends on a lot of packages; install them by typing the following into a terminal:
sudo apt-get install autotools-dev automake1.9 libtool gettext libasound2-dev libaudiofile-dev libgl1-mesa-dev libglib1.2-dev libgtk1.2-dev libesd0-dev libice-dev libmikmod2-dev libogg-dev libsm-dev libvorbis-dev libxxf86vm-dev libxml-dev libssl-dev build-essential make
Download the source from the XMMS website and unpack the .tar.gz:
http://xmms.org/
From a terminal move to the newly untarred director and type:
./configure --prefix=/usr
Compile the code:
make
Then install:
sudo make install
You can remove the untarred directory if you so desire. To make audio output work properly, you may have to change the output audio plugin to ALSA from the OSS driver. This is done by opening xmms and navigating through the Options-Preferences menus.
Systems and Network Monitoring
Install the Zenoss stack
Zenoss is a full-featured open source networking monitoring application. To install a version of Zenoss which includes all dependencies, first add the repository by typing:
sudo gedit /etc/apt/sources.list
Αnd paste in the end of the file:
## Zenoss - Ubuntu ## Please report any bugs at http://dev.zenoss.org/trac deb http://dev.zenoss.org/deb main stable
Save the file and exit. Then type:
sudo apt-get install zenoss-stack
Start zenoss:
sudo /etc/init.d/zenoss-stack start
Then in your browser, visit http://yourhost:8080, where yourhost is the FQDN of the server on which you installed Zenoss. Zenoss docs are available at http://docs.zenoss.com.
Internet e Desenvolvimento WEB
Install a LAMP server on a Desktop
LAMP stands for Linux, Apache, MSQL and PHP. You can install an integrated package that includes all four from the Synaptic Package manager (if you are using a Desktop Edition).
System-->Administration-->Synaptic Package Manager--> Edit-->Mark Packages by Task-->LAMP server -->Apply
Install a LAMP server for local web development
This will install Apache2, PHP5, MySql5, and PHPMyAdmin.
Firstly, type the following command at the console:
sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin
This will install all the necessary applications. You may be prompted to decide on a MySQL root password (set one if you want), and to configure PHPMyAdmin (select apache2 as the server type). After this is complete, we need to perform some minor configuration to get PHPMyAdmin working. Type:
sudo gedit /etc/apache2/apache2.conf
Scroll right to the bottom of the file that opens, and add:
# Enable PHPMyAdmin Include /etc/phpmyadmin/apache.conf
Now save, exit, and type:
sudo /etc/init.d/apache2 restart
Everything should now be configured - go to http://127.0.0.1 for webpages, and http://127.0.0.1/phpmyadmin for database administration. The webroot is located in /var/www/ by default. This is not particularly useful, as we do not have write access to this directory. Fortunately, this is easy to solve, by...
Adding a virtual host to your LAMP server
This allows us to access a different folder as our webroot from a different address in our browser - face it, 'localhost' or 127.0.0.1 is boring.
Start by adding a new host. This is easy to do via System --> Administration --> Network; click on the Hosts tab, select the localhost item from the list and click properties. You may need to click the 'Unlock' button and enter your password first. Underneath the entry 'localhost', on a new line, add your entry of choice; for example, we'll use 'testhost'. Add this, and close all the dialogs.
Now we need to edit a configuration file, so type into the console:
sudo gedit /etc/apache2/httpd.conf
In the resulting file (which may well be empty), add the definition for your host! My username is 'dan', and I want my webpages to be served from a directory named 'www' in my home, so I would add:
<VirtualHost *>
ServerName testhost
DocumentRoot /home/dan/www
</Virtualhost>
I can now add files to /home/dan/www, and access them by visiting http://testhost
Home Automation / Home Theater / Home Security
Complete Systems
Linux MCE
LinuxMCE is an integrated home theater/home security/home automation/telephone PBX/intercom system for your home. It is a community project that is a fork of the Linux Pluto commercial endeavour. There is a version that runs on Kubuntu 7.04 (Feisty) and a version for Kubuntu 7.10 (Gutsy). A version for Kubuntu 8.04 (Hardy) is due out soon. It is available in 32 and 64 bit versions. LinuxMCE can run either as a standalone Home Theater PC or can co-ordinate a fully networked home, using the networking capabilities that are intrinsically part of the Kubuntu Linux OS. For more info see the LinuxMCE website.
LinuxMCE can be installed at the same time as the Kubuntu OS, on a new PC with an Nvidia graphics card (6000, 7000, or 8000 series), from a single DVD.
LinuxMCE can also be installed as an add-on package to an existing Kubuntu system, using the LinuxMCE 2 CD installation. You will need a Kubuntu LiveCD for your installation, even if you already have a full Kubuntu installation in place. (The LinuxMCE installation uses the Kubuntu LiveCD for additional modules.) Note that the LinuxMCE version must match the Kubuntu version -- i.e. the LinuxMCE 710 version CDs require the Kubuntu 7.10 (Gutsy) Live CD.
With the 2 CD installation, it is possible to run Kubuntu separately from LinuxMCE on the same PC, but it is recommended to dedicate at least one PC to LinuxMCE as a Core server.
LinuxMCE incorporates MythTV, Pluto home automation, Motion security surveillance, Asterisk PBX, VDR video disk recorder, and other home automation/security/theater packages in an integrated platform.
At this time, the automatic installer for Linux MCE uses the KDE desktop (Kubuntu). There are users that have made Linux MCE work with the Gnome desktop (Ubuntu) and other Linux distributions, but it is recommended to stick with the Kubuntu OS, as required by the LinuxMCE automatic installation.
PVR (Personal Video Recorder)
Mythbuntu
Mythbuntu is an Ubuntu-based derivative (based on the Xubuntu (XFCE) desktop) that is meant to function as a standalone PVR, based on MythTV. It can be used, however, with a Gnome (Ubuntu), KDE (Kubuntu) or XFCE (Xubuntu) desktop, which can be added at any later time.
Home Security
Zoneminder surveillance system
Zoneminder manages surveillance cameras and stores images on the hard disk. Images can be viewed using a (LAMP) server remotely. X10 devices can be triggered using built-in perl scripts. For more info see the Zoneminder website.
- Read #General Notes
- Read #Install a LAMP server on a Desktop
- Detailed instructions that appear to work for Gutsy are at the Zoneminder Installation Wiki.
There is a Zoneminder package for Hardy (that was the package from Gutsy). You should be able to install the package from Synaptic Package Manager.
However, if that does not work, try the instructions that worked for Feisty:
- You must have the LAMP server installed. In addition, you will need additional modules:
sudo apt-get install ffmpeg libarchive-tar-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl sudo apt-get install libjpeg62 libmime-perl libstdc++6 libunwind7 libwww-perl zlib1g
- Download the .deb package from the package manager's website:
ftp://www.northern-ridge.com.au/zoneminder/ubuntu/edgy/zoneminder_1.22.3-8_i386.deb
- Install using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-8_i386.deb
- (Note: If some dependencies are still unsatisfied, make sure you have these packages installed):
sudo apt-get install libc6 libc6.1 libgcc1 libgcc4 libstdc++6
- (These should already be installed as part of the LAMP installation):
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 libmysqlclient15off mysql-client mysql-server php5 php5-mysql
If your installation is successful, you will now need to set up the configuration files and databases for Zoneminder.
- Copy the configuration file and restart the Apache2 server.
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf sudo /etc/init.d/apache2 reload
- View Zoneminder from your web browser:
http://localhost/zm
- Set up a MySQL database for Zoneminder
- If this is the first time you have used MySQL, the default global MySQL superuser root will not have a password. You should set one now. Instructions for setting mySQL initial privileges are here.
- In short:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
- In addition, you can set up an additional global MySQL user (such as mysql_user, for example) by following the instructions here. That way you can reserve root login for emergencies.
- In short:
mysql -u root mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd'; mysql> quit
Now you must create a MySQL database for use by Zoneminder. This is an administrative MySQL command, so you must use one of your global MySQL users (either root or mysql_user, as created in the example above). You can name your Zoneminder database anything you want, instead of zmdatabase.
mysqladmin -u root -p CREATE zmdatabase
or
mysqladmin -u mysql_user -p CREATE zmdatabase
Create users for the Zoneminder database. As always, I create a root user for emergency use. I use the same password for root as I do elsewhere on my system. Then I also create a user named zm_user (but you could also creat a user named mysql_user, to keep everything consistent). [I use a unique user here because this is a home security system, after all, and I don't want it breached.] These users are specific to this database; they can be the same users as used elsewhere in the system or can be unique users.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'zm_user'@'localhost' IDENTIFIED BY 'password'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'root'@'localhost' IDENTIFIED BY 'password'; (I used my usual root password here). mysql> quit mysqladmin reload
Note: mysql commands (i.e. any entered at the mysql> prompt) must end with a semicolon. If you forget the semicolon, nothing will happen.
Myth Zoneminder
MythZoneminder allows you to view your security cameras through Myth TV, essentially. It is a plugin that interfaces the two packages Zoneminder (which must be working on your system) and Myth TV (which must also be working.) It can be found in Synpatic Package Manager as the mythzoneminder package.
See the installation instructions.
How to restore GRUB to a partition or MBR with an Ubuntu Live CD
Sometimes, if an Ubuntu installation goes wrong, or a Windows NT bootloader overwrites MBR and doesn't recognise the Linux installation, we have to restore our GRUB bootloader that is, generally, very flexible.
First of all, we burn a Hardy Heron (Ubuntu 8.04) ISO (on a CD(R , RW) or DVD (+R , +RW)) or make sure that we have one already.
Then, we change, in the BIOS, the boot load sequence and we put the CD/DVD option first.
After that, we boot the Live CD, we choose the first option and in a few minutes we have arrived at the Live CD Desktop.
So, we go :
Applications --> Accessories --> Terminal
Then, we have to remember which is our Ubuntu installation partition.
In our example, it is the second one (/dev/sda2), formatted as ext3, in the first HDD of a SATA controller. We suppose that it is the second one, since, in case we have Windows that demand to be in the first partition (/dev/sda1), this one is occupied.
Now, you have to be really careful. You have to enter the right partition, instead of sda2 (unless it is the same) In the terminal :
cd / sudo -s -H
mount -t ext3 /dev/sda2 /mnt
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash
And now, you are actually "running" Ubuntu within the Hard Drive but through Live CD's terminal.
Now we restore GRUB like that:
1) Restoration to MBR
grub-install /dev/sda
2) Restoration to partition (example: /dev/sda2)
grub-install /dev/sda2
In the first case (that is the most usual) you have certainly installed GRUB on MBR after you receive, in the terminal, the message that there are no errors.
After you reboot, you have your favorite bootloader restored.
Encrypt home partition with cryptsetup & LUKS
First step is to backup all necessary data, if something goes wrong your data will be lost in the process if it's not backed up. Also note that your home folder needs to be located on a separate partition than your root partition, if not see #How to make partitions.
Second, install necessary software:
sudo apt-get install cryptsetup
Insert the new module, dm-crypt into the kernel:
sudo modprobe dm-crypt
Check to see what encryption schemes are available:
cat /proc/crypto
If only MD5 is listed, try inserting the appropriate modules into the kernel:
sudo modprobe serpent
Above is an example, this could also be twofish, blowfish or anything other crypto module that you would like to use.
The following commands will assume that your home partition is /dev/sda1, please change it to match your own configuration.
Next step we use cryptsetup to change the partition with the luksFormat option, this command will cause you to lose all data on /dev/sda1.
sudo cryptsetup luksFormat -c algorithm -y -s size /dev/sda1
Where algorithm is the algorithm that you chose above such as serpent aes, etc.
Size is the key size for encryption, this is generally 128 or 256. Without specifying the algorithm or the size, I believe it defaults to AES 256, more information and additional options can be found by reading the man page. The above step will ask you to choose a password and verify it. Do not forget this password.
We can then use the luksOpen option to open the encrypted drive.
sudo cryptsetup luksOpen /dev/sda1 home
Home is a nickname which cryptsetup uses to refer to /dev/sda1. It also creates the device /dev/mapper/home, this is what you would actually mount to access the filesystem. If you specify another name other than home, it will create the device /dev/mapper/[name], where [name] is the nickname that cryptsetup will use. This step will ask you for your LUKS passphrase, this is the password you created in the previous step.
Next, we create the actual filesystem on the device. I use reiserfs, but it could just as well be ext3.
sudo mkreiserfs /dev/mapper/home
Or
sudo mkfs.ext3 /dev/mapper/home
Next step is to mount your encrypted device and copy your files back to your home directory.
mkdir new_home sudo mount /dev/mapper/home new_home cp -r * new_home
Now we have to set up everything so that it's ready to go at boot, we need to tell the system that there are encrypted disks that we want mounted.
gksudo gedit /etc/crypttab
Enter the following as one line at the end of the file.
home /dev/sda1 none luks,tries=3
remember home can be any name that you want, just remember that this maps to /dev/mapper/[name]. The option tries=3 allows 3 tries before a reboot is required or the disk is not decrypted.
Next enter the device info in fstab that we want to mount on boot.
gksudo gedit /etc/fstab
Enter the information as one line at the end of the file.
/dev/mapper/home /home reiserfs defaults 0 0
Remember to substitute /dev/mapper/home with your device /dev/mapper/[name], /home is the mount point, since this is our home directory, reiserfs is the filesystem type, put ext3 if you formatted it as ext3. For now the default options should be good, change this if you need/require something else. Also, now is a good time to remove the old /dev/sda1 device entry so that fstab doesn't try to load it at boot. This can be accomplished by commenting out the /dev/sda1 line or deleting it.
Final step is to make sure that the proper modules are loaded at boot time.
gksudo gedit /etc/modules
Now add dm-crypt and the crypto module that you used earlier, such as serpent, aes, etc. Each needs to be on its own line.
dm-crypt serpent
That should be it, all that's required is a reboot. During the reboot process, the computer will say "Starting early crypto disks" and ask for your passphrase. If the passphrase is accepted, it will unlock the encrypted partition and mount it on your specified mount point.
Aliases
You can change the way you enter a command in order to be executed by entering an alias.
For example, you may enter in a terminal "update-system" (a command that in face doesn't exists) that replaces "sudo apt-get update". You can do the same thing for other commands.
This is what you do. Our example is going to be the alias of the command
ls -FCal --color=auto
that shows with colours and many details the contents of a folder.
Open a terminal
Applications --> Accessories --> Terminal
and enter
gedit ~/.bashrc
Be carefull now. Don't erase anything there.
Now, go to the end of the document and enter
alias ll="ls -FCal --color=auto"
As you can see, now with the command
ll
whenever we want, we call, in fact, this one
ls -FCal --color=auto
You can do the same thing for other commands that need a lot of switches.
Save the document, close the terminal and reopen it. You may now check your new alias.
Truques & Dicas
Mudar a cor do splash screen
Originally a brownish color to match the Ubuntu theme, it does not quite fit with other themes and might want to be changed. Enter the gdm.conf file (sudo gedit /etc/gdm/gdm.conf). About two-thirds of the way down you will see the lines:
BackgroundColor=#dab082 GraphicalThemedColor=#dab082
Change it to what you like. For all black, use:
BackgroundColor=#000000 GraphicalThemedColor=#000000
Mudar o tamanho de definição da Consola
The default size of the Terminal window is around 80 columns wide and 24 columns high. To alter this, edit the file /usr/share/vte/termcap/xterm. You can use the following command:
sudo gedit /usr/share/vte/termcap/xterm
Just a few lines from the top will be the line reading:
:co#80:it#8:li#24:\
Change the number right after co# to change the width. Change the number right after li# to change the height.
Como fazer partições
É muito fácil criar partições no Ubuntu .
Abrir a consola e escrever:
sudo apt-get install gparted
Depois navegar a:
Sistema --> Administração --> Editor de Partições
Depois o gParted vai verificar os teus discos e partições.
A seguir tu podes modificar as tuas partições.
Mais informação em :
1) Utilização do gParted (também distribuido como Live CD) -->http://howtoforge.com/partitioning_with_gparted
2) Como separar a tua partição /home no Ubuntu --> http://www.psychocats.net/ubuntu/separatehome
Como activar o Compiz Fusion no Ubuntu
In Ubuntu Hardy Heron, Compiz Fusion is already installed and is automatically enabled after you have installed your graphics' card drivers.
The only thing you have to do is to install the Compiz Configuration Settings Manager.
Open a terminal and type:
sudo apt-get install compizconfig-settings-manager
and it shall be installed. After that navigate to:
System --> Preferences --> Advanced Desktop Effects Settings
and there you may enable/disable any plugin you want.
Add-on Applications
Wine
Wine is a Windows Win32 binary compatibility layer for Linux. Latest install instructions are always at: WineHQ.org
Add repository key:
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
Add repository to apt sources:
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list
Update apt sources:
sudo apt-get update
Install Wine:
sudo apt-get install wine
The program menu then appears in Programs under Wine, or double-click a Windows/DOS .exe file.
Unison - file synchronization tool
Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.
Nice Installation and Usage Guide check This
PlayOnLinux
PlayOnLinux is a Wine frontend which simplify installation and launch of many Windows programs, particularly games.
Add repository key:
wget -q http://playonlinux.botux.net/pol.gpg -O- | sudo apt-key add -
Add repository to apt sources:
sudo wget http://playonlinux.botux.net/playonlinux_hardy.list -O /etc/apt/sources.list.d/playonlinux.list
Update apt sources:
sudo apt-get update
Install PlayOnLinux:
sudo apt-get install playonlinux
Tor,privoxy and Tor GUI (Vidalia)
Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world:
If you want to install and configure tor follow This Guide
How to Sync your emails, files, bookmarks, and any other type of personal information
Conduit is a synchronization solution for GNOME which allows the user to take their emails, files, bookmarks, and any other type of personal information and synchronize that data with another computer, an online service, or even another electronic device.Conduit manages the synchronization and conversion of data into other formats.
If you want to install and configure in Ubuntu Follow This Tutorial
How to install applications for study of religious texts
- For study of Bible see GnomeSword
- For study of Quran see Zekr
How to install Gnomesword (Bible study program)
- Read #General Notes
- Read #How to add extra repositories
- This installs the english version of the program.
sudo apt-get install gnomesword sword-language-pack-en sword-text-web
- If you require other languages type:
sudo apt-cache search bible
- Take a look at the sword-language-pack's and the sword-text's for additional languages and install as needed.
Gnomesword is found under Applications-->Accessories.
- Under KDE, use kio-sword instead of Gnomesword:
sudo apt-get install kio-sword
How to install a Quran researching tool (Zekr)
Zekr is an open platform Quran study tool for simply browsing and researching on the Quran.
- Make sure that You have enabled universe and multiverse Ubuntu repositories: #How to add extra repositories.
- Install zekr with the following command:
sudo apt-get install zekr zekr-quran-translations-en ttf-sil-scheherazade ttf-farsiweb
- You can add more Quran translations from here.
- If you like to upgrade to the latest stable version of zekr, which supports Quran Recitation and advanced boolean/regular expression search, follow instructions available Zekr wiki.
Watching Live-TV On Your Ubuntu Desktop With Zattoo
Zattoo has developed a software program that allows you to watch TV on your computer. All you need is a broadband connection and a current operating system (Windows XP or Vista, Mac OS X, or Linux). The service is legal and free of charge.
If you want to install and configure Zattoo in ubuntu Check This Tutorial
How to upgrade from Hardy Heron to Intrepid Ibex (for developers and bug reporters only
ATTENTION: It isn't yet a safe way to upgrade to the next version of Ubuntu. The packages are still in experimental stage since the dependencies aren't ready yet. Newbies and pre-moderate users should not do anything and have to stay using their stable edition.All the testers should consider to do this in a testing environment (thus, a Virtual Machine , Wubi or Lubi(
A. Upgrading to Intrepid Manually
Until the first Alphas enter into the repositories, the update manager will never prompt you to install Intrepid Ibex with the command
update-manager -d
So you should do it manually by changing your sources.list file.
So, this is what we do:
1)Backup the sources.list file:
sudo -i cd /etc/apt/
cp sources.list sources.list.backup
so now we have it backuped.
2)We change the repositories:
You delete everything in the old sources.list file and paste these
deb http://archive.ubuntu.com/ubuntu/ intrepid main universe restricted multiverse deb http://security.ubuntu.com/ubuntu/ intrepid-security universe main multiverse restricted deb http://archive.ubuntu.com/ubuntu/ intrepid-updates universe main multiverse restricted deb http://archive.ubuntu.com/ubuntu/ intrepid-proposed universe main multiverse restricted deb http://archive.ubuntu.com/ubuntu/ intrepid-backports universe main multiverse restricted
in there.
You may now enter in the terminal:
sudo -i
aptitude update
Check now in Software sources that everything has changed to Intrepid. NO hardy repos should be there. If there are (in any case) disable them.
Enable all Intrepid repos.
Now in terminal
aptitude update
aptitude upgrade
aptitude dist-upgrade
aptitude upgrade
Every command should be done alone and you have to check continuously which packages have conflicts with the old ones and which ones are being removed.Be carefull: if important system packages are removed (libs, gcc , xorg packages, bash , ubuntu-desktop , gdm etc) you reinstall them (this could happen in case of meta-packages)
ATTENTION (again) : Everything sould be done by advanced users and ONLY in testing environment. These packages are unstable like those in [experimental] in Debian Sid/Unstable.
B. Upgrading to Intrepid automatically
When the first Alphas enter their way into the repositories, type in the terminal:
sudo update-manager -d
and then Ubuntu will automatically change your repositories.
Check yourself if the Hardy ones' are disabled.

