Dicas para o Ubuntu

Olá!

O objetivo dessa página é orientar usuários iniciantes do Ubuntu que desejam instalar e configurar o Ubuntu utilizando ao máximo o modo gráfico. Caso o uso do ambiente gráfico não for possível, as orientações buscam ser o mais simples possível, sempre voltadas aos iniciantes do Ubuntu. A versão utilizada do Ubuntu é sempre mais atual e estável de 64 bits.

segunda-feira, 28 de julho de 2014

Ubuntu num pen drive - como criar - Creating a Bootable Ubuntu in a USB Flash Drive

Ubuntu num pen drive

Obtido, traduzido, revisado e adaptado de: 

http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/

Nota para o Ubuntu 14.04.1 LTS: 
O Ubuntu Live CD não é apenas útil para experimentar o Ubuntu antes de instalá-lo, você também pode usá-lo para manter e reparar seu PC Windows. E com essa última versão LTS, você vai realmente ter um sistema operacional estável, com vários programas pesados instalados e funcionando sem qualquer interrupção. Se você não tem intenção de instalar Linux, tenha certeza de que vai trabalhar com Linux tranquilamente e sem necessidade de alterar nada em seu PC ou laptop. Além disso, todo do Windows deve ter uma unidade USB inicializável Ubuntu em mãos no caso de algo der errado no Windows




Prefira sempre baixar a última versão LTS (Long Term Support - suporte por longo prazo) - versão com suporte a programas e instalações estabilizadas, porque funcionam melhor no seu pendrive).
Criação de uma unidade flash USB (ou pen drive) inicializável é surpreendentemente fácil com um pequeno aplicativo independente chamado UNetbootin. Ele vai mesmo baixar o Ubuntu para você!

Nota: a última versão do Ubuntu vai ocupar mais de 1Gb em seu flash drive. Por isso, é preferível uma unidade flash com pelo menos 4 Gb de espaço livre, formatado como FAT32. O ideal é usar um flahs drive de 8Gb, porque poderá instalar vários programas como o editor de imagens Gimp, editores de vídeo, observadores do céu como o Stellarium (que roda melhor no Linux que no Windows) e muito mais. Este processo não deveria remover os arquivos existentes na unidade flash, mas para estar seguro que você deve fazer backup dos arquivos em seu flash drive e mantê-lo completamente vazio.

Instalando o Ubuntu no seu pen drive

UNetbootin não requer instalação prévia em seu PC. Basta baixá-lo em



e executá-lo diretamente com um clique sobre o arquivo.



sshot-1
Selecione a versão a ser instalada na opção 'Select Version'. Se seu PC/laptop tem processador de 64 bits, prefira instalar essa versão:


sshot-2


Na parte inferior da tela escolha o tipo de dispositivo onde vai ser instalado (no caso, USB Drive) e à direita escolha o a letra que corresponde ao drive onde o pendrive foi 'espetado'.




sshot-3


Clique em OK e UNetbootin vai começar a executar. Primeiro, ele irá baixar o Live CD do Ubuntu.


domingo, 20 de julho de 2014

Transformando seu laptop velhinho num roteador com o Ubuntu

 Bem galera, tenho uma internet 1 Mb via rádio no notebook (através de cabo - não há roteador) e estava procurando uma maneira de compartilhar essa internet com os meus aparelhos móveis - um galaxy Y e um Positivo Ypy, ambos Android. Vi que o Ubuntu tem uma maneira de criar rede sem fio nativa, mas me parece que é ad hoc (não sei bem o que significa), mas sei que os Androids não reconhecem. Tava quase comprando um roteador quando achei hoje um tutorial que resolveu meu problema: ele transformou o meu notebook em roteador.

   Transcreverei o tutorial, traduzindo (ele está em inglês) a meu modo, como eu fiz e deu certo.

   Já adianto que não tenho conhecimentos avançados, apenas segui os passos do tuto e deu tudo certo. Tente por sua conta e risco (como eu fiz).
   O endereço para quem quiser ver o original é:

 http://forum.xda-developers.com/showthread.php?p=38228707#post38228707
 
   Parece-me que funciona em qualquer máquina, desde que tenha a placa wireless (acho que não existe notebook que não tenha).

