Ferramentas de usuario

Ferramentas do sitio


Barra lateral

This translation is older than the original page and might be outdated. See what has changed.
Translations of this page:

Páxina principal

Análisis e comparativas

this namespace doesn't exist: gl:analisis_y_comparativas
Documentación
this namespace doesn't exist: documentacion
Eventos Guías Ferramentas
this namespace doesn't exist: gl:herramientas
Información de interese Proxectos > Usuarios
this namespace doesn't exist: gl:user
Varios Wiki Privado old
this namespace doesn't exist: gl:old
admin
this namespace doesn't exist: gl:admin

No renderer 'pdf' found for mode 'pdf'
gl:guias:debian_jessie_post_instalacion

Esta é unha revisión antiga do documento!


Debian Jessie, post instalación

TRABALLO EN MARCHA NON ESTÁ REMATADA A VERSIÓN EN GALEGO

Introducción

O meu portátil é un ordenador Acer 5755G coas siguientes características:

  • Core i5 2430M 2.4GHz
  • NVIDIA Geforce GT 540M
  • 8Gb RAM
  • 750Gb HD

Meu portátil equipa unha tarxeta _Nvidia Geforce GT540M_ que resulta pertencer a unha pola morta na árbore de desenrolo de Nvidia.

A gráfica é unha Nvidia Optimus, unha tarxeta híbrida que traballaba perfectamente en Ubuntu 14.04 usando Bumblebee.

No upgrade a Ubuntu Xenial Xerus a miña gráfica deixou de traballar correctamente có método de instalación de _Bumblebee_ que viña usando. E mesmo con todo-los que fun quen de probar.

Ademais atopei problemas insolubles (para min) na instalación do Virtual Box así que decidín voltar a Debian.

Para facer a actualización do sistema optei por desinstalar o dvd e montar no seu sitio un disco SSD nun Caddie para Acer. A instalación foi moi doada, e ainda que o portátil arranca perfectamente de cualquera dos dous discos, finalmente optei por instalar o SSD na bahía interna do HD orixinal e pasar o HD orixinal ao caddie.

Unha vez instalado o novo sistema operativo, o primeiro foi a instalación do Bumblebee para probar que funcionaba normalmente.

sudo apt-get install firmware-linux-nonfree Bumblebee-nvidia primus

Cambiar as opcións do idioma

Executamos:

sudo dpkg-reconfigure locales

Despois só teremos que cambiar a selección do idioma na configuración de Gnome.

Tra-la reconfiguración teremos que rearrancar Gnome y renomeará todos-los directorios do sistema.

Xestión de paquetes

Instalamos aptitude, synaptic e gdebi

sudo apt-get install aptitude
sudo apt-get install synaptic
sudo apt-get install gdebi

Cambiamos as opcións de aptitude para que non instale os paquetes recomendados.

Quitamos o cdrom dos sources.list

Editamos o ficheiro /etc/apt/sources.list e comentamos as lineas do cdrom.

Habilitamos os backports e multimedia

Backports:

sudo cat> /etc/apt/sources.list.d/backports.list <<EOF
# backports
deb http://ftp.debian.org/debian/ jessie-backports main contrib non-free
EOF

Multimedia:

sudo cat>> /etc/apt/sources.list.d/multimedia.list <<EOF
# multimedia
deb http://www.deb-multimedia.org/ jessie main non-free
EOF

sudo apt-get -y --allow-unauthenticated install --reinstall deb-multimedia-keyring

E actualizamos:

sudo aptitude update

Instalación de varios paquetes útiles

Programas de utilidade e uso frecuente

Un editor de menús para Gnome, poderemos xerar os arquivos desktop para cualquera aplicación. Moito mais completo que alacarte a outra alternativa.

sudo apt-get install menulibre

Terminator

Terminator é un emulador de terminal moi completo y moi flexible. Instalaremolos dende aptitude

sudo aptitude install terminator python-keybinder

Keepass2

Instalado keepass2 dende Debian

sudo aptitude install keepass2

gksu

Un sudo en modo gráfico:

sudo aptitude install gksu

Moi importante executar gksu-properties e escoller o modo sudo e non o de su. Evitaremos problemas coa instalación de moitas aplicacións.

Diskmanager

Para xestionar discos portátiles, memorias, etc,.

sudo apt-get install ntfs-3g disk-manager

Gnucash

Finanzas en linux

sudo apt-get -t jessie-backports install gnucash

Ferramentas sync

Facede sempre backups!

sudo apt-get install rsync grsync

Dropbox

Baixado o paquete Debian dende a páxina web de Dropbox, instalado o paquete con packageinstall, e decir, simplemente pinchando dende o xestor de ficheiros.

Compresores et al

sudo apt-get install rar unrar zip unzip unace bzip2 lzop p7zip p7zip-full p7zip-rar

Freeplane

Mellor que Freemind (na miña opinión). O baile de sempre, descarregar da web, descomprimir en ~/apps e crear o lanzador con MenuLibre. Todo-los ficheiros que tiña feitos con Freemind podense usar directamente co Freeplane.

Telegram desktop

O cliente de mensaxería de Telegram. Descarregado dende a web, instalado en ~/apps

Internet

Chrome y Chromium

Instalado o Chrome engadindo as fontes e executando aptitude. Non me lembro como as engadin.

No ficheiro /etc/apt/sources.list.d/google-chrome.list, teño este contido:

###
###
###
###
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

Para instalar executamos:

sudo aptitude install google-chrome-stable
sudo aptitude install chromium

Tor

Baixado o zip dende a web oficial, e descomprimido no directorio ~/apps

O ficheiro desktop, que ven incluido no paquete, copieino a ~/.local/share/applications

openvpn

Baseado na web nix/bsd.

Ainda non rematei a configuración.

Deluge

A miña aplicación preferida para descarregar torrents

Instalamos dende aptitude

sudo aptitude install deluge
xdg-mime default deluge.desktop x-scheme-handler/magnet

TiddlyDesktop

Tiddly é unha wiki auto-contida e moi flexible, ten unha morea de versións, adaptadas para diferentes usos. Usoa dende fai uns anos como caderno de bitácora persoal, pero non estaba a seguir a sua evolución.

Descarreguei:

  • Tiddlywiki . A este instaleine tamén os plugins de FontAwesome e WikiMap, este será o meu novo caderno de bitácora.
  • GSD5 un TiddlyWiki adaptado a GTD

Ademáis instalei a aplicación TiddlyDesktop, baseada en node webkit que simplifica o tema dos backups das tuas wikis (en teoría).

Como facemos sempre descomprimimos en ~/apps e creamos un lanzador con MenuLibre.

Gráficos

Inkscape

O programa libre para creación e edición de gráficos vectoriais.

apt-cache policy inkscape
apt-get -t jessie-backports install inkscape
aptitude install ink-generator

LibreCAD e FreeCAD

Imprescidibles para a creación e diseño en 2D e 3D.

Instalado dende os repos con aptitude

apt-get install librecad

apt-get -t jessie-backports install freecad

Gimp

O programa libre por excelencia de edición e retocado de imáxenes.

Gimp xa estaba instalado por defecto, instalamos ademais o gimp data-extra

sudo aptitude install gimp-plugin-registry gimp-texturize gimp-data-extras gimp-gap

Shutter

