Digital Ocean – dicas

https://cloud.digitalocean.com/

# passwd root

# useradd -m usuario

https://www.liquidweb.com/kb/how-to-add-a-user-and-grant-root-privileges-on-ubuntu-14-04/

https://www.vivaolinux.com.br/artigo/Conexoes-SSH-sem-senha-facil-e-descomplicado

https://askubuntu.com/questions/133318/how-do-i-change-the-language-via-a-terminal
https://makandracards.com/zeroglosa/31619-instalar-por-terminal-o-pacote-de-idiomas-portugues-do-ubuntu

$ sudo apt-get update

https://www.digitalocean.com/community/tutorials/como-configurar-apache-virtual-hosts-no-ubuntu-14-04-lts-pt

https://www.digitalocean.com/community/tutorials/como-instalar-e-configurar-o-vnc-no-ubuntu-16-04-pt

https://www.digitalocean.com/community/questions/problema-dominio-registro-br-e-do

https://www.digitalocean.com/community/questions/slow-to-connect-to-droplet-through-ssh-or-ftp

https://www.vultr.com/docs/how-to-install-phantomjs-on-ubuntu-16-04

$ sudo apt-get install python
http://mariehogebrandt.se/articles/installing-phantomjs-and-casperjs-on-ubuntu/
corrija o “~/bin/casperjs” para “/bin/casperjs” nos comandos

https://ntp.br/guia-linux-comum.php
https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04
https://www.vivaolinux.com.br/artigo/Modificando-o-TimeZone-2-metodos

https://github.com/eea/odfpy

https://www.vivaolinux.com.br/dica/Configurando-a-rede-no-Linux-via-linha-de-comando
#Bloqueia
chattr +i /etc/resolv.conf
#Desbloqueia
chattr -i /etc/resolv.conf

https://linuxconfig.org/configuring-gmail-as-sendmail-email-relay
https://www.akadia.com/services/sendmail_relay.html

https://likegeeks.com/linux-mail-server/

Anúncios

ERRO – qt.qpa.screen: QXcbConnection: Could not connect to display

$ phantomjs –version
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

correção:
$ export QT_QPA_PLATFORM=offscreen

fonte: https://github.com/ariya/phantomjs/issues/14376

Recuperar fotos de cartão SD

$ sudo apt install testdisk
$ sudo photorec

Emulando clique central do mouse com os botões esquerda+direita – Ubuntu 16.04

Dica rápida e rasteira para emular o clique central do mouse com os botões esquerda+direita

passo 1 – identifique o id de seu mouse
xinput list

passo 2 – rode o comando abaixo
xinput set-prop “id-do-seu-mouse” “Evdev Middle Button Emulation” 1

exemplo:
xinput set-prop “10” “Evdev Middle Button Emulation” 1

Ubuntu 16.04 – Gnome – menus no lado direito

Dica rápida e rasteira: mover os botões de menu da janela para o lado direito no Gnome no Ubuntu 16.04

use a linha de comando:

gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

fonte: https://askubuntu.com/questions/764166/how-to-move-window-buttons-to-right-in-ubuntu-16-04

Resolvido! problema ao acessar Vino via VNC – Ubuntu 16.04

Estava com problema para acessar o Vino via VNC, provavelmente o Vino estava com uma criptografia que não batia com o VNC.

no VNC dava o erro: “the port on wich the computer is listening for a connection could not be contacted” ou “No supported authentication methods!”

Lembrando que no VNC você deve colocar o ip:0, exemplo: 10.0.0.7:0

Resolvi com o seguinte comando no Ubuntu 16.04:

gsettings set org.gnome.Vino require-encryption false

fonte; https://luizsouza.com.br/2014/08/03/acesso-remoto-ao-ubuntu-14-04-resolvido/

Ubuntu – Desativar Caps Lock via linha de comando

Dica rápida e rasteira

Fonte: https://askubuntu.com/questions/80254/how-do-i-turn-off-caps-lock-the-lock-not-the-key-by-command-line/80301

Using xdotool

  1. Install it
    sudo apt-get install xdotool
    
  2. Send a CAPS down/up event
    xdotool key Caps_Lock
    

Another tool is xte

  1. Install it
    sudo apt-get install xautomation
    
  2. Send a CAPS lock down/up event
    xte "key Caps_Lock"