Passo 1: Verifique se seu adaptador wireless suporta infraestrutura hotspots.
  Abra o terminal e digite sudo lshw | less
  Encontre a seção -network do wireless (no meu note era a segunda, havia duas: a primeira era a rede cabeada). Confirme que o driver é ou ath5k ou ath9k (o meu é ath9k), se não for, não vai funcionar.

Passo 2: Instale 2 ferramentas adicionais para criar o hotspot: 1ª é o hostapd (servidor hotspot) e a 2ª é o dnsmasq (servidor dns dhcp).
  No terminal digite sudo apt-get install hostapd dnsmasq

Passo 3: Pare estes serviços se eles já iniciaram e impeça-os de iniciar junto com o sistema:
  No terminal digite:
sudo service hostapd stop
sudo service dnsmasq stop
sudo update-rc.d hostapd disable
sudo update-rc.d dnsmasq disable

Passo 4: Configure os arquivos:
  No terminal digite sudo gedit /etc/dnsmasq.conf
  Adicione as seguintes linhas no arquivo (pule uma linha após a última e cole o scipt)

# Bind to only one interface
bind-interfaces
# Choose interface for binding
interface=wlan0
# Specify range of IP addresses for DHCP leasses
dhcp-range=192.168.150.2,192.168.150.10

Passo 5: Configure o hostapd
   No terminal digite  sudo gedit /etc/hostapd.conf
   Adicione as seguintes linhas no arquivo

# Define interface
interface=wlan0
# Select driver
driver=nl80211
# Set access point name
ssid=myhotspot
# Set access point harware mode to 802.11g
hw_mode=g
# Set WIFI channel (can be easily changed)
channel=6
# Enable WPA2 only (1 for WPA, 2 for WPA2, 3 for WPA + WPA2)
wpa=2
wpa_passphrase=mypassword

Você pode alterar o nome que a rede wifi terá e senha nas linhas ssid e wpa_passphrase, respectivamente (no caso o nome da rede ficaria myhotspot e a senha mypassword).

Passo 6: Crie um arquivo de texto.
   No terminal digite gedit

   No arquivo cole o seguinte script

#!/bin/bash
# Start
# Configure IP address for WLAN
sudo ifconfig wlan0 192.168.150.1
# Start DHCP/DNS server
sudo service dnsmasq restart
# Enable routing
sudo sysctl net.ipv4.ip_forward=1
# Enable NAT
sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# Run access point daemon
sudo hostapd /etc/hostapd.conf
# Stop
# Disable NAT
sudo iptables -D POSTROUTING -t nat -o ppp0 -j MASQUERADE
# Disable routing
sudo sysctl net.ipv4.ip_forward=0
# Disable DHCP/DNS server
sudo service dnsmasq stop
sudo service hostapd stop

  Troque o ppp0 por eth0 (ou o número que se referir a sua conexão - confirme no 1º passo nas informações -network).
  Salve o arquivo (em qualquer lugar) com o nome start.sh

Passo 7 e último: Ligue seu hotspot iniciando o script criado.
  No terminal digite sudo sh "local do arquivo salvo"
  No meu caso ficou: sudo sh /home/julian/Área\ de\ Trabalho/start.sh (o arquivo eu salvei na Área de Trabalho mesmo).

Pronto! Liguei o wifi no smartphone e no tablet e funcionou. Fiquei muito alegre (não precisarei mais comprar o roteador, não para isso).


sexta-feira, 20 de junho de 2014

Decoding a dvd - libdvdread and libdvdcss2


Are you trying to rip a dvd but you're don't open a dvd? Probably you need a lib that decrypt the dvd. See this instructions:

Installing libdvdread on Ubuntu

Install the libdvdread4 package (no need to add third party repositories) via Synaptic or command line: (note: if you have installed *ubuntu-restricted-extras this has already been installed automatically for you)

open a terminal (alt+ctrl+t)

so, in the terminal, type:

sudo apt-get install libdvdread4
 
after installing,type: 
sudo /usr/share/doc/libdvdread4/install-css.sh
 
 

