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.

quinta-feira, 30 de outubro de 2014

winff - installing on ubuntu

Installing winff on ubuntu


open a terminal (alt+ctrl+t)

type:

sudo apt-get install winff

type enter when the repository asks

Just that.

terça-feira, 28 de outubro de 2014

Proxy com Squid3 + SquidGuard no Ubuntu

Proxy com Squid3 + SquidGuard no Ubuntu

 

Proxy com Squid3 + SquidGuard é uma ótima solução para controlar acesso a internet. Seja em uma grande rede com mais de 500 usuários ou uma pequena rede.
Na minha opinião, quem tem uma empresa onde o acesso a internet é liberado sem a utilização de proxy está sem duvida nenhuma perdendo dinheiro.
Experiencia própria, quando o usuário tem a opção de acessar a internet ele vai acessar, não pense que ele terá consciência que o acesso a alguns sites pode danificar o seu computador com vírus ou coisas do tipo. Se o cara pode acessar, ele vai acessar!

Então a solução é sempre colocar um proxy para controlar esses acessos. Quando falamos de proxy rodando em Linux, estamos falando do Squid.
Abaixo está um passo a passo para instalar o squid3 + squidGuard no Ubuntu, lembrando que essa mesma configuração pode ser utilizada para o Debian.
Se você tiver alguma duvida nos comandos de instalação que iremos utilizar hoje, você pode baixar o Ebook Grátis do Curso Linux Ubuntu, nele eu demonstrei um bom conteúdo sobre como fazer gerenciamento de pacotes no Ubuntu.
Antes de iniciar eu gostaria de deixar registrado o seguinte:
Essa configuração de Proxy com Squid3 + SquidGuard é a configuração padrão que eu utilizo para gerênciar mais de 200 usuários, ou seja, essa configuração funciona muito bem para o meu caso de uso, e claro poderá funcionar para o seu também.
Existem muitas maneiras de configurar um Proxy Squid, esse passo a passo mostra apenas uma forma, mas que pode resolver o seu problema.

Maiores problemas do acesso a internet sem proxy

Lembra que eu falei no inicio do artigo: Empresa que não utiliza proxy para controlar a internet está perdendo dinheiro.
É isso mesmo, a maior reclamação das empresas onde eu já configurei um proxy é que seus funcionários não estão mais trabalhando pois só ficam na internet.
É isso mesmo o que acontece, infelizmente a grande maioria não sabe utilizar a internet da maneira correta, e isso só é resolvido com a instalação de um proxy rodando em Linux.
Outro problema grande é o consumo da banda de internet, sem proxy em uma rede com 200 funcionários um link de 10 Mb seria facilmente consumido, com acesso ao youtube ou sites de rádio on-line por exemplo.
Acesso a sites maliciosos também é um grande problema, mas isso não preciso nem dar exemplos, todos nós sabemos.

Como será o nosso ambiente para configurar esse proxy em Linux?

Eu estou utilizando o Ubuntu 12.04, mas você pode utilizar o Debian também tranqüilamente.
O Squid é o nosso servidor proxy;
O squidGuard é o software que irá controlar nossas Blacklists, ou seja nele vamos dizer quais sites não podem ser acessados.
Se você tiver alguma duvida nos comandos de instalação que iremos utilizar hoje, você pode baixar o Ebook Grátis do Curso Linux Ubuntu.

1) Instalação do squid

apt-get install squid3

2) Instalação do squidGuard

apt-get install squidguard

3) Configuração do squid

vim /etc/squid3/squid.conf

3.1) Configuração de autenticação no LDAP

Adicione a linha abaixo para chamar o script:
auth_param basic program /usr/lib/squid3/ldap_auth.sh

3.1.2) Criar ao script para passar os parâmetros do servidor ldap