Un programa de captura de pantallas que permite editalas rápidamente:

sudo aptitude install shutter libgoo-canvas-perl

Pencil

É unha aplicación java para facer bocetos de páxinas web, probablemente non a necesitas.

Descarregar a derradeira versión (paquete Debian) dende la página web. Instalamolo e listo. Pode dar problemas si usamos Iceweasel, xa que o paquete depende de Firefox. Mais info aquí

Fotografía

Rawtherapee y Darktable: Tratamiento de imágenes fotogŕaficas

Se gostas da fotografía e/ou tes unha cámara reflex precisas probar estas aplicacións.

sudo aptitude install icc-profiles icc-profiles-free
sudo aptitude install rawtherapee darktable

Stopmotion

Para facer pelis de stopmotion

sudo aptitude install stopmotion vgrabbj dvgrab

TODO: Probar qStopmotion

Audio e video

Codecs

Instalamos os codecs

sudo apt-get install libav-tools

sudo apt-get install faad gstreamer0.10-ffmpeg gstreamer0.10-x \
gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-base \
gstreamer0.10-plugins-good gstreamer0.10-plugins-bad \
gstreamer0.10-plugins-ugly ffmpeg lame twolame vorbis-tools \
libquicktime2 libfaac0 libmp3lame0 libxine2-all-plugins libdvdread4 \
libdvdnav4 libmad0 sox libxvidcore4 libstdc++5

sudo apt-get install w64codecs

Reproductores de música

Instalamos Clementine, decibel, audacity, soundconverter:

sudo aptitude install clementine gstreamer0.10-plugins-bad
sudo aptitude install decibel-audio-player audacity soundconverter

Gpodder

Instalamos gpodder para xestionar os nosos podcast, ainda que non é imprescindible, Clementine tamén nos vale como xestor de podcasts.

sudo aptitude install gpodder

Spotify

Cliente de Spotify, se é que o usas.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo aptitude update
sudo aptitude install spotify-client

Video

Instalamos utilidades de video:

sudo aptitude install vlc browser-plugin-vlc
sudo aptitude install recordmydesktop gtk-recordmydesktop
sudo aptitude install vokoscreen
sudo aptitude install handbrake handbrake-cli handbrake-gtk

Seguridade

Lector de DNIe

Para poder traballar co noso DNI electrónico, instalamos:

sudo aptitude libccid install pcscd pcsc-tools

Como root ejecutamos pcsc_scan 1):

root@rasalhague:~# pcsc_scan 
PC/SC device scanner
V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.11
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader...

Se insertamos o lector de DNIe veremos algo coma esto:

root@rasalhague:~# pcsc_scan 
PC/SC device scanner
V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.11
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader...found one
Scanning present readers...
0: C3PO LTC31 v2 (11061005) 00 00

Wed Jan 25 01:17:20 2017
Reader 0: C3PO LTC31 v2 (11061005) 00 00
  Card state: Card removed, 

De novo, se insertamos un DNI veremos que se lé a información da tarxeta insertada:

Reader 0: C3PO LTC31 v2 (11061005) 00 00
  Card state: Card inserted, 
y mas rollo

Instalamos agora:

aptitude install pinentry-gtk2 opensc

Wire

Un cliente seguro de mensaxeria.

sudo aptitude install apt-transport-https
wget -q https://wire-app.wire.com/linux/releases.key -O- | sudo apt-key add -
echo "deb https://wire-app.wire.com/linux/debian stable main" | sudo tee /etc/apt/sources.list.d/wire-desktop.list
sudo aptitude update
sudo aptitude install wire-desktop

Documentos

Calibre

O mellor programa para xestionar libros electrónicos.

Executamos os comandos suxeridos na páxina web:

sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py \
| sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

Para usar o Calibre co Kobo Glo:

  • Desactivamos todo-los plugin de Kobo excepto o Kobo Touch Extended
  • Creamos unha columna MyShelves co identificativo #myshelves
  • Nas opcións do plugin:
    • Na opción Collection columns engadimos as columnas series,#myshelves
    • Marcamos as opcións Create collections e Delete empy collections
    • Update metadata on device e Set series information

Alguns enlaces útiles:

Pandoc

Pandoc é un traductor entre formatos de documento. Está escrito en Python e é incriblemente útil. De feito, este documento está escrito usando o Pandoc.

Instalado o Pandoc descarregando o paquete deb dende a páxina web do proxecto Pandoc.

Descargamos las plantillas desde o repo executando os seguintes comandos:

cd ~/.pandoc
git clone https://github.com/jgm/pandoc-templates templates

Zotero

Zotero é un programa que permite manter unha ou varias bibliografías con referencias a libros, páxinas web ou documentos electrónicos.

Instalado o Zotero Standalone dende a páxina web do programa

Vanilla LaTeX

O LaTeX do Debian está un pouquiño anticuado, se queres usar unha versión actualizada terás que aplicar esta receta.

cd ~
mkdir tmp
cd tmp
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xzf install-tl-unx.tar.gz
cd install-tl-xxxxxx

A parte xxxxxx varía en función do estado da derradeira versión do LaTeX dispoñible.

sudo ./install-tl

Unha vez lanzada a instalación poderemos desmarcar as opcións que instalan a documentación e as fontes. Teremos que consultar a documentación on line pero aforraranos prácticamente o 50% do espacio necesario. No meu caso sen doc nin src ocupa 2,3Gb