Installing libdvdcss on Ubuntu

With the demise of the Medibuntu repository and libdvdcss not being hosted in the main Ubuntu repos due to licensing issues a new repository is needed from 13.10 upwards. Thanks to the good folks at VideoLAN (makers of the awsome VLC Video Player) there is a ready and updated source available.

open a terminal (alt+ctrl+t)
then, type:

wget ftp://ftp.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add -
echo "deb ftp://ftp.videolan.org/pub/debian/stable ./" | sudo tee /etc/apt/sources.list.d/libdvdcss.list


sudo apt-get update


sudo apt-get install libdvdcss2

quinta-feira, 29 de maio de 2014

Fresh Player Plugin: Pepper Flash Wrapper For Firefox - Beta version

Install Fresh Player Plugin In Ubuntu Via PPA (Pepper Flash Wrapper For Firefox)

Not so long ago I was telling you about Fresh Player Plugin, a new wrapper that's currently in alpha, which allows Linux users to use Pepper Flash (which is bundled with Google Chrome) in Firefox and other NPAPI-compatible web browsers.

Firefox Fresh Player Plugin



Firefox Fresh Player Plugin

Well, in just over a week, Fresh Player Plugin evolved a lot and in my test, I actually didn't encounter any major issues: the sound works, video playback works with YouTube and other websites, full-screen videos work with multi-monitor setups, etc. (hardware acceleration doesn't work properly yet though!). So I've decided to upload Fresh Player Plugin to the main WebUpd8 PPA so you can test it easily and stay up to date with the latest code from GIT.

As a reminder, the latest Adobe Flash Player versions are available on Linux only through Google Chrome, while other browsers are stuck with version 11.2.

The Adobe Flash Player plugin that's bundled with Google Chrome is in the form of a PPAPI (or Pepper Plugin API) plugin and Mozilla isn't interested in adding support for it.

That's why Rinat Ibragimov decided to create this wrapper so Firefox users can use the latest Pepper Flash from Google Chrome.


Install Fresh Player Plugin in Ubuntu via PPA

Important notes:

    Fresh Player Plugin is installed under /usr/lib/mozilla/plugins/ and so it works with Firefox but it may not work with other NPAPI-compatible browsers. If you want to use it with some other web browser, you're on your own;
    the plugin is still in early alpha stages and even though in my test it seems that most stuff works, it may not work for you. Also, it probably only works with a limited number of websites right now. You should only install it for testing purposes for now!


1. Install Fresh Player Plugin in Ubuntu (via PPA), by using the following commands:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install freshplayerplugin

You can also download the deb from HERE but installing it without adding the PPA means you won't get updates!

2. Fresh Player Plugin is just a wrapper for libpepflashplayer.so so it needs this file which is bundled with Google Chrome. The easiest way to get this file is to simply install Google Chrome Stable - download it from here, then install it. That's it!

There are other ways of getting libpepflashplayer.so but I won't post installation instructions for all of them here. Instead, I'll just list them below:

    if you're using Google Chrome Unstable, create a symbolic link from /opt/google/chrome-unstable/PepperFlash to /opt/google/chrome/ or change add a freshwrapper.conf file and add the /opt/google/chrome-unstable/PepperFlash/libpepflashplayer.so path there - see step 3;
    you can install Pepper Flash using 2 other ways: via the installer available in the official Ubuntu 14.04 repositories and via the Pepper Flash PPA which is also available for older Ubuntu versions - once installed, then you'll need to create a symbolic link for Pepper Flash to /opt/google/chrome/PepperFlash/libpepflashplayer.so or see step 3 for how to change the path to it.


3. Optional (only use it if you want to tweak various settings): configure Fresh Player Plugin

Here you'll find an example Fresh Player Plugin configuration - to use it, save this file, rename it to "freshwrapper.conf" and copy it under ~/.config/

Use this configuration file to change the path to libpepflashplayer.so or to tweak the sound buffer if you have shuttering sound. Don't use it to enable hardware acceleration yet as it doesn't work properly for now!

