sábado, 29 de agosto de 2015

Corrigindo erro GPG (chave pública não disponível)

Solving GPG error (public key not available)
Exemplo de mensagem de erro:

W: Erro GPG: http://ppa.launchpad.net precise Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY A8AA1FAA3F055C03

A mensagem acima indica que o sistema não possui a chave GPG de autenticação (númeroA8AA1FAA3F055C03) para o repositório PPA.

A solução é simples. Basta adicionar o número da chave (indicado na mensagem de erro). Sinopse do comando:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys NÚMERO_DA_CHAVE

Ou...
sudo apt-key adv --keyserver subkeys.pgp.net --recv-keys NÚMERO_DA_CHAVE

Exemplo:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8AA1FAA3F055C03

Atualize a lista de pacotes e verifique se o problema foi resolvido:
sudo apt-get update

domingo, 23 de agosto de 2015

Color Cor bash prompt

6.1. Colours

As mentioned before, non-printing escape sequences have to be enclosed in \[\033[ and \]. For colour escape sequences, they should also be followed by a lowercase m.
If you try out the following prompts in an xterm and find that you aren't seeing the colours named, check out your ~/.Xdefaults file (and possibly its bretheren) for lines like XTerm*Foreground: BlanchedAlmond. This can be commented out by placing an exclamation mark ("!") in front of it. Of course, this will also be dependent on what terminal emulator you're using. This is the likeliest place that your term foreground colours would be overridden.
To include blue text in the prompt:
PS1="\[\033[34m\][\$(date +%H%M)][\u@\h:\w]$ "
The problem with this prompt is that the blue colour that starts with the 34 colour code is never switched back to the regular colour, so any text you type after the prompt is still in the colour of the prompt. This is also a dark shade of blue, so combining it with the bold code might help:
PS1="\[\033[1;34m\][\$(date +%H%M)][\u@\h:\w]$\[\033[0m\] "
The prompt is now in light blue, and it ends by switching the colour back to nothing (whatever foreground colour you had previously).
Here are the rest of the colour equivalences:
Black       0;30     Dark Gray     1;30
Blue        0;34     Light Blue    1;34
Green       0;32     Light Green   1;32
Cyan        0;36     Light Cyan    1;36
Red         0;31     Light Red     1;31
Purple      0;35     Light Purple  1;35
Brown       0;33     Yellow        1;33
Light Gray  0;37     White         1;376.1. Colours

As mentioned before, non-printing escape sequences have to be enclosed in \[\033[ and \]. For colour escape sequences, they should also be followed by a lowercase m.

If you try out the following prompts in an xterm and find that you aren't seeing the colours named, check out your ~/.Xdefaults file (and possibly its bretheren) for lines like XTerm*Foreground: BlanchedAlmond. This can be commented out by placing an exclamation mark ("!") in front of it. Of course, this will also be dependent on what terminal emulator you're using. This is the likeliest place that your term foreground colours would be overridden.

To include blue text in the prompt:

PS1="\[\033[34m\][\$(date +%H%M)][\u@\h:\w]$ "
The problem with this prompt is that the blue colour that starts with the 34 colour code is never switched back to the regular colour, so any text you type after the prompt is still in the colour of the prompt. This is also a dark shade of blue, so combining it with the bold code might help:

PS1="\[\033[1;34m\][\$(date +%H%M)][\u@\h:\w]$\[\033[0m\] "
The prompt is now in light blue, and it ends by switching the colour back to nothing (whatever foreground colour you had previously).

Here are the rest of the colour equivalences:

Black       0;30     Dark Gray     1;30
Blue        0;34     Light Blue    1;34
Green       0;32     Light Green   1;32
Cyan        0;36     Light Cyan    1;36
Red         0;31     Light Red     1;31
Purple      0;35     Light Purple  1;35
Brown       0;33     Yellow        1;33
Light Gray  0;37     White         1;37
Daniel Dui (ddui@iee.org) points out that to be strictly accurate, we must mention that the list above is for colours at the console. In an xterm, the code 1;31 isn't "Light Red," but "Bold Red." This is true of all the colours.

You can also set background colours by using 44 for Blue background, 41 for a Red background, etc. There are no bold background colours. Combinations can be used, like Light Red text on a Blue background: \[\033[44;1;31m\], although setting the colours separately seems to work better (ie. \[\033[44m\]\[\033[1;31m\]). Other codes available include 4: Underscore, 5: Blink, 7: Inverse, and 8: Concealed.

Note 
Many people (myself included) object strongly to the "blink" attribute because it's extremely distracting and irritating. Fortunately, it doesn't work in any terminal emulators that I'm aware of - but it will still work on the console.

Note 
If you were wondering (as I did) "What use is a 'Concealed' attribute?!" - I saw it used in an example shell script (not a prompt) to allow someone to type in a password without it being echoed to the screen. However, this attribute doesn't seem to be honoured by many terms other than "Xterm."

Based on a prompt called "elite2" in the Bashprompt package (which I have modified to work better on a standard console, rather than with the special xterm fonts required to view the original properly), this is a prompt I've used a lot:

 
function elite
{

local GRAY="\[\033[1;30m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local CYAN="\[\033[0;36m\]"
local LIGHT_CYAN="\[\033[1;36m\]"
local NO_COLOUR="\[\033[0m\]"

case $TERM in
    xterm*|rxvt*)
        local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
        ;;
    *)
        local TITLEBAR=""
        ;;
esac

local temp=$(tty)
local GRAD1=${temp:5}
PS1="$TITLEBAR\
$GRAY-$CYAN-$LIGHT_CYAN(\
$CYAN\u$GRAY@$CYAN\h\
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
$CYAN\#$GRAY/$CYAN$GRAD1\
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
$CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
$LIGHT_CYAN)$CYAN-$GRAY-\
$LIGHT_GRAY\n\
$GRAY-$CYAN-$LIGHT_CYAN(\
$CYAN\$$GRAY:$CYAN\w\
$LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY " 
PS2="$LIGHT_CYAN-$CYAN-$GRAY-$NO_COLOUR "
}
I define the colours as temporary shell variables in the name of readability. It's easier to work with. The "GRAD1" variable is a check to determine what terminal you're on. Like the test to determine if you're working in an Xterm, it only needs to be done once. The prompt you see look like this, except in colour:

--(giles@gcsu202014)-(30/pts/6)-(0816/01-Aug-01)--
--($:~/tmp)--
To help myself remember what colours are available, I wrote a script that output all the colours to the screen. Daniel Crisman has supplied a much nicer version which I include below:

#!/bin/bash
#
#   This file echoes a bunch of color codes to the 
#   terminal to demonstrate what's available.  Each 
#   line is the color code of one forground color,
#   out of 17 (default + 16 escapes), followed by a 
#   test use of that color on all nine background 
#   colors (default + 8 escapes).
#

T='gYw'   # The test text

echo -e "\n                 40m     41m     42m     43m\
     44m     45m     46m     47m";

for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
           '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
           '  36m' '1;36m' '  37m' '1;37m';
  do FG=${FGs// /}
  echo -en " $FGs \033[$FG  $T  "
  for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
    do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
  done
  echo;
done
echo
 
Daniel Dui (ddui@iee.org) points out that to be strictly accurate, we must mention that the list above is for colours at the console. In an xterm, the code 1;31 isn't "Light Red," but "Bold Red." This is true of all the colours.
You can also set background colours by using 44 for Blue background, 41 for a Red background, etc. There are no bold background colours. Combinations can be used, like Light Red text on a Blue background: \[\033[44;1;31m\], although setting the colours separately seems to work better (ie. \[\033[44m\]\[\033[1;31m\]). Other codes available include 4: Underscore, 5: Blink, 7: Inverse, and 8: Concealed.

NoteMany people (myself included) object strongly to the "blink" attribute because it's extremely distracting and irritating. Fortunately, it doesn't work in any terminal emulators that I'm aware of - but it will still work on the console.

NoteIf you were wondering (as I did) "What use is a 'Concealed' attribute?!" - I saw it used in an example shell script (not a prompt) to allow someone to type in a password without it being echoed to the screen. However, this attribute doesn't seem to be honoured by many terms other than "Xterm."
Based on a prompt called "elite2" in the Bashprompt package (which I have modified to work better on a standard console, rather than with the special xterm fonts required to view the original properly), this is a prompt I've used a lot:
 
function elite
{

local GRAY="\[\033[1;30m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local CYAN="\[\033[0;36m\]"
local LIGHT_CYAN="\[\033[1;36m\]"
local NO_COLOUR="\[\033[0m\]"

case $TERM in
    xterm*|rxvt*)
        local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
        ;;
    *)
        local TITLEBAR=""
        ;;
esac

local temp=$(tty)
local GRAD1=${temp:5}
PS1="$TITLEBAR\
$GRAY-$CYAN-$LIGHT_CYAN(\
$CYAN\u$GRAY@$CYAN\h\
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
$CYAN\#$GRAY/$CYAN$GRAD1\
$LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
$CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
$LIGHT_CYAN)$CYAN-$GRAY-\
$LIGHT_GRAY\n\
$GRAY-$CYAN-$LIGHT_CYAN(\
$CYAN\$$GRAY:$CYAN\w\
$LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY " 
PS2="$LIGHT_CYAN-$CYAN-$GRAY-$NO_COLOUR "
}
I define the colours as temporary shell variables in the name of readability. It's easier to work with. The "GRAD1" variable is a check to determine what terminal you're on. Like the test to determine if you're working in an Xterm, it only needs to be done once. The prompt you see look like this, except in colour:
--(giles@gcsu202014)-(30/pts/6)-(0816/01-Aug-01)--
--($:~/tmp)--
To help myself remember what colours are available, I wrote a script that output all the colours to the screen. Daniel Crisman has supplied a much nicer version which I include below:
#!/bin/bash
#
#   This file echoes a bunch of color codes to the 
#   terminal to demonstrate what's available.  Each 
#   line is the color code of one forground color,
#   out of 17 (default + 16 escapes), followed by a 
#   test use of that color on all nine background 
#   colors (default + 8 escapes).
#

T='gYw'   # The test text

echo -e "\n                 40m     41m     42m     43m\
     44m     45m     46m     47m";

for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
           '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
           '  36m' '1;36m' '  37m' '1;37m';
  do FG=${FGs// /}
  echo -en " $FGs \033[$FG  $T  "
  for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
    do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
  done
  echo;
done
echo

source.list debian 8 jessie



Segue uma sugestão:

deb http://ftp.br.debian.org/debian/ jessie main non-free contrib
deb-src http://ftp.br.debian.org/debian/ jessie main non-free contrib

deb http://ftp.br.debian.org/debian/ jessie-updates main non-free contrib
deb-src http://ftp.br.debian.org/debian/ jessie-updates main non-free contrib

deb http://ftp.br.debian.org/debian/ jessie-backports main non-free contrib
deb-src http://ftp.br.debian.org/debian/ jessie-backports main non-free contrib

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free



Script para Adicionar Template Debian 8 Jessie XenServer 6.5


Script to install a Debian Jessie 8.0 template on Xenserver 6.5

xenserver_create_jessie_template_64bit.sh

#!/bin/bash
## Script to install a Debian Jessie 8.0 template on Xenserver 6.5
## https://gist.github.com/hingstarne/5320400

 
# Add your favourite mirror here
MIRROR=http://ftp.us.debian.org/debian/
 
# No need to edit something below
 
WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\) --minimal)
if [[ -z $WHEEZY ]] ; then
  WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\)\ \(experimental\) --minimal)
    if [[ -z $WHEEZY ]] ; then
  echo "Cant find Wheezy 64bit template, is this on 6.5 or above?"
  exit 1
 fi
fi
NEWUUID=$(xe vm-clone uuid=$WHEEZY new-name-label="Debian Jessie 8.1 (64-bit)")
xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp,nfs other-config:default_template=true
xe template-param-set uuid=$NEWUUID other-config:install-methods=http other-config:debian-release=jessie
xe vm-param-set uuid=$NEWUUID other-config-install-repository=$MIRROR



https://gist.github.com/jniltinho/0455fb5f01cfd8bbdbff

Criando Lancadores ou Atalhos para apps ou aplicativos Wine



Baixe o Radmin Client. e instale ele normal. que vai abrir a Pagina do Wine parar instalação.
Ele ja cria o atalho sozinho.

Exemplo de comando para executar o Radmin:
env WINEPREFIX="/home/phdigitos/.wine" wine C:\\windows\\command\\start.exe /Unix /home/phdigitos/.wine/dosdevices/c:/users/phdigitos/Start\ Menu/Programs/Radmin\ Viewer\ 3/Radmin\ Viewer\ 3.lnk


NO Cado do Winbox, vc baixa o arquivo winbox.exe joga ele dentro da usa pasta home .wine
no arquivos de programas

Exemplo de comando para executar o Winbox Mikrotik:
env WINEPREFIX="/home/phdigitos/.wine" wine C:\\windows\\command\\start.exe /Unix /home/phdigitos/.wine/dosdevices/c\:/Program\ Files\ \(x86\)/Winbox/winbox.exe


Instalar Xen 4.1 no Debian Wheezy 7.0


I added an installation script on my github account if anyone is interested 
https://github.com/Midacts/Xen

After installing Debian Wheezy, log in as root and install these packages:
apt-get install xen-linux-system-amd64 xen-tools xen-utils-4.1 xen-hypervisor-4.1-amd64
Xen 4.1 is the most 'up to date' version of Xen you can install without compiling from source. If you compile from source, you can get the most bleeding edge version of Xen, but it can not be updated with 'apt-get upgrade'.

Next, change the boot order of xen, so that your machine will automatically boot Xen first:
mv /etc/grub.d/20_linux_xen /etc/grub.d/09_linux_xen
Now we need to edit '/etc/default/grub' so Xen will now use all of our RAM! This way we set the max amount our Xen box will consume, so our DomU's have some to use too. Add this to the end of the file:
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=512M"
Now you can reboot, and xen will be automatically selected and automatically booted for you. you can check this is you see the xen directory in the /proc directory (/proc/xen).

Now to get our start setting up Xen so that it can run virt-manager. If not, then when we go to run virt-manager, it will throw errors. open '/etc/xen/xend-config.sxp' and edit these lines to look like this:
(xend-http-server yes)
(xend-unix-server yes)
(xend-tcp-xmlrpc-server yes)
(xend-unix-xmlrpc-server yes)
(dom0-min-mem 512)
(enable-dom0-ballooning no)
Now update grub and reboot for all these changes to take affect, and to boot into Xen:
update-grub
Install virt-manager. This will give us a GUI to manage our xen hypervisor and its Domu's:
apt-get install virt-manager
Edit the network settings (/etc/network/interfaces). I like to used bridged mode, there are several other options, this is the best and easiest way:
auto lo
iface lo inet loopback

iface eth0 inet manual
auto xenbr0

iface xenbr0 inet static
        bridge_ports eth0
        address 192.168.1.xxx
        netmask 255.255.255.0
        gateway 192.168.1.1
Then run a 'service networking restart' to make these changes go through.

While we are here, i like to set up my wake on lan, so go ahead and install ethtool:
apt-get install ethtool
Then add  thisto the end of the '/etc/network/interfaces' file in order to enable WOL capabilities to your machine:

'ethernet-wol g'

SUMMARY

That's it! We have a working xen hypervisor that is up and ready to start having Domu's added to it.


I hope this can help somebody else out as my as it helped me. If you have any questions please leave me a message below. The best resources I had, besides Google, was the ##xen IRC channels on freenode. It is pretty dead, but sometimes you can glean some good info from the guys there.

Thanks again!

Autor: John McCarthy

sábado, 22 de agosto de 2015

Adicionar disco USB como Storage Reporitory no XenServer


Adicionar um disco USB a um host XenServer como um Storage Repository pode ser algo muito útil quando se pretende efetuar a cópia de uma VM, alguma operação que não pôde ser efetuada por falta de espaço nos SR’s existentes, entre outros cenários.

Abaixo iremos descrever os passos necessários para a inclusão deste disco.
É importante ressaltar que este processo irá formatar o disco USB como um LVM e irá apagar todos os dados nele existente. <------ aqui="" font="" nbsp="">
  1. Plugue o disco USB no host XenServer onde deseja utilizá-lo.

  2. Abra a console CLI e digite o comando “fdisk -l” para listar os discos.


    Figura 01

    Podemos identificar que o disco USB está ocupando a posição “/dev/sdb1”.

  3. Digite o comando “pvcreate /dev/XXX” substituindo o XXX pela posição do disco identificada no passo anterior.


    Figura 02
  4. Liste os seus hosts XenServer para identificar o UUID de cada um deles.


    Figura 03
  5. Digite o comando “xe sr-create host-uuid= content-type=user name-label="USB Drive" shared=false device-config:device= type=lvm”


    Figura 04

Pronto! Agora o XenServer já reconhece o seu disco USB como um SR (Storage Repository)

Veja o antes e depois na console XenCenter:

Antes:

Figura 05

Depois:


Figura 06

sexta-feira, 14 de agosto de 2015

Corrigir o Problema de Servidor DNS Não Respondendo


Você está enfrentando erros de DNS quando tenta carregar um site ou se conectar à sua rede? O Domain Name Server (DNS) é um servidor que converte os endereços do site de modo que seu navegador pode se conectar a eles. Ocasionalmente, você pode perder a conexão com o servidor, seja através de configurações corrompidas ou problemas no final do servidor. Se você estiver tendo dificuldades para se conectar, veja o Passo 1 abaixo para saber como solucionar seus problemas.

Parte 1 de 4: Verificando sua conexão

1
Conecte outro dispositivo à rede. Antes de começar a tentar resolver o problema, isso ajudará a saber onde o mesmo está ocorrendo. Você pode diminuir o problema realizando alguns testes rápidos. Conecte outro dispositivo a seu roteador, com ou sem fio.
  • Você pode usar outro computador, um smartphone ou tablet. Qualquer coisa que acesse a internet funcionará para testar.
Tente acessar uma página web a partir do segundo dispositivo. Se você ainda estiver recebendo erros de DNS, o problema está em seu roteador ou em seu ISP. Se você puder se conectar ao site, o problema está vindo do primeiro computador.

Desligue e ligue o modem e o roteador. Desconecte o cabo de alimentação do modem, bem como o cabo de alimentação do seu roteador. Deixe que eles fiquem sem energia por pelo menos 30 segundos, de modo que qualquer carga residual seja liberada e a memória apagada. Religue seu modem e espere que ele se conecte totalmente. Depois que ele tenha se ligado completamente, reconecte o cabo de alimentação ao seu roteador e deixe que ele inicie. Isso pode levar até um minuto.
  • Uma vez que você tenha desligado e ligado novamente os dois dispositivos, tente novamente se conectar a um site. Se o problema ainda persistir, passe para a próxima seção.
Parte 2 de 4: Resolução dos problemas do computador


Tente um navegador diferente.
 Esta é uma das formas mais rápidas de testar suas conexões DNS. Baixe um navegador gratuito diferente como o Firefox ou Chrome e tente se conectar à internet. Se os problemas persistirem, provavelmente a falha não seja com o navegador, mas com alguma outra configuração no computador.
  • Se os problemas forem resolvidos, você pode tentar corrigir seu navegador antigo. Muitas vezes, o problema decorre das configurações de proxy.

Desative quaisquer conexões extras. Ocasionalmente, o Windows instalará conexões extras que você não usará normalmente. Para melhor conectividade, você deve ter apenas as conexões que usa regularmente habilitadas. Para abrir a janela de suas Conexões de Rede, clique no menu Iniciar ou pressione o botão  Wine busque por "ncpa.cpl".
  • Procure por conexões extras. Você deverá ver uma lista de todas as suas conexões. A causa mais comum de problemas de DNS é a existência do "Microsoft Virtual WiFi Miniport Adapter". SE você vir isto, clique com o botão direito e selecione "Desabilitar".[1]
  • Teste novamente sua conexão. Aguarde alguns instantes e abra novamente o navegador. Tente visitar um site. O DNS pode levar alguns instantes para carregar, mas se a página aparecer em seguida, o problema foi resolvido. Se não, siga para o próximo passo.
Libere seu DNS. Às vezes, o cache do DNS fica desatualizado e precisa ser liberado manualmente. Isto pode ser feito a partir do Prompt de Comando.
  • Para abrir o Prompt de Comando, pressione  Win+R e digite cmd.
  • Digite ipconfig /flushdns. Espere até que o comando seja processado. Após isso, reinicie o computador.
  • Teste a conexão novamente. Se o problema ainda persistir, passe para o próximo passo.
Altere seu servidor de DNS. Você pode inserir manualmente um servidor DNS alternativo para tentar se conectar em vez disso. Para executar tal ação, abra novamente a janela "ncpa.cpl" e clique com o botão direito em sua conexão ativa. Selecione "Propriedades".[2]
  • Na aba Rede, desça até que você encontre a entrada "Protocolo TCP/IP Versão 4 (TCP/IPv4)". Clique nele para selecioná-lo e clique no botãoProperties.
  • Clique na opção "Usar os seguintes endereços de servidor DNS".
  • Digite 208.67.222.222 no campo "Servidor DNS Preferencial"
  • Digite 208.67.220.220 no campo "Servidor DNS Alternativo"
  • Estes são os servidores DNS mantidos pela OpenDNS, um serviço de DNS open-source
Tente conectar no Modo Seguro. Reiniciar seu computador em Modo de Segurança carregará apenas os arquivos essenciais para o Windows, o que lhe permitirá determinar se outro programa ou serviço tal como seu antivírus está causando os problemas de conexão.[3]
  • Você pode tentar desabilitar o antivírus primeiro e ver se isso corrige o problema. Se sim, você deve desinstalar seu antivírus e instalar um novo.
  • Reinicie seu computador e mantenha pressionada a tecla F8 enquanto ele estiver reiniciando.
  • Selecione o Modo Seguro com Rede na lista de opções.
  • Teste a conexão. Se você for capaz de se conectar com êxito à internet, o problema está com um programa em execução em seu computador. Examine os arquivos de inicialização e desabilite os programas até que você encontre o culpado.
Parte 3 de 4: Resolução dos problemas do roteador

Conecte seu computador diretamente a seu modem. Se você estiver usando um roteador para criar uma rede doméstica, desconecte o computador dele e conecte um cabo Ethernet diretamente na porta Ethernet do seu modem.
  • Tente carregar um site. Se você ainda está recebendo erros de DNS, o problema provavelmente está com o ISP. Contacte-os e pergunte sobre a conexão com os servidores de DNS.
  • Se você puder se conectar a uma página web, o problema decorre de seu roteador. Reconecte seu roteador ao modem e conecte seu computador de volta à rede para continuar a resolução de problemas.
Informe os servidores DNS alternativos. Você pode alterar as configurações do seu roteador de modo que ele tente se conectar manualmente aos servidores DNS alternativos. Isso pode lhe dizer se o servidor DNS do seu provedor de Internet pode estar com defeito.
  • Abra a página de configuração do router. Isto é diferente para cada roteador, mas, essencialmente, você terá que digitar o endereço IP do seu roteador na barra de endereços do seu navegador.
  • Abra a seção de Internet. Encontre a subseção marcada como "Endereço do Domain Name Server (DNS)".
  • Defina-o para usar manualmente os servidores DNS que você digitar.
  • Digite as informações do servidor OpenDNS (Primário - 208.67.222.222, Secundário - 208.67.220.220) ou informação do servidor DNS do Google (Primário - 8.8.8.8, Secundário - 8.8.4.4).
  • Clique em Aplicar ou Salvar Alterações. O roteador levará alguns momentos para aplicar as alterações.
  • Teste-o. Abra uma nova janela do navegador em seu computador e tente se conectar a um site. Se você for capaz de se conectar, é mais provável que o ISP tenha problemas de DNS.
Resete seu router. Às vezes, as configurações em seu roteador podem ter se corrompido e a forma mais fácil de corrigi-las é simplesmente resetã-lo para as configurações padrão. Isso redefinirá as configurações de rede sem fio e qualquer informação encaminhamento de porta.
  • Para resetar seu roteador, use um clipe de papel ou outro objeto pontiagudo para pressionar e segurar o botão Reset, na parte de trás do aparelho.
Reconfigure seu roteador. Depois que ele tenha sido resetado, você precisará reconfigurar sua rede sem fio (se você estava usando ela). Quaisquer senhas e contas de admin também serão resetadas.

Parte 4 de 4: Resolução dos problemas do DNS no celular

Configure todos os aparelhos em DNS do Google. Faça isso no pc, no notebook e no celular!

Tente modificar o número DNS da sua rede (No Galaxy) para:
  • DNS 1: 8.8.8.8
  • DNS 2: 4.4.4.4
    • Para modificar o "DNS" no celular, vá em - Configurações, - Wi Fi, - Pressione o dedo na rede conectada, - "Modificar Config. Da Rede", - "Mostrar Opções Avançadas", - Em "Definições IP" mude de "DHCP" para "Estático" e modifique os números DNS.
Mude o DNS de todos para o do Google:
  • Primário: 8.8.8.8
  • Secundário: 8.8.4.4
Pronto! Seu erro de DNS ja deve está resolvido.

domingo, 2 de agosto de 2015

Compiz Linux Mint 17 notebook Acer Aspire E5-571G


  • Power button

You have to press it just right, because if you press it to short or to long it wont work! It take some to figure it out... I thought my brand new laptop not working! It's not a big deal right now.
  • BIOS

Press F2 when you see Acer logo, enter BIOS
Change option:
 from "UEFI" to "legacy"
  • Install Mint 17 

Create Mint17 64bit bootable flash drive and connect to the laptop.
Set first boot device "USB flash drive".
Install Mint as usual.
  • Resource

This is what I dig out:
https://wiki.ubuntu.com/Bumblebee
http://outhereinthefield.wordpress.com/2014/12/21/linux-gaming-setup-part-2-software-configs-nvidia-binary-and-bumblebee-steam-and-playonlinux-howto/
https://wiki.manjaro.org/index.php?title=Configure_NVIDIA_%28non-free%29_settings_and_load_them_on_Startup
http://askubuntu.com/questions/128463/how-to-control-brightness

YES! The famous Linux with Nvidia Optimus Technology and two Graphic cards!
I saved some time on the research before buying, so now I can spend more time on installation... Sadly...
I guess if you want a powerful laptop it is a common hardware and it's a good price so I should not complain.
  • Nvidia non free driver

Add PPA for nvidia non free driver:
$ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get install bbswitch-dkms bumblebee bumblebee-nvidia lib32gcc1
libc6-i386 libcuda1-352 libturbojpeg libvdpau1 nvidia-352 nvidia-current
nvidia-libopencl1-352  nvidia-opencl-icd-352 nvidia-settings primus primus-libs
screen-resolution-extra socat virtualgl virtualgl-libs glibc-doc vdpau-driver
primus-libs-ia32 virtualgl-libs-ia32 virtualgl primus nvidia-settings
nvidia-opencl-icd-352
  • Configure "bumblebee":


$ sudo vi  /etc/bumblebee/bumblebee.conf

My configuration, I mark the changes:

------------------------------------------------------------------------------------------------
# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia-352
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-352
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-352:/usr/lib32/nvidia-352
#LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-352/xorg,/usr/lib/xorg/modules
#XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

reboot

  • Nvidia settings

It creates virtual X display, by default it ":8" , it is set on bumblebee.conf.

Generally speaking, to see nvidia-settings you have to trun ON the nvidia card and specify display.

$ optirun nvidia-settings -c :8


So now card is active until the tool is closed.
  • Using Nvidia GPU


Close the nvidia-settings tool and try this:

$ cat /proc/acpi/bbswitch
0000:03:00.0 OFF

Make bash use bumblebee and then check:

$ optirun bash
$cat /proc/acpi/bbswitch
0000:03:00.0 ON
$ optirun --status
Bumblebee status: Ready (3.2.1). X is PID 25018, 1 applications using bumblebeed.

Now you can do 3D math test using nvidia card:

$ glxspheres64
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 840M/PCIe/SSE2
92.270035 frames/sec - 81.921028 Mpixels/sec

  • Fixing Brightness control (copied from ubuntu forum, link above):


I figured it out from different sites, it fixes backlight.
Run the following command in Terminal:
gksu pluma /etc/default/grub
then change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX="acpi_osi=Linux"
then save and run:
sudo update-grub
and then restart the system for changes to take effect.
  • Issues:


Video tearing using Nvidia card
I tested with mplayer, kodi (xbmc), vlc.
Common solution is in nvidia-settings/OpenGL set:
Sync to Vblank
Allow Flipping
Use Conformant Texture Clamping
Gues what! In my case, nvidia-settings don't have such options!


What should i do now..?
Also nvidia-settings tool shows wrong screen resolution. I try change it but nothing changed.

I checked directly manufacturer drivers at
http://www.geforce.com/drivers


Results:

Linux x64 (AMD64/EM64T) Display Driver - BETA
Version: 346.22 - Release Date: Mon Dec 08, 2014

Linux x64 (AMD64/EM64T) Display Driver
Version: 340.65 - Release Date: Mon Dec 08, 2014


I use older driver, it's probably the issue.
Unfortunately, I know how to install NVIDIA-Linux-x86_64-346.22.run file but only on single GPU hardware. I have no clue how to combined witbumblebee.
Update's in PPA are WELCOME!  
  
  • Intel graphic card

Mplayer2 and VLC uses "-vo vx" by default and I think it's CPU and it's not working well.
XBMC (kodi) loads intel vaapi driver and seems to works good!

To enable intel vaapi on Mplayer2
$ sudo apt-get install libvdpau-va-gl1

$ VDPAU_DRIVER=va_gl mplayer ./Video.mkv
MPlayer2 2.0-701-gd4c5b7f-2ubuntu2 (C) 2000-2012 MPlayer Team
Cannot open file '/home/rolas/.mplayer/input.conf': No such file or directory
Failed to open /home/rolas/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.

Playing ./Video.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AAC), -aid 0, -alang eng
[mkv] Will play video track 1.
Detected file format: Matroska
Load subtitles in ./Videos/
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libavcodec]
Selected audio codec: AAC (Advanced Audio Coding) [libavcodec]
AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/4.54% (ratio: 16000->352800)
AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
Starting playback...
VIDEO:  1280x720  59.940 fps    0.0 kbps ( 0.0 kB/s)
VO: [vdpau] 1280x720 => 1280x720 Planar YV12
[vdpau] Got display refresh rate 60.016 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption manually.
A: 552.9 V: 553.0 A-V: -0.000 ct:  0.000   0/  0  0% 24%  0.3% 0 0 
  • Game on Wine

I add PPA for wine to get latest version:
$ sudo apt-add-repository ppa:ubuntu-wine/ppa
$ sudo apt-get update

$ optirun wine ./path/to/StarCraft-II-Setup-enGB.exe

Startcraft II shows "Battle.net" window and crashes after couple seconds, during installation processes.
  • Version summary

Linux Mint 17 MATE
Kernel: Linux Aspire-E5-571G 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
optirun (Bumblebee) 3.2.1
wine-1.6.2
NVIDIA Driver Version 331.113
X Server Version:    11.0
                                The X.Org Foundation
                                1.15.1
NV-Control               1.29