mkdir -p /opt
sudo ln -s /usr/local/texlive/2016/bin/* /opt/texbin

Para rematar a instalación engadimos /opt/texbin ao path.

Falsificando paquetes

Xa temos o texlive instalado, agora precisamos que o xestor de paquetes o rexistre como instalado.

sudo apt-get install equivs --no-install-recommends
mkdir -p /tmp/tl-equivs && cd /tmp/tl-equivs
equivs-control texlive-local

Para facelo mais doado podemos descarregar un ficheiro xa preparado, executando:

wget http://www.tug.org/texlive/files/debian-equivs-2015-ex.txt
/bin/cp -f debian-equivs-2015-ex.txt texlive-local

Editamos a versión e

equivs-build texlive-local
sudo dpkg -i texlive-local_2015-1_all.deb

Todo listo, agora podemos instalar cualquer paquete que dependa de texlive

Fontes

Para deixar dispoñibles as fuentes opentype y truetype que veñen con texlive para o resto de aplicacións:

sudo cp $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
gksudo gedit /etc/fonts/conf.d/09-texlive.conf

Borramos a línea:

<dir>/usr/local/texlive/2016/texmf-dist/fonts/type1</dir>

E executamos:

sudo fc-cache -fsv

Actualizacións

Para actualizar o noso latex á derradeira versión de todo-los paquetes:

sudo /opt/texbin/tlmgr update --self
sudo /opt/texbin/tlmgr update --all

Tamén podemos lanzar o instalador gráfico con:

sudo /opt/texbin/tlmgr --gui

Para usar o instalador gráfico hai que instalar previamente:

sudo apt-get install perl-tk --no-install-recommends

Lanzador para o actualizador de texlive

mkdir -p ~/.local/share/applications
/bin/rm ~/.local/share/applications/tlmgr.desktop
cat > ~/.local/share/applications/tlmgr.desktop << EOF
[Desktop Entry]
Version=1.0
Name=TeX Live Manager
Comment=Manage TeX Live packages
GenericName=Package Manager
Exec=gksu -d -S -D "TeX Live Manager" '/opt/texbin/tlmgr -gui'
Terminal=false
Type=Application
Icon=system-software-update
EOF

Ollo! Hai que deixar instalado o gksu (ainda que debería estar de antes se sigues este doc)

sudo aptitude install gksu

Emacs

Emacs: o mellor editor.

Instalado emacs dende os repos:

sudo aptitude install emacs

Instalamos los paquetes markdown-mode, mardown-plus y pandoc-mode desde el menú de gestión de paquetes de emacs.

Como estou a aprender a linguaxe de programación D, instalamos tamén d-mode y flymake-d (posiblemente ti non os precisas)

Despois de probar flymake e flycheck gostei mais de flycheck Hai unha sección de configuración no fichero .emacs de exemplo para cada un deles, pero a de flymake está comentada.

Configuramos o ficheiro .emacs definindo algunhas preferencias, algunhas funcións útiles e engadimos oríxenes extra de paquetes.

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(show-paren-mode t))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

;;------------------------------------------------------------
;; Some settings
(setq inhibit-startup-message t) ; Eliminate FSF startup msg
(setq frame-title-format "%b")   ; Put filename in titlebar
;(setq visible-bell t)            ; Flash instead of beep
(set-scroll-bar-mode 'right)     ; Scrollbar placement
(show-paren-mode t)              ; Blinking cursor shows matching parentheses
(setq column-number-mode t)  ; Show column number of current cursor location
(mouse-wheel-mode t)         ; wheel-mouse support

(setq fill-column 78)
(setq auto-fill-mode t)          ; Set line width to 78 columns...

(setq-default indent-tabs-mode nil)       ; Insert spaces instead of tabs
(global-set-key "\r" 'newline-and-indent) ; turn autoindenting on
;(set-default 'truncate-lines t)           ; Truncate lines for all buffers
;(require 'iso-transl)                     ; doesn't seems to be needed in debian


;;------------------------------------------------------------
;; Some useful key definitions
(define-key global-map [M-S-down-mouse-3] 'imenu)
(global-set-key [C-tab] 'hippie-expand)                    ; expand
(global-set-key [C-kp-subtract] 'undo)                     ; [Undo] 
(global-set-key [C-kp-multiply] 'goto-line)                ; goto line
(global-set-key [C-kp-add] 'toggle-truncate-lines)         ; goto line
(global-set-key [C-kp-divide] 'delete-trailing-whitespace) ; delete trailing whitespace
(global-set-key [C-kp-decimal] 'completion-at-point)       ; complete at point
(global-set-key [C-M-prior] 'next-buffer)                  ; next-buffer
(global-set-key [C-M-next] 'previous-buffer)               ; previous-buffer

;;------------------------------------------------------------
;; Set encoding
(prefer-coding-system 'utf-8)
(setq coding-system-for-read 'utf-8)
(setq coding-system-for-write 'utf-8)

;;------------------------------------------------------------
;; Maximum colors
(cond ((fboundp 'global-font-lock-mode)  ; Turn on font-lock (syntax highlighting)
       (global-font-lock-mode t)               ; in all modes that support it
       (setq font-lock-maximum-decoration t))) ; Maximum colors

;;------------------------------------------------------------
;; Use % to match various kinds of brackets...
;; See: http://www.lifl.fr/~hodique/uploads/Perso/patches.el

(global-set-key "%" 'match-paren)               ; % key match parents
(defun match-paren (arg)
  "Go to the matching paren if on a paren; otherwise insert %."
  (interactive "p")
  (let ((prev-char (char-to-string (preceding-char)))
        (next-char (char-to-string (following-char))))
    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
          ((string-match "[\]})>]" prev-char) (backward-sexp 1))
          (t (self-insert-command (or arg 1))))))

;;------------------------------------------------------------
;; The wonderful bubble-buffer
(defvar LIMIT 1)
(defvar time 0)
(defvar mylist nil)

(defun time-now ()
   (car (cdr (current-time))))

(defun bubble-buffer ()
   (interactive)
   (if (or (> (- (time-now) time) LIMIT) (null mylist))
       (progn (setq mylist (copy-alist (buffer-list)))
          (delq (get-buffer " *Minibuf-0*") mylist)
          (delq (get-buffer " *Minibuf-1*") mylist)))
   (bury-buffer (car mylist))
   (setq mylist (cdr mylist))
   (setq newtop (car mylist))
   (switch-to-buffer (car mylist))
   (setq rest (cdr (copy-alist mylist)))
   (while rest
     (bury-buffer (car rest))
     (setq rest (cdr rest)))
   (setq time (time-now))) 

(global-set-key [f8] 'bubble-buffer)    ; win-tab switch the buffer

(defun geosoft-kill-buffer ()
   ;; Kill default buffer without the extra emacs questions
   (interactive)
   (kill-buffer (buffer-name))
   (set-name)) 
(global-set-key [C-delete] 'geosoft-kill-buffer) 

;;----------------------------------------------------------------------
;; MELPA and others
(when (>= emacs-major-version 24)
  (require 'package)
  (package-initialize)
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/") t)
  (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/") t)
  )

; (add-to-list 'load-path "~/.emacs.d/")

;;----------------------------------------------------------------------
;; Packages installed via package
;;------------------------------

;;----------------------------------------------------------------------
;; flymake and flycheck installed from package
;; I think you have to choose only one

;; (require 'flymake)
;; ;;(global-set-key (kbd "C-c d") 'flymake-display-err-menu-for-current-line)
;; (global-set-key (kbd "C-c d") 'flymake-popup-current-error-menu)
;; (global-set-key (kbd "C-c n") 'flymake-goto-next-error)
;; (global-set-key (kbd "C-c p") 'flymake-goto-prev-error)

(add-hook 'after-init-hook #'global-flycheck-mode)
(global-set-key  (kbd "C-c C-p") 'flycheck-previous-error)
(global-set-key  (kbd "C-c C-n") 'flycheck-next-error)

;; Define d-mode addons
;; Activate flymake or flycheck for D
;; Activate auto-complete-mode
;; Activate yasnippet minor mode if available
;; Activate dcd-server
(require 'ac-dcd)
(add-hook 'd-mode-hook
          (lambda()
            ;;(flymake-d-load)
            (flycheck-dmd-dub-set-variables)
            (require 'flycheck-d-unittest)
            (setup-flycheck-d-unittest)
            (auto-complete-mode t)
            (when (featurep 'yasnippet)
              (yas-minor-mode-on))
            (ac-dcd-maybe-start-server)
            (ac-dcd-add-imports)
            (add-to-list 'ac-sources 'ac-source-dcd)
            (define-key d-mode-map (kbd "C-c ?") 'ac-dcd-show-ddoc-with-buffer)
            (define-key d-mode-map (kbd "C-c .") 'ac-dcd-goto-definition)
            (define-key d-mode-map (kbd "C-c ,") 'ac-dcd-goto-def-pop-marker)
            (define-key d-mode-map (kbd "C-c s") 'ac-dcd-search-symbol)
            (when (featurep 'popwin)
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-error-buffer-name :noselect t))
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-document-buffer-name :position right :width 80))
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-search-symbol-buffer-name :position bottom :width 5)))))

;; Define diet template mode (this is not installed from package)
(add-to-list 'auto-mode-alist '("\\.dt$" . whitespace-mode))
(add-hook 'whitespace-mode-hook
          (lambda()
            (setq tab-width 2)
            (setq whitespace-line-column 250)
            (setq indent-tabs-mode nil)
            (setq indent-line-function 'insert-tab)))

;;----------------------------------------------------------------------
;; elpy
(elpy-enable)

Textadept

Un potente editor de desenrolo, multiplataforma.

Ven incluido no pack D-apt, por que é moi potente como IDE para o D.

Ata agora só configurei a fonte, para facelo editamos o ficheiro ~/.textadept/init.lua e engadimos a línea:

ui.set_theme('light', {font = 'Meslo LG L Regular for Powerline', fontsize = 14})

Scribus

Scribus e un programa libre de composición de documentos. con Scribus podes elaborar dende os folletos dunha exposición ata unha revista ou un poster.

Instalado con aptitude

sudo aptitude install scribus

Comix

O meu preferido para leer comics.

Instalado con aptitude

sudo aptitude install comix

Desenrolo Software

Paquetes esenciais

Estos son os paquetes imprescindibles para desenrolo software en linux

sudo apt-get install build-essential checkinstall make automake cmake autoconf git git-core dpkg wget

Git

Imprescindible.

Instalado git dende aptitude

sudo aptitude install git

Configuración básica de git, evidentemente tes que cambiar o correo e o nome de usuario

git config --global user.name "Nombre Apellido"
git config --global user.email "direccion@correo.com"
git config --global core.editor emacs
git config --global color.ui true
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=7200'
git config --global push.default simple
git config --global alias.sla 'log --oneline --decorate --graph --all'
git config --global alias.car 'commit --amend --no-edit'
git config --global alias.unstage reset
git config --global alias.st status
git config --global alias.last  'log -1 HEAD'
git config --global alias.ca 'commit -a'

Open Java

Teremos que usar Java para executar varios programas, preferimos a versión aberta.

apt-get install openjdk-7-jre icedtea-7-plugin

Linguaxe de programación D (D programming language)

El lenguaje de programación D e unha linguaxe de programación de sistemas cunha sintáxis similar a de C e tipado estático. Combina a eficiencia, o control e a potencia de modelado coa seguridade e a productividade.

D-apt e instalación de programas

Configurado d-apt, instalados todo-los programas do repo:

sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
sudo apt-get update && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring && sudo apt-get update

Instalamos todo-los programas asociados.

sudo aptitude install dmd dub dcd dfix dfmt dscanner textadept

DCD

Unha vez instalado o DCD temos que configuralo creando el ficheiro ~/.config/dcd/dcd.conf có contido seguinte:

/usr/include/dmd/druntime/import
/usr/include/dmd/phobos

Podemolo probar con:

dcd-server &
echo | dcd-client --search toImpl

gdc

Instalado con

sudo aptitude install gdc

ldc

Instalado con:

sudo aptitude install ldc

Para poder executar aplicacións baseadas en Vibed, temos que instalar:

sudo apt-get install -y libssl-dev libevent-dev

Emacs para editar D

Instalados os seguintes paquetes dende marmalade

  • d-mode
  • flymake-d
  • flycheck
  • flycheck-dmd-dub
  • flychek-d-unittest
  • auto-complete (desde melpa)
  • ac-dcd

Configuranse no ficheiro ~/.emacs:

;; (require 'flymake)
;; ;;(global-set-key (kbd "C-c d") 'flymake-display-err-menu-for-current-line)
;; (global-set-key (kbd "C-c d") 'flymake-popup-current-error-menu)
;; (global-set-key (kbd "C-c n") 'flymake-goto-next-error)
;; (global-set-key (kbd "C-c p") 'flymake-goto-prev-error)

(add-hook 'after-init-hook #'global-flycheck-mode)
(global-set-key  (kbd "C-c C-p") 'flycheck-previous-error)
(global-set-key  (kbd "C-c C-n") 'flycheck-next-error)

;; Define d-mode addons
;; Activate flymake or flycheck for D
;; Activate auto-complete-mode
;; Activate yasnippet minor mode if available
;; Activate dcd-server
(require 'ac-dcd)
(add-hook 'd-mode-hook
          (lambda()
            ;;(flymake-d-load)
            (flycheck-dmd-dub-set-variables)
            (require 'flycheck-d-unittest)
            (setup-flycheck-d-unittest)
            (auto-complete-mode t)
            (when (featurep 'yasnippet)
              (yas-minor-mode-on))
            (ac-dcd-maybe-start-server)
            (ac-dcd-add-imports)
            (add-to-list 'ac-sources 'ac-source-dcd)
            (define-key d-mode-map (kbd "C-c ?") 'ac-dcd-show-ddoc-with-buffer)
            (define-key d-mode-map (kbd "C-c .") 'ac-dcd-goto-definition)
            (define-key d-mode-map (kbd "C-c ,") 'ac-dcd-goto-def-pop-marker)
            (define-key d-mode-map (kbd "C-c s") 'ac-dcd-search-symbol)
            (when (featurep 'popwin)
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-error-buffer-name :noselect t))
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-document-buffer-name :position right :width 80))
              (add-to-list 'popwin:special-display-config
                           `(,ac-dcd-search-symbol-buffer-name :position bottom :width 5)))))

;; Define diet template mode (this is not installed from package)
(add-to-list 'auto-mode-alist '("\\.dt$" . whitespace-mode))
(add-hook 'whitespace-mode-hook
          (lambda()
            (setq tab-width 2)
            (setq whitespace-line-column 250)
            (setq indent-tabs-mode nil)
            (setq indent-line-function 'insert-tab)))

Referencias

Processing

Un entorno de programación baseado en java e ideal para aprender a programar dende cero.

Baixamos os paquetes das respectivas páxinas web, descomprimimimos en ~/apps/ y creamos os desktop file con Menulibre

Openframeworks

Cunha filosofía moi parecida á de Processing pero baseado en C.

Baixamos o paquete comprimido da páxina web do proxecto.

Descomprimimos en ~/apps

Baixamos ao directorio da aplicación e executamos:

sudo  scripts/linux/debian/install_dependencies.sh
sudo  scripts/linux/debian/install_codecs.sh

cd scripts/linux
./compileOF.sh -j2

cd OF/examples/graphics/polygonExample
make
make Run

cd OF/scripts/linux
./compilePG.sh

Vai instalar unha morea de dependencias, tomadeo con calma.

Ao final tamén vai engadir unha linea no ficheiro ~/.profile

export PG_OF_PATH=/home/salvari/apps/of/of_v0.9.3_linux64_release

Python

De partida temos instaladas duas versións: python e python3

python -V
Python 2.7.9

python3 -V
Python 3.4.2

pip, virtualenv, virtualenvwrapper, virtualfish

pip é un xestor de paquetes para Python que facilita a instalación de librerías e utilidades.

Para poder usar os entornos virtuais instalaremos tamén virtualenv.

Instalamos os dous dende aptitude:

sudo aptitude install python-pip python-virtualenv virtualenv

sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv

virtualenv é unha ferramenta imprescindible en Python, pero da un pouco de traballo, así que desarrolaronse alguns frontends para simplificar o seu uso, para bash e zsh usaremos virtualenvwrapper, e para fish o virtualfish. Como veremos son todos moi semellantes.

Instalamos o virtualwrapper:

sudo apt-get install virtualenvwrapper -y

Para usar o virtualenvwrapper temos que facer:

source /usr/share/virtualenvwrapper/virtualenvwrapper.sh

Ou engadir esa linea aos nosos ficheiros .bashrc e/ou .zshrc

Eu deixei a variable de entorno WORKON_HOME sen definir, así que apunta ao directorio por defecto, ~/.virtualenvs. Nese directorio é onde se gardarán os nosos entornos virtuais.

Eiquí temos a referencia de comandos de virtualenvwrapper

Para rematar, se queremos ter utilidades semellantes no noso fish shell instalamos virtualfish:

sudo pip install virtualfish

Eiquí temos a documentación de virtualfish e a descripción de todos os comandos e plugins dispoñibles.

iPython notebook

iPython, y su evolución Jupyter proporcionan un entorno para interactivo de programación que permite elaborar documentos muy complejos con programas embebidos.

Instalar Jupyter en el Python del sistema

Seguimos las instrucciones aquí

Si usamos el script descargado del github se instalará el Jupyter con el python3 del sistema. __Conviene asegurarse de que estamos apuntando al python del S.O. y no a cualquier otro Python que hayamos instalado:

which python
Instalar Anaconda Python

Teóricamente Anaconda, es la forma fácil de poder usar ipython notebook. Así que la primera vez que instalé el iPython lo hice instalando Anaconda De hecho me he instalado dos versiones la que incluye el python2 y la que incluye el python3, aunque son completamente redundantes, basta con instalar una sola de ellas.

bash Anaconda3-4.2.0-Linux-x86_64.sh
bash Anaconda2-4.2.0-Linux-x86_64.sh

Los he dejado instalados en ~/apps/anaconda2 y ~/apps/anaconda3

Cada una de estas instalaciones incorpora su propia versión de Python. Para usarlas tenemos que cambiar nuestro PATH para que el Python deseado sea el primero que se selecciona.

Por ejemplo para activar anaconda3 en bash:

export PATH="~/apps/anaconda3/bin:$PATH"

Para hacer lo mismo en fish:

set -x PATH ~/apps/anaconda3/bin $PATH

iPython y GraphLab

La instalación de iPython y GraphLab (que es una librería comercial) la hice para realizar un curso.

Creamos un entorno conda con Python 2.7.x

export PATH="~/apps/anaconda2/bin:$PATH"
conda create -n gl-env python=2.7 anaconda

Activamos el nuevo entorno (todo esto lo hice en bash, en fish hay un problemilla con el entorno conda mas info)

bash
source activate gl-env

En el futuro esto es todo lo que tendremos que hacer activar el entorno conda donde estamos instalando el iPython.

Nos aseguramos de tener pip al dia:

conda update pip

Instalamos la biblioteca GraphLab Create. Esta biblioteca se supone que es fácil de usar pero está sujeta a licencia. 2)

Una vez registrado en la página web te pasan un número de registro que tienes que usar para instalar la biblioteca.

pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz

Y para terminar instalamos iPython 3):

conda install ipython-notebook

Desde ahora basta con activar el entorno que hemos creado para tener acceso al iPython.

source activate gl-env

ipython notebook

source deactivate gl-env
Instalación alternativa con virtualenv
# Create a virtual environment named e.g. gl-env
virtualenv gl-env

# Activate the virtual environment
source gl-env/bin/activate

# Make sure pip is up to date
pip install --upgrade pip

# Install IPython Notebook (optional)
pip install "ipython[notebook]"

# Install Jupyter Notebook (optional)
pip install "jupyter"


# Install your licensed copy of GraphLab Create
pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz

Usar Emacs para editar Python

Instalamos elpy desde el gestor de paquetes de Emacs, concretamente desde el repo marmalade

Hay que habilitar elpy en el fichero ~/.emacs para ello añadimos la linea

(elpy enable)

flycheck chequea el código python. Conviene instalar:

sudo pip install pylint

TODO

Estudiar esto con calma https://elpy.readthedocs.io/en/latest

Web2py

Desde la página web oficial de web2py descargamos el source code para usuarios normales.

Yo he descomprimido el framework en ~/apps/web2py

Para que el framework soporte ssl convine generar los siguientes certificados:

openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr

Country Name (2 letter code) [AU]:ES
State or Province Name (full name) [Some-State]:CORUNA
Locality Name (eg, city) []:CORUNA
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mikasa
Organizational Unit Name (eg, section) []:salvari
Common Name (e.g. server FQDN or YOUR name) []:salvari
Email Address []:salvari@gmail.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:secret1t05
An optional company name []:Mikasa

Ahora ejecutamos:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Ahora deberíamos dejar los ficheros server.key, server.csr y server.crt en el directorio raiz de web2py y ya podremos arrancar el framework con los siguientes parámetros:

python web2py.py -a 'admin_password' -c server.crt -k server.key -i 0.0.0.0 -p 8000

Y ya podemos acceder nuestro server en la dirección https://localhost:8000

Tampoco está de más instalar las librerías de graphviz:

sudo aptitude install python-pygraphviz

Desarrollo hardware

Arduino IDE

Bajamos los paquetes de la página web , descomprimimimos en ~/apps/arduino.

Creamos un link al directorio del software que hemos descargado:

cd ~/apps/arduino
ln -s arduino-x.y.z current

La primera ves que instalamos será necesario crear el desktop file con Menulibre con las actulizaciones no será necesario, siempre y cuando apunte a ~/apps/arduino/current

Pinguino IDE

Tenemos el paquete de instalación disponible en su página web

Ejecutamos el programa de instalación. El programa descargará los paquetes Debian necesarios para dejar el IDE y los compiladores instalados.

Al acabar la instalación he tenido que crear el directorio ~/Pinguino/v11, parece que hay algún problema con el programa de instalación y no lo crea automáticamente.

El programa queda correctamente instalado en /opt y arranca correctamente, habrá que probarlo con los micros.

KiCAD

Instalamos desde backports:

sudo aptitude install -t jessie-backports kicad

Vamos a instalar a mayores algunas librerias de KiCAD, para poder crear Shields de Arduino.

  • Freetronics una libreria que no solo incluye Shield para Arduino sino una completa colección de componentes que nos permitirá hacer proyectos completos. Freetronics es una especie de BricoGeek australiano, publica tutoriales, vende componentes, y al parecer mantiene una biblioteca para KiCAD. La biblioteca de Freetronics se mantiene en un repo de github. Lo suyo es incorporarla a cada proyecto, por que si la actualizas se pueden romper los proyectos que estes haciendo.
  • eklablog Esta biblioteca de componentes está incluida en el github de KiCAD, así que teoricamente no habría que instalarla en nuestro disco duro.

Virtualización

Docker

apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
edit docker.list with
deb https://apt.dockerproject.org/repo debian-jessie main

apt-cache policy docker-engine   -- comprobamos que todo está bien.


sudo apt-get install docker-engine   -- da un error en makedev por udev activo


sudo service docker start

sudo docker run hello-world   - todo bien

sudo gpasswd -a salvari docker

Virtualbox

Tenemos que:

  • Añadir el fichero virtualbox.list al directorio /etc/apt/sources.list.d
  • Bajarnos y añadir a nuestro llavero las claves públicas de Oracle
  • Actualizar la lista de paquetes
  • Instalar virtualbox
  • Añadir nuestro usuario al grupo vboxuser (no tengo claro que esto sea necesario)
echo "deb http://download.virtualbox.org/virtualbox/debian jessie contrib" \
|sudo tee /etc/apt/sources.list.d/virtualbox.list wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- \
| sudo apt-key add - sudo apt-get update sudo apt-get install virtualbox-5.1 sudo gpasswd -a salvari vboxusers

Una vez instalado el virtualbox tenemos que instalarnos el pack de extensiones, es muy importante descargar el pack correspondiente a nuestra versión desde la página web de descargas

Sin más que hacer doble click en el fichero descargado lo instalaremos en nuestra instancia de Virtualbox (necesitamos la contraseña de administración).

Virtualizando un Windows 7

  • 2 Gb de ram
  • Create virtual hard disk
  • 10Gb dinamically allocated
  • Settings → System→Boot Order: Quitamos el floppy
  • Storage → Add IDE Controller→Add Optical Disk → Choose Disk → ISO Image
  • Instalamos Windows en Inglés y con teclado en español

Una vez instalado el SO Windows instalamos las Guest Additions.

Shells alternativos: zsh y fish

Los dos son muy interesantes. He usado zsh casi un año, ahora voy a probar fish.

fish

Instalamos fish desde aptitude con:

sudo aptitude install fish

Instalamos oh-my-fish

curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > install
fish install
rm install

chsh -s `which fish`

zsh

Igualmente instalamos zsh:

sudo aptitude install zsh

Vamos a usar antigen así que nos lo clonamos en _~/apps/

cd ~/apps
git clone https://github.com/zsh-users/antigen

Y editamos el fichero ~/.zshrc para que contenga:

source ~/apps/antigen/antigen.zsh

# Load the oh-my-zsh's library.
antigen use oh-my-zsh

# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle command-not-found
antigen bundle autojump
antigen bundle extract
# antigen bundle heroku
# antigen bundle pip
# antigen bundle lein


# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting

# git
antigen bundle arialdomartini/oh-my-git
antigen theme arialdomartini/oh-my-git-themes oppa-lana-style

# autosuggestions
antigen bundle tarruda/zsh-autosuggestions

#antigen theme agnoster

# Tell antigen that you're done.
antigen apply

# append to path
path+=('/home/salvari/apps/julia/current/bin/')
# prepend
# path=('/home/salvari/bin/' $path)
# export PATH

Antigen ya se encarga de descargar todo lo que queramos utilizar en zsh.

Nos queda arreglar las fuentes para que funcione correctamente la linea de estado en los repos de git. Necesitamos una fuente Awesome

Instalación de fuentes adicionales

Nos bajamos unas cuantas fuentes que soporten los iconos Awesome.

cd ~/tmp
git clone https://github.com/abertsch/Menlo-for-Powerline
git clone https://github.com/powerline/fonts

mkdir ~/.fonts
cp someFontFile ~/.fonts/
fc-cache -vf ~/.fonts/

Reprap

Sl1c3r

Descargamos el paquete binario desde la página web.

  • Cambiar permisos en directorio /lib/vrt/
  • Instalado lib-canberra-module desde aptitude
  • Es necesario instalar freeglut

OpenScad

Instalado desde aptitude.

Printrun

Descargamos desde github

Cura

Descargamos desde la pagina web

sudo aptitude install python3-pyqt5
sudo dpkg -i Cura-2.1.3-Linux.deb
sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-numpy \
cython python-libxml2 python-gobject python-dbus python-psutil python-cairosvg git

python setup.py build_ext --inplace

Aplicaciones Web

Servidor Web

Apache

Instalamos el paquete apache2

sudo aptitude install apache2

Si abrimos el navegador y visitamos http://localhost/ veremos la página de Apache.

El directorio raiz por defecto de Apache en Debian es /var/www, y el fichero de configuración principal es /etc/apache2/apache2.conf. Hay ficheros de configuración adicionales en el directorio /etc/apache2 y sus subdirectorios. Por ejemplo:

  • /etc/apache2/mods-enabled
  • /etc/apache2/sites-enabled
  • /etc/apache2/conf-enabled

Además del Apache vamos a dejar instalado el php5

sudo aptitude install php5 libapache2-mod-php5

Hay que reiniciar el servicio: sudo service apache2 restart

Si creamos un fichero /var/www/html/info.php, que contenga las lineas:

<?php
phpinfo();
?>

Podemos ver en el siguiente enlace http://localhost/info.php si el php funciona correctamente.

Módulos de php relacionados con mysql:

sudo aptitude install php5-mysqlnd php5-curl php5-gd php5-intl php-pear \
php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode \
php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

nginx

TODO

Servidores de bases de datos

MySQL

Instalamos desde aptitude mysql-server.5.6

Opcionalmente (y muy recomendable)

mysql_secure_instalallation

Actualización

Cambiamos el fichero mysql.conf.d/mysqld.cnf

# max_allowed_packet      = 16M
max_allowed_packet  = 500M

Reiniciamos el servicio:

/etc/init.d/mysql restart

Cliente SQL SQuirreL SQL

Descargamos el paquete desde la página web y lo descomprimimos en ~/apps, también tendremos que descargar el conector de mysql para java, por ejemplo desde aquí

Una vez instalado, creamos el desktop-file con MenuLibre y configuramos el driver MySQL añadiendo el path a donde hayamos dejado el conector java.

MariaDB

PENDIENTE

Recetas varias

Orange Pi Zero

Para usar la Orange Pi Zero tendremos que crear imágenes arrancables en tarjetas micro SD.

Crear una SD arrancable

Dependiendo de donde conectemos la tarjeta tendremos que usar diferentes rutas. En el procedimiento descrito a continuación ${card} será la ruta al dispositivo de la tarjeta y ${p} la partición (si la hay).

Si la tarjeta se conecta via adaptador USB, linux la va a asociar a un dispositivo /dev/sdx, por ejemplo en mi portátil el disco duro es /dev/sda las distintas particiones serán /dev/sda1, /devb/sda2, etc.

Si conectamos una memoria con un adaptador USB linux la podría mapear en /dev/sdb por ejemplo.

Si la memoria se conecta mediante una ranura SD, linux la asociará a un dispositivo /dev/mmcblk0 o /dev/mmcblk1, etc. etc. Dependerá de la ranura usada. Las particiones en este tipo de dispositivos tienen rutas como por ejemplo /dev/mmcblk0p1.

Los datos se pueden almacenar directamente en la memoria SD o en una partición creada en la memoria.

Resumiendo:

  • ${card} será /dev/sdb o /dev/mmcblk0
  • ${card}${p} será /dev/sdb1 o /dev/mmcblk0p1

Antes de seguir adelante hay que estar completamente seguro del dispositivo asociado a nuestra memoria SD para no armar ningún estropicio.

Hay varias comprobaciones que se pueden hacer:

dmesg |tail nos permitirá echar un ojo a los últimos mensajes en el log del sistema. Si acabamos de insertar la memoria veremos el dispositivo usado.

sudo fdisk -l nos permite ver las particiones montadas en nuestro linux, por ejemplo con mi SD en la ranura SD de mi portatil la salida es (entre otras cosas, he obviado las particiones de los discos duros):

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

cat /proc/partitions también nos dará una lista de particiones, en mi portátil las que interesan son:

 179        0    7761920 mmcblk0
 179        1    7757824 mmcblk0p1

Descargamos la imagen de Jessie adaptada a la Orange Pi Zero desde la página https://www.armbian.com/download/

Descomprimimos la imagen y la grabamos en la tarjeta SD con el comando:

sudo dd if=./Armbian_5.24_Orangepizero_Debian_jessie_3.4.113.img of=/dev/mmcblk0

Insertamos la tarjeta en la Orange Pi y le damos alimentación. El primer arranque llevará alrededor de tres minutos, y tras ese tiempo aun hará falta un minuto más para poder hacer login. Este retardo es debido a que el sistema intentará actualizar la lista de paquetes y creará un area de swap de emergencia en la SD, y además cambiará el tamaño de la partición que hemos creado para ocupar todo el espacio libre en la SD.

De momento solo la he arrancado y efectivamente las particiones han cambiado tras el arranque así que tiene buena pinta.

Volvemos a insertar la SD en la Orange Pi y la conectamos con un cable ethernet al router de casa. El Armbian viene configurado por defecto para obtener su IP desde un servidor DHCP.

Como mi cutre-router no me da información de las IP asignadas usamos nmap:

nmap -sP 192.168.0.0 /24

Con eso averiguamos la IP asignada a la Orange Pi Zero y ya podemos hacer login con:

ssh root@192.168.0.109

¡Y ya estamos!

 Primer login en //Orange Pi//

Lo primero es poner al dia el sistema:

apt-get update
apt-get upgrade

Si quieres puedes reconfigurar el time zone:

dpgk-reconfigura tzdata

Conexión WIFI

Vamos a comprobar que todo va bien:

root@orangepizero:~# iwconfig
lo        no wireless extensions.

tunl0     no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

eth0      no wireless extensions.

Todo tiene buena pinta, vamos a ver si detecta WIFIs:

root@orangepizero:~# iwlist wlan0  scan |grep ESSID
                    ESSID:"wificlientesR"
                    ESSID:"casa_de_verano"
                    ESSID:"MOVISTAR_BEEF"
                    ESSID:"wificlientesR"
                    ESSID:"R-wlan90"
                    ESSID:"MOVISTAR_BAAF"
                    ESSID:"ababab"
                    ESSID:"WLAN 77"
                    ESSID:"castillo"
                    ESSID:"unaWifi"
                    ESSID:""
                    ESSID:"mikasa"

Para configurar el wifi echamos un ojo al fichero /etc/network/interfaces pero en ese mismo fichero encontramos el aviso:

# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually.

Así que basta con ejecutar sudo nmtui y ya podemos dar de alta nuestra wifi (yo la prefiero con IP estática).

 Configuración WIFI

Ejecutamos ifconfig y ya vemos nuestro nuevo interface configurado:

ifconfig

wlan0     Link encap:Ethernet  HWaddr a4:7c:f2:9a:97:7c
          inet addr:192.168.0.120  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a67c:f2ff:fe9a:977c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:328 (328.0 B)  TX bytes:852 (852.0 B)

Referencias

Raspberry Pi Media Center

Bajamos la imagen con nuestro cliente torrent favorito desde aquí, no os molesteis en clonar el directorio, hay que bajarse la imagen.

sudo dd if=./Mediacenter-AikonCWD-v6.img  of=/dev/mmcblk0 bs=4M

Arrancamos con la toma ethernet conectada al router y nos conectamos tras averigurar la IP con nmap (ver Orange Pi Zero)

 Primer login en Raspberry

Una vez instalado los pasos recomendados:

  • Cambiar la password de root: passwd
  • Fijar una IP estática: Editamos el fichero /etc/dhcpcd.conf, ya de paso configuramos la IP estática para la WIFI
interface eth0
static ip_address=192.168.0.125/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8

interface wlan0
static ip_address=192.168.0.126/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8
  • Una vez cambiado el fichero hay que reiniciar con shutdown -r now
  • Configurar la WIFI, en esta parte damos por supuesto que tenemos la wifi con WPA activado.
  • Echamos un ojo a nuestro interfaz radio con iwconfig, si aparece el wlan0 todo va bien.
wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
  • Tenemos que editar el fichero /etc/network/interfaces y asegurarnos de tener el wlan0 como sigue:
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  • Ahora vamos a editar el fichero de configuración de wpa_supplicant, es decir /etc/wpa_supplicant/wpa_supplicant.conf y añadir un bloque network que sea como el que va a continuación, de paso he cambiado el country a “ES”, asi que queda así:
country=ES
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="YOURSSID"
  psk="YOURPASSWORD"
}
  • Un reinicio y listos: shutdown -r now

TODO

Licencia

Esta guía se publica sujeta a licencia CC-BY-SA 4.0 INTL

Attribution-ShareAlike 4.0 International

======================================================

Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.

     Considerations for licensors: Our public licenses are
     intended for use by those authorized to give the public
     permission to use material in ways otherwise restricted by
     copyright and certain other rights. Our licenses are
     irrevocable. Licensors should read and understand the terms
     and conditions of the license they choose before applying it.
     Licensors should also secure all rights necessary before
     applying our licenses so that the public can reuse the
     material as expected. Licensors should clearly mark any
     material not subject to the license. This includes other CC-
     licensed material, or material used under an exception or
     limitation to copyright. More considerations for licensors:
    wiki.creativecommons.org/Considerations_for_licensors

     Considerations for the public: By using one of our public
     licenses, a licensor grants the public permission to use the
     licensed material under specified terms and conditions. If
     the licensor's permission is not necessary for any reason--for
     example, because of any applicable exception or limitation to
     copyright--then that use is not regulated by the license. Our
     licenses grant only permissions under copyright and certain
     other rights that a licensor has authority to grant. Use of
     the licensed material may still be restricted for other
     reasons, including because others have copyright or other
     rights in the material. A licensor may make special requests,
     such as asking that all changes be marked or described.
     Although not required by our licenses, you are encouraged to
     respect those requests where reasonable. More_considerations
     for the public:
    wiki.creativecommons.org/Considerations_for_licensees

======================================================

Creative Commons Attribution-ShareAlike 4.0 International Public
License

By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.


Section 1 -- Definitions.

  a. Adapted Material means material subject to Copyright and Similar
     Rights that is derived from or based upon the Licensed Material
     and in which the Licensed Material is translated, altered,
     arranged, transformed, or otherwise modified in a manner requiring
     permission under the Copyright and Similar Rights held by the
     Licensor. For purposes of this Public License, where the Licensed
     Material is a musical work, performance, or sound recording,
     Adapted Material is always produced where the Licensed Material is
     synched in timed relation with a moving image.

  b. Adapter's License means the license You apply to Your Copyright
     and Similar Rights in Your contributions to Adapted Material in
     accordance with the terms and conditions of this Public License.

  c. BY-SA Compatible License means a license listed at
     creativecommons.org/compatiblelicenses, approved by Creative
     Commons as essentially the equivalent of this Public License.

  d. Copyright and Similar Rights means copyright and/or similar rights
     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or
     categorized. For purposes of this Public License, the rights
     specified in Section 2(b)(1)-(2) are not Copyright and Similar
     Rights.

  e. Effective Technological Measures means those measures that, in the
     absence of proper authority, may not be circumvented under laws
     fulfilling obligations under Article 11 of the WIPO Copyright
     Treaty adopted on December 20, 1996, and/or similar international
     agreements.

  f. Exceptions and Limitations means fair use, fair dealing, and/or
     any other exception or limitation to Copyright and Similar Rights
     that applies to Your use of the Licensed Material.

  g. License Elements means the license attributes listed in the name
     of a Creative Commons Public License. The License Elements of this
     Public License are Attribution and ShareAlike.

  h. Licensed Material means the artistic or literary work, database,
     or other material to which the Licensor applied this Public
     License.

  i. Licensed Rights means the rights granted to You subject to the
     terms and conditions of this Public License, which are limited to
     all Copyright and Similar Rights that apply to Your use of the
     Licensed Material and that the Licensor has authority to license.

  j. Licensor means the individual(s) or entity(ies) granting rights
     under this Public License.

  k. Share means to provide material to the public by any means or
     process that requires permission under the Licensed Rights, such
     as reproduction, public display, public performance, distribution,
     dissemination, communication, or importation, and to make material
     available to the public including in ways that members of the
     public may access the material from a place and at a time
     individually chosen by them.

  l. Sui Generis Database Rights means rights other than copyright
     resulting from Directive 96/9/EC of the European Parliament and of
     the Council of 11 March 1996 on the legal protection of databases,
     as amended and/or succeeded, as well as other essentially
     equivalent rights anywhere in the world.

  m. You means the individual or entity exercising the Licensed Rights
     under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

  a. License grant.

       1. Subject to the terms and conditions of this Public License,
          the Licensor hereby grants You a worldwide, royalty-free,
          non-sublicensable, non-exclusive, irrevocable license to
          exercise the Licensed Rights in the Licensed Material to:

            a. reproduce and Share the Licensed Material, in whole or
               in part; and

            b. produce, reproduce, and Share Adapted Material.

       2. Exceptions and Limitations. For the avoidance of doubt, where
          Exceptions and Limitations apply to Your use, this Public
          License does not apply, and You do not need to comply with
          its terms and conditions.

       3. Term. The term of this Public License is specified in Section
          6(a).

       4. Media and formats; technical modifications allowed. The
          Licensor authorizes You to exercise the Licensed Rights in
          all media and formats whether now known or hereafter created,
          and to make technical modifications necessary to do so. The
          Licensor waives and/or agrees not to assert any right or
          authority to forbid You from making technical modifications
          necessary to exercise the Licensed Rights, including
          technical modifications necessary to circumvent Effective
          Technological Measures. For purposes of this Public License,
          simply making modifications authorized by this Section 2(a)
          (4) never produces Adapted Material.

       5. Downstream recipients.

            a. Offer from the Licensor -- Licensed Material. Every
               recipient of the Licensed Material automatically
               receives an offer from the Licensor to exercise the
               Licensed Rights under the terms and conditions of this
               Public License.

            b. Additional offer from the Licensor -- Adapted Material.
               Every recipient of Adapted Material from You
               automatically receives an offer from the Licensor to
               exercise the Licensed Rights in the Adapted Material
               under the conditions of the Adapter's License You apply.

            c. No downstream restrictions. You may not offer or impose
               any additional or different terms or conditions on, or
               apply any Effective Technological Measures to, the
               Licensed Material if doing so restricts exercise of the
               Licensed Rights by any recipient of the Licensed
               Material.

       6. No endorsement. Nothing in this Public License constitutes or
          may be construed as permission to assert or imply that You
          are, or that Your use of the Licensed Material is, connected
          with, or sponsored, endorsed, or granted official status by,
          the Licensor or others designated to receive attribution as
          provided in Section 3(a)(1)(A)(i).

  b. Other rights.

       1. Moral rights, such as the right of integrity, are not
          licensed under this Public License, nor are publicity,
          privacy, and/or other similar personality rights; however, to
          the extent possible, the Licensor waives and/or agrees not to
          assert any such rights held by the Licensor to the limited
          extent necessary to allow You to exercise the Licensed
          Rights, but not otherwise.

       2. Patent and trademark rights are not licensed under this
          Public License.

       3. To the extent possible, the Licensor waives any right to
          collect royalties from You for the exercise of the Licensed
          Rights, whether directly or through a collecting society
          under any voluntary or waivable statutory or compulsory
          licensing scheme. In all other cases the Licensor expressly
          reserves any right to collect such royalties.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
following conditions.

  a. Attribution.

       1. If You Share the Licensed Material (including in modified
          form), You must:

            a. retain the following if it is supplied by the Licensor
               with the Licensed Material:

                 i. identification of the creator(s) of the Licensed
                    Material and any others designated to receive
                    attribution, in any reasonable manner requested by
                    the Licensor (including by pseudonym if
                    designated);

                ii. a copyright notice;

               iii. a notice that refers to this Public License;

                iv. a notice that refers to the disclaimer of
                    warranties;

                 v. a URI or hyperlink to the Licensed Material to the
                    extent reasonably practicable;

            b. indicate if You modified the Licensed Material and
               retain an indication of any previous modifications; and

            c. indicate the Licensed Material is licensed under this
               Public License, and include the text of, or the URI or
               hyperlink to, this Public License.

       2. You may satisfy the conditions in Section 3(a)(1) in any
          reasonable manner based on the medium, means, and context in
          which You Share the Licensed Material. For example, it may be
          reasonable to satisfy the conditions by providing a URI or
          hyperlink to a resource that includes the required
          information.

       3. If requested by the Licensor, You must remove any of the
          information required by Section 3(a)(1)(A) to the extent
          reasonably practicable.

  b. ShareAlike.

     In addition to the conditions in Section 3(a), if You Share
     Adapted Material You produce, the following conditions also apply.

       1. The Adapter's License You apply must be a Creative Commons
          license with the same License Elements, this version or
          later, or a BY-SA Compatible License.

       2. You must include the text of, or the URI or hyperlink to, the
          Adapter's License You apply. You may satisfy this condition
          in any reasonable manner based on the medium, means, and
          context in which You Share Adapted Material.

       3. You may not offer or impose any additional or different terms
          or conditions on, or apply any Effective Technological
          Measures to, Adapted Material that restrict exercise of the
          rights granted under the Adapter's License You apply.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:

  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
     to extract, reuse, reproduce, and Share all or a substantial
     portion of the contents of the database;

  b. if You include all or a substantial portion of the database
     contents in a database in which You have Sui Generis Database
     Rights, then the database in which You have Sui Generis Database
     Rights (but not its individual contents) is Adapted Material,

     including for purposes of Section 3(b); and
  c. You must comply with the conditions in Section 3(a) if You Share
     all or a substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
     ACCURACY, O
     
1)
É posible que sexa necesario reiniciar o pc antes de seguir
2)
TODO: Pasarme a scikit-learn
3)
TODO: conda install jupyter
gl/guias/debian_jessie_post_instalacion.1496502229.txt.gz · Última modificación: 2021/04/16 20:38 (edición externa)