The configuration options available in this file are pretty self-explanatory - you can configure the lower and higher bound for the audio buffer size, change the Xinerama screen used to acquire fullscreen window geometry (default: 0), change the path to libpepflashplayer.so along with command line arguments (like enabling hardware video decoding).

To report bugs or help with its development, see the Fresh Player Plugin GitHub page ->
https://github.com/i-rinat/freshplayerplugin

This article is from: http://www.webupd8.org/2014/05/install-fresh-player-plugin-in-ubuntu.html

The target of this post is just educational for poor communities surrounded São Paulo city, Brazil. There is no financial interests. If you get access to the original  article, please go there!

terça-feira, 20 de maio de 2014

A shockwave plugin for Firefox and others browsers - alpha version

Fresh Player Plugin: Pepper Flash Wrapper For Firefox And Other NPAPI-Compatible Browsers

 

 

As you probably know, the latest Adobe Flash Player versions are available on Linux only through Google Chrome, while other browsers are stuck with version 11.2.

The Adobe Flash Player plugin that's bundled with Google Chrome is in the form of a PPAPI (or Pepper Plugin API) plugin and Mozilla isn't interested in adding support for it.

For this reason, Rinat Ibragimov (who's also behind libvdpau-va-gl, a VDPAU driver that, among others, brings Adobe Flash Player hardware acceleration on Intel Graphics) has started working on a Pepper Flash NPAPI wrapper which aims to bring Google Chrome's Pepper Flash to Firefox, Opera, etc., called Fresh Player Plugin.

Fresh Player Plugin is in early alpha and still needs work! In my test with the latest Fresh Player Plugin from GIT, YouTube videos didn't play at all while DailyMotion videos worked but the sound was very choppy. So it can't really replace Adobe Flash for Firefox users yet but still, the project is very promising:

Fresh Player Plugin Firefox


Update: WebUpd8 reader hrv posted a comment below saying that both the video and sound worked on YouTube for him. So Fresh Player Plugin might be in a more advanced stage than I initially thought.

If you can help with its development, check out the Fresh Player Plugin GitHub page.

It's also worth mentioning, in case you didn't know, that Mozilla is working on its own Flash replacement: Shumway, which is open source and uses HTML5. But, like the new Fresh Player Plugin, Shumway needs a lot of work until it can fully replace Adobe Flash too.


Test Pepper Flash Plugin


Currently, to test Fresh Player Plugin (remember, it's in early development stages and its functionality is limited; it doesn't work with many websites, including YouTube!) you must build it from source. The instructions below are a rough guide on how to compile it in Ubuntu but it doesn't guarantee it will work so unless you have experience with building packages from source, I suggest you wait until Pepper Flash Plugin becomes more stable, then I'll upload it to a PPA.

1. Install the required dependencies:
sudo apt-get install build-essential git cmake pkg-config libglib2.0-dev libasound2-dev libx11-dev libgl1-mesa-dev liburiparser-dev libcairo2-dev libpango1.0-dev libpangocairo-1.0-0 libpangoft2-1.0-0 libfreetype6-dev libgtk2.0-dev

2. Build Fresh Player Plugin
cd
git clone https://github.com/i-rinat/freshplayerplugin.git
cd freshplayerplugin && mkdir build
cd build
cmake ..
make

3. Once it's built, copy libfreshwrapper.so from the build folder to the browser plugin directory. For Firefox, copy it to /usr/lib/mozilla/plugins/

4. Fresh Player Plugin is just a wrapper for Pepper Flash from Google Chrome so you'll need libpepflashplayer.so. The Pepper Flash path is hardcoded to /opt/google/chrome/PepperFlash/libpepflashplayer.so and to get libpepflashplayer.so under that location you'll have to do one of the following:
  • install Google Chrome stable (that's it!); or
  • if you're using Google Chrome unstable, create a symbolic link from /opt/google/chrome-unstable/PepperFlash to /opt/google/chrome/ ; or
  • on Ubuntu, you can install Pepper Flash using 2 other ways: via the installer available in the official Ubuntu 14.04 repositories and via the Pepper Flash PPA - once installed, then you'll need to create a symbolic link for Pepper Flash to /opt/google/chrome/PepperFlash/libpepflashplayer.so

  from: http://www.webupd8.org/2014/05/fresh-player-plugin-pepper-flash.html

sexta-feira, 31 de janeiro de 2014

Ubunt is not booting - see this

 

  If your Ubuntu system doesn't boot because of some broken updates and the bug was fixed in the repositories, you can use an Ubuntu Live CD and chroot to update the system and fix it.

 

1. Create a bootable Ubuntu CD/DVD or USB stick, boot from it and select "Try Ubuntu without installing". Once you get to the Ubuntu desktop, open a terminal.

2. You need to find out your root partition on your Ubuntu installation. On a standard Ubuntu installation, the root partition is "/dev/sda1", but it may be different for you. To figure out what's the root partition, run the following command:
sudo fdisk -l
This will display a list of hard disks and partitions from which you'll have to figure out which one is the root partition.

To make sure a certain partition is the root partition, you can mount it (first command under step 3), browse it using a file manager and make sure it contains folders that you'd normally find in a root partition, such as "sys", "proc", "run" and "dev".

3. Now let's mount the root partition along with the /sys, /proc, /run and /dev partitions and enter chroot:
sudo mount ROOT-PARTITION /mnt
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
sudo cp /etc/resolv.conf /mnt/etc/
sudo chroot /mnt

Notes:
  • ROOT-PARTITION is the root partition, for example /dev/sda1 in my case - see step 2;
  • the command that copies resolv.conf gets the network working, at least for me (using DHCP); if you get an error about resolv.conf being identical when copying it, just ignore it.

Now you can update the system - in the same terminal, type:
apt-get update
apt-get upgrade


Since you've chrooted into your Ubuntu installation, the changes you make affect it and not the Live CD, obviously.

If the bug that caused your system not to boot is happening because of some package in the Proposed repositories, the steps above are useful, but you'll also have to know how to downgrade the packages from the proposed repository - for how to do that, see: How To Downgrade Proposed Repository Packages In Ubuntu

 

terça-feira, 27 de agosto de 2013

App Grid: New Lightweight Ubuntu Software Center Alternative

 
App Grid is a new lightweight Ubuntu Software alternative that tries to make application discovery easier by using a grid view which includes app screenshots and ratings.

The application is currently only available for Ubuntu 13.04 and it uses a proprietary license.

Even though this is the first public release, App Grid already comes with most features you'll need, like software search, app review and purchase and more. As for the design, the application reminds me of Muon Discover, a Muon Suit front-end that tries to make it easier to find new software, a goal shared with App Grid.

Below you can see some App Grid screenshots:

AppGrid
App Grid - main view

AppGrid
Games category

You've probably noticed that some applications have a green circle displayed around the application icon - that means they are already installed.

The application page displays an install / launch / remove button, screenshots, a short description along with user comments. Clicking on the comments extends the section and you can filter them by rating, language, Ubuntu version or write a review:

AppGrid

AppGrid


App Grid features:
  • discover new apps every time you open App Grid;
  • search, filter and sort to find exactly what you're looking for;
  • make informed decisions with our extensive detail views;
  • sign in with your Ubuntu One account to review and purchase apps.

Below you'll find a technical comparison between App Grid and Software Center, done by the AppCenter developer (the tests were performed on a Dell Mini 9):
  • python3 vs python2;
  • warm start to home screen is 2.7s vs 20s;
  • warm start to details screen (eg opening an apt: link) is 2.3s vs 30s;
  • full database build is 58s vs 6min24;
  • initial database size is 36.7mb vs 96.5mb;
  • memory usage after startup to home screen is 20mb vs 53.6mb;
  • lines of code is somewhere around 5900 loc vs 56960 loc (incl tests etc).


Install App Grid in Ubuntu


App Grid is available in a PPA for Ubuntu 13.04 only for now. Add the PPA and install App Grid using the following commands:
sudo add-apt-repository ppa:appgrid/stable
sudo apt-get update
sudo apt-get install appgrid

The PPA provides packages for other Ubuntu versions, but they don't work - a message is displayed saying that App Grid is not yet available for that Ubuntu version.