vim /usr/lib/squid3/ldap_auth.sh
—-inicio do conteudo do script—-
#!/bin/sh
exec /usr/lib/squid3/squid_ldap_auth -b “ou=People,dc=dominio,dc=com,dc=br” 10.1.1.1
—-fim do conteudo do script—-
chmod 755 /usr/lib/squid3/ldap_auth.sh
Estou usando LDAP para autenticar no squid, mas nada impede de utilizar o ncsa_auth, no arquivo de configuração do squid temos esse exemplo:
#       auth_param basic program /usr/lib/squid3/ncsa_auth /usr/etc/passwd

3.1.3) Configuração da regra no squid para fazer autenticação ( ACL )

vim /etc/squid3/squid.conf
Adiciona um nova linha depois de http_access allow localhost
# ------ inicio da configuração -------
acl USUARIOS proxy_auth REQUIRED
# ------ fim da configuração -------

3.2) Fazendo a liberação da uma rede para navegar pelo proxy

vim /etc/squid3/squid.conf
# ------ inicio da configuração -------
acl rede_1 src 192.168.1.0/24
http_access allow rede_1 USUARIOS
# ------ fim da configuração -------

3.3) Regra para bloquear sites, direto no squid

# ------ inicio da configuração -------
acl SITE_PROIBIDO dstdomain .facebook.com .facebook.com.br
# ------ fim da configuração -------
Nossa http_access deve chamar essa acl “SITE_PROIBIDO” com a opção de !
# ------ inicio da configuração -------
acl rede_12 src 192.168.12.0/24
http_access allow rede_12 USUARIOS !SITE_PROIBIDO
# ------ fim da configuração -------

3.4) Configuração do controle de banda de internet

#------------- INICIO DO CONTROLE DE BANDA ----------------------
 acl DOMINIO_LIVRE dstdomain .algum-site.com.br
# Significa que teremos dois controles de banda
 delay_pools 2
# PRIMEIRO CONTROLE DE BANDA - sem limite de banda para acesso normal
 delay_class 1 2
 delay_parameters 1 -1/-1 -1/-1
 delay_access 1 allow DOMINIO_LIVRE
# SEGUNDO CONTROLE DE BANDA - Limita a sua banda para +- 4MB
 delay_class 2 2
 delay_parameters 2 4000000/4000000 400000/400000
 delay_access 2 allow all
 #-------------------------------------------------------------

3.5) Trocando a porta e servidor DNS do squid

Eu gosto sempre de rodar o proxy na porta 8080, então editamos o arquivo:
vim /etc/squid3/squid.conf
# ------ inicio da configuração -------
http_port 8080
# ------ fim da configuração -------
Também gosto de usar o DNS do google, por isso adiciona a linha abaixo:
# ------ inicio da configuração -------
dns_nameservers 8.8.8.8 8.8.8.4
# ------ fim da configuração -------
Essas duas configurações são opicionais.

3.6) Ativar as novas configurações

squid3 -k reconfigure
Pronto, com isso o seu proxy já está configurado, mas o acesso a internet está liberado. Somente o controle de banda está ativo.

3.7) Restringir o tamanho do Download

Editar o arquivo /etc/squid3/squid.conf
Descomentar a linha abaixo, e ajustar para sua necessidade.
# ------ inicio da configuração -------
reply_body_max_size 5 MB
# ------ fim da configuração -------

4) Configurando o squidGuard

Bom agora é simples, temos apenas que dizer para o Squid3 que ele precisar repassar as solicitações para o squidGuard. Assim podemos fazer todos os filtros necessários para restringir sites.
Vamos utilizar um Blacklist para facilitar nosso trabalho.

4.1) Baixar / Instalar as Blacklists para o SquidGuard

Nesse site: http://urlblacklist.com/?sec=download
Obs: Link direto: http://urlblacklist.com/cgi-bin/commercialdownload.pl?type=download&file=bigblacklist
Veja mais BlackLists em http://www.squidguard.org/blacklists.html
Com o arquivo em mãos vamos fazer a configuração do SquidGuard.
 tar -xzvf bigblacklist.tar.gz
 cd blacklist
 mv * /var/lib/squidguard/db
Depois disso basta configurar o arquivo do /etc/squidguard/squidGuard.conf e indicar a blackList a ser utilizada

4.2) Configuração do arquivo do /etc/squidguard/squidGuard.conf

#--- INICO DO ARQUIVO
 dbhome /var/lib/squidguard/db
 logdir /var/log/squidguard
#
 # ACL RULES:
 #
 dest audio-video {
 domainlist audio-video/domains
 urllist audio-video/urls
 }
 # ... mais configurações aqui
 acl {
default {
 pass !ads !socialnetworking !mail !adult !antispyware !audio-video !chat !filehosting !filesharing !games !hacking !instantmessaging !malware !onlinegames !phishing !porn !proxy !radio !remote-control !sexuality !updatesites !virusinfected !news all
 redirect http://www.seu-site.com.br/proibido.html
 }
}
#--- FIM DO ARQUIVO
OBS.: Verifique se o arquivo de configuração do squidGuard está com a permissão correta, se não tiver teremos que executar o comando abaixo.
chown proxy:proxy -R /etc/squidguard/squidGuard.conf

4.3) Configurar o Squid para trabalhar com o SquidGuard

Precisamos editar o arquivo de configuração do squid /etc/squid3/squid.conf
Adicionar a linha abaixo:
url_rewrite_program /usr/bin/squidGuard –c /etc/squidguard/squidGuard.conf

4.3) Gerar o banco de dados do SquidGuard

Para refazer o banco de dados do squidGuard
cd /var/lib/squidguard/db/; squidGuard -C all ; chown proxy:proxy -R /var/lib/squidguard/db/ ; squid3 -k reconfigure
Obs.: Cada vez que for atualizado o BlackList, teremos que rodar o comando acima, para refazer o banco de dados do SquidGuard, trocar a permissão dos arquivos para o usuário do proxy e reiniciar o squid.
Essa parte é muito importante para o funcionamento do proxy, qualquer erro de permissão pode sim dar erro no SquidGuard.

4.4) Como fazer teste do seu proxy Squid3 + SquidGuard

Para testar sua configuração, analise o diretório /var/lib/squidguard/db/.
Veja que nesse diretório, temos vários sub diretório, exemplo:
Diretório:
audio-video
Dentro desse diretório temos geralmente dois arquivos:
domains
urls
Nesses arquivos estão os domínios e urls que o squidGuard irá bloquear, você pode editar esse arquivo normalmente, e depois mandar gerar o novo banco de dados com o comando abaixo:
cd /var/lib/squidguard/db/; squidGuard -C all ; chown proxy:proxy -R /var/lib/squidguard/db/ ; squid3 -k reconfigure
Para testar: Pegue um domínio qualquer que esteja sendo utilizado no arquivo /var/lib/squidguard/db/audio-video/domains e tente acessar.
Você deve ser redirecionado para o site que foi indicado no arquivo /etc/squidguard/squidGuard.conf, veja o parametro  “redirect http://www.seu-site.com.br/proibido.html”

Conclusão:

Solução perfeita para controlar acesso a internet não existe, essa é a minha opinião, mesmo com todos esses Blacklists alguém sempre vai acessar algum site que não é para uso do trabalho.
Eu também uso uma outra prática de configuração de proxy que é: Bloquear tudo, e libera conforme demanda, usando Whitelists, da muito mais trabalho com toda certeza, mas também é muito mais confiável, depende muito do perfil da empresa onde será implantado.

Obtido de: http://e-tinet.com/linux/proxy-squid3-squidguard-ubuntu-linux/?utm_source=EM&utm_medium=EM&utm_campaign=post-proxy&link_list=1079570

Todos os direitos reservados ao autor, Pedro Delfino.

Obtenha gratuitamente o livro de Pedro Delfino:

através do link: http://e-tinet.com/curso-linux-ubuntu/



 

 




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