Wednesday, May 29, 2013

[How to] Install Android SDK in Linux

How to install the Android SDK in Linux

¿De qué está hablando? Versión en español.

For this tutorial I am using Ubuntu 13.04 but the procedure is the same for all distros.

Note: I am not exactly sure about the permissions you need to give to the folders we are going to create. Feel free to change them. I gave all permissions so it will just work.

You will need Eclipse and Java installed. If you haven't got Eclipse all you have to do in Ubuntu is using this command (it will pull Java at the same time):

sudo apt-get install eclipse

Downloading the SDK for Android


First of all you need to get the SDK from the developer site of Android. Go this website and choose the last option: SDK Tools only.



Now you will need to extract those tools, and lets put them in the /opt directory.

sudo tar xzvf android-sdk_r22-linux.tgz -C /opt

We need to give permissions to this folder so Eclipse will be able to use the SDK.

sudo chmod 777 -R /opt/android-sdk-linux

Now we need to run the Android manager to download the packages we need.

cd /opt/android-sdk-linux/tools

./android



Be careful when you choose what you want to download because it takes a lot of memory. Normally you won't need anything extra if you want to run the latest Android version.

We can make a symbolic link because we are going to need this in the future.

sudo ln -s /opt/android-sdk-linux/tools/android /usr/bin/android

Using the manager


Now we want to make sure we can create a virtual machine running android.

Let's give all permissions to our configuration file. In order to let the SDK create a virtual Android device.

sudo chmod 777 -R  ~/.android

Launch the following command (make sure you created a symbolic link before):

./android avd


And create a new virtual device, if you don't have any, choose "New". You will see the different options that you downloaded with the SDK manager.



I recommend you to enable the GPU usage, the virtual device will run faster with that.
Launch the emulator and wait. It could take sometime to launch so don't panic. (Like I did)



Now we can install the plugin for Eclipse.

Installing the Eclipse plugin


Launch Eclipse and go to Help > Install New Software... > Add...

Choose Add... in the top right corner.

Then you will enter a name for the new software you are going to install, "Android" maybe. And in the URL section enter the following Location:

https://dl-ssl.google.com/android/eclipse/



Choose the "Developer Tools" and then click Next>.
Accept the "Terms and Conditions" and then choose Finish. Eclipse will restart but you won't be able to use the SDK just yet.

Configure the path to the SDK

Go to Windows > Preferences > Android and configure the "SDK Location" to:

/opt/android-sdk-linux



And choose Apply then click OK. Restart Eclipse and the Android SDK will be good to go.

Creating your first app


If you want to create a new application with Eclipse go to New > Other... and choose "Android Application Project".



It will create the application automatically.

If you want to test your app in the virtual device you will need to launch the device first and Eclipse will install and run the app in the device.

You can install and launch the app in a real device but you need to launch adb with root permissions. Just use the following commands.

sudo adb kill-server

sudo adb start-server

And if you want to check if your device is recognized use

adb devices



And that's it! Enjoy the SDK.

Did you like this post? Don't forget to add me to your circles in G+ or to follow me on Twitter: @RobertoXMed . If you can and if you want, don't forget to Donate so I can keep up the good work.

Saturday, May 25, 2013

[Tutorial] ¿Qué hacer luego de instalar Linux Mint 15?

¿Qué hacer luego de instalar Linux Mint 15?

What is he talking about? English version

No usan Linux Mint? Pueden ver mi post anterior para Ubuntu 13.04

¿Están planeando instalar Linux Mint? Aquí pueden ver como hacerlo con particiones (más seguro y práctico!)

Instalé Linux Mint, ¿y ahora qué hago?


Bueno en este post les mostraré las cosas que les recomiendo instalar/hacer para que su máquina funcione sin problemas en Linux Mint.

Les recomiendo que usen el terminal excepto en algunos casos precisos en los que les diré que vayan al "Update Manager" por ejemplo.

Actualizar los paquetes e instalar todas las actualizaciones


Definitivamente lo que uno debe hacer apenas instala Linux Mint es actualizar los paquetes e instalar las actualizaciones. Para eso vamos a buscar el "Update Manager" en la lista de programas.


Este programa va a buscar automáticamente todas las actualizaciones y luego podrán instalarlas. Así mismo les muestra el grado de importancia de cada actualización.


O también podemos lanzar un Terminal y ejecutamos el comando siguiente:

sudo apt-get update && sudo apt-get upgrade

Para la primera instalación esto puede tomar bastante tiempo.

Si tienen un SSD les recomiendo que se den una vuelta por el tutorial que hice para mejorar el rendimiento de los SSDs en Linux.
 

Instalar los drivers propietarios


Si su computador utiliza alguna carta gráfica nVidia o una connexión inalámbrica propietaria deben instalar los drivers primero para que estos componentes funcionen bien. En el caso de la connexión inalámbrica, deberán conectarse utilizando Ethernet o algo parecido.


Después de buscar el "Driver Manager" lancen esta aplicación y elijan los drivers que quieran activar. Necesitarán reiniciar su computador para que los cambios tengan efecto.


Aumentar más paquetes para instalar programas propietarios


Linux Mint viene con la mayoría de paquetes propietarios en todos sus repositorios. Si quieren instalar librerías para leer MP3, DVDs, o para instalar software desarrollado por Microsoft, como Skype, no necesitan hacer nada extra. En Ubuntu no es el caso.


Pueden ver los repositorios en "Software Sources", así mismo pueden gestionar los PPAs que hayan aumentado.



Medibuntu

Por razones legales Linux Mint a lo mejor no puede incluir algunos codecs, fonts, programas directamente. Para eso hay que habilitar los paquetes de Medibuntu. Para eso vamos a usar este comando:

sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

Y así tendremos acceso a todos los paquetes propietarios que tal vez necesitemos luego en nuestro computador.

sudo apt-get install app-install-data-medibuntu apport-hooks-medibuntu


No me gusta Cinnamon, quiero probar otra cosa


Si se cansaron de Cinnamon pueden intentar otros escritorios. Aquí les mostraré algunas opciones.


Gnome 3: el equipo de Gnome recientemente lanzó la versión 3.8 que al parecer está muy interesante.

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell



KDE 4: el equipo de KDE recientemente lanzó la versión 4.10.3, está muy bien este escritorio, lo usé durante algún tiempo y la fluidez es increíble.

sudo apt-get install kde-full



MATE: es como una variante de Gnome 2, desde que Gnome dejó el proyecto de Gnome 2, pero mejorada. Muy interesante igual y simpática.

sudo apt-get install mate-desktop



Hay algunos otros escritorios que se pueden utilizar pero que personalmente no he utilizado mucho. Algunos ejemplos son: XFCE, LXDE, Awesome, Xmonad... entre otros.
 

Internet




Google Chrome o Chromium:
si no les gusta utilizar Firefox pueden instalar Google Chrome yendo a la página de descargas de Google para descargarlo.
Una vez que lo hicieron deben usar este comando (desde la carpeta en la que se guardó el archivo) :

sudo dpkg -i google-chrome-stable_current_amd64.deb

o simplemente abrir la carpeta en la que se guardó y darle doble click al .deb que se descargó.

Para instalar Chromium:

sudo apt-get install chromium-browser


Transmission

Si quieren descargar archivos desde Internet usando Bit Torrent, hay un cliente que está instalado en Linux Mint. Transmission es ligero y hará exactamente su propósito: descargar torrents. Tiene algunas opciones y configuraciones que pueden cambiar.


Hay otras opciones en Linux, como KTorrent, Deluge...

Geary

Si quieren instalar otro cliente mail pienso que una buena opción es Geary. He aquí a qué se parece:



Para instalarlo:

sudo add-apt-repository ppa:yorba/ppa
sudo apt-get update
sudo apt-get install geary

Multimedia


Hay algunos programas interesantes para reproducir archivos multimedia, ya sea audio, vídeo. Pero antes que nada asegurémonos de que tenemos los codecs adecuados (es muy probable que algunos ya estén instalados):

sudo apt-get install non-free-codecs libxine1-ffmpeg gxine mencoder totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0

Un problema muy frecuente que se lee en los foros, es la reproducción de DVDs. Como los DVDs utilizan un sistema de seguridad, hay que instalar una biblioteca especial y ejecutar un archivo de configuración:


sudo apt-get install libdvdcss2 && sudo /usr/share/doc/libdvdread4/./install-css.sh

VLC



Un gran reproductor multimedia es VLC, básicamente lee TODO y cuando digo TODO es en serio.

sudo apt-get install vlc

 Clementine

Si no son muy fans de Rhythmbox como yo o les hacen faltas algunas funcionalidades como un ecualizador o un poco más de personalización, Clementine es una gran opción.
Para instalar este reproductor deben ir a la página de descargas y escojer la versión más reciente (en este caso Ubuntu 12.10 64-bit). Luego intentan instalar el reproductor. Si tienen problemas de dependencias usen el segundo comando.

sudo dpkg -i clementine_1.1.1~quantal_amd64.deb

sudo apt-get install -f




GIMP

Si les gusta la fotografía y no quieren invertir un montón de dinero en Photoshop, pueden intentar GIMP. Yo lo uso todos los días y tienen un montón de funcionalidades.


Solo usen el comando siguiente:

sudo apt-get install gimp

Si quieren editar archivos RAW necesitarán este paquete extra:

sudo apt-get install gimp-ufraw


Esto permetirá a GIMP editar el archivo RAW una vez que lo ha importado.


Inkscape

Si uds. hacen un poco de diseño un gran programa muy fácil de usar es Inkscape. He aquí un ejemplo de lo que hice un domingo sin deberes.

sudo apt-get install inkscape


OpenShot

Si quieren hacer un poco de edición vídeo en Linux, creo que la mejor opción por ahora es OpenShot.

sudo apt-get install openshot

Se acaban de enterar que Steam ahora también está en Linux?

Así Steam lanzó su cliente para Linux hace algunos meses ya y está bastante interesante.

Si quieren instalarlo la mejor manera es bajar el .deb de la página de Steam.
Luego van a usar el comando siguiente:

sudo dpkg -i steam_latest.deb

Les va a dar algunos errores de dependencias. Van a corregir esos problemas con:

sudo apt-get install -f

Luego Steam se va a abrir y se actualizará.

He aquí una imagen, se ve bastante bien si me preguntan.


Messenger


Pidgin

Si como yo han tenido algunos problemas con Empathy otra alternativa es Pidgin, igual soporta muchos protocolos como MSN, Facebook, Google Talk...

sudo apt-get install pidgin

Skype

Para instalar Skype solo van a tener que usar el comando siguiente. (Ahora está en version 4.2)

sudo apt-get install skype


Cloud and backup


Dropbox

La mayoría de gente utiliza cuentas en el cloud para sus archivos y poder tenerlos disponibles cuando sea. Hay que ir a la página de descargas de Dropbox y de nuevo usar un comando como este (desde donde esté el archivo):

sudo dpkg -i dropbox_1.6.0_amd64.deb

Backups


Algo que me encanta de Linux Mint es que tiene su propio programa para poder respaldar todos los datos importantes que queremos, ya sea en una cuenta de Ubuntu One, en un servidor FTP o en un disco duro externo.

Buscamos en las aplicaciones "Backup" y luego podemos configurar los respaldores como queramos



Algunas herramientas e indicadores para su sistema


Jupiter

Una herramienta muy práctica para poder ahorrar energía y que indica el estado del computador.

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter

Archive Management Apps

Si bajan muchos datos de Internet y deben descomprimirlos o comprimirlos con mucha frecuencia, he aquí una lista de paquetes que les van a ser muy útiles.

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

Nota: Si instalan los paquetes rar, unrar van a poder leer comics en formato .cbr directamente con Evince.


Necesito algunos programas de Windows

Wine

Si necesitan instalar algunos programas de Windows porque simplemente no hay alguna alternativa en el mundo libre pueden usar el emulador Wine. No todo va a servir y yo no he intentado mucho con este emulador pero sé que se pueden hacer muchas cosas como instalar Microsoft Office.

sudo apt-get install wine



Virtual Box

Si Wine no funciona pueden optar por crear una máquina virtual e instalar el programa en ella. El problema es que hay que tener un ISO de Windows.
Descargan el paquete desde el sitio de Oracle y de nuevo (con el nombre del paquete que corresponde y desde la carpeta en la que está el archivo):

sudo dpkg -i virtualbox-4.2_4.2.10-84104~Ubuntu~raring_amd64.deb

Programación (o "maldición porqué no compila")


Para la gente que usa su máquina para programar he aquí una lista de lo que pueden querer instalar para programar tranquilamente:

Essentials

Primero hay que instalar los paquetes neceserios para poder compilar, entre esos hay gcc
sudo apt-get install build-essential

¿gcc está muy viejo?

Clang es un compilador muy interesante para programas en C y en C++, tiene la misma sintaxis que gcc. Muestra los errores que cometimos donde están exactamente.

sudo apt-get install clang

Geany


Un editor simpático que reconoce algunos lenguajes de programación.

sudo apt-get install geany

Eclipse

Para programar en Java lo único que hay que hacer (porque va a instalar Java al mismo tiempo) es instalar Eclipse.

sudo apt-get install eclipse

OpenGL

Si planean programar usando OpenGL van a tener que instalar el paquete freeglut primero:

sudo apt-get install freeglut3-dev

Limpiando todo lo que ya no vamos a necesitar


Después de que hayan instalado todo lo que hayan querido, utilicen estos comandos para limpiar paquetes y desinstalar todo lo que ya no van a necesitar:

sudo apt-get autoremove
sudo apt-get autoclean

Ahora sí todo debería estar a su gusto. ¡Disfruten su nueva instalación!

Les gustó este post? Aquí pueden ver lo que se va a venir en este blog (por el momento). No se olviden de agregarme a sus círculos en G+ o de seguirme en Twitter: @RobertoXMed

Si pueden y quieren no olviden hacer una Donación (por Paypal) para el blog chimbo así podré seguir haciendo gran contenido.

Sunday, May 19, 2013

[To do] Top things to do after installing Linux Mint 15

Top things to do after installing Linux Mint 15

¿De qué está hablando? Versión en español

Not running Linux Mint? Check my previous post for Ubuntu 13.04

Planning to install Linux Mint? This post explains how to do it with partitions (it's more secure and very useful)

So I installed Linux Mint, what now?


In this post I will show the top things that I recommend you to do in order to make your computer run like a champ.

I strongly recommend the use of the (a) Terminal except in a few cases, like when you first update, you should update with the "Update Manager" because you'll have to install new kernel revisions.

Updating packages and upgrading


The first thing that you absolutely want to do, just after installing Linux Mint is to update your packages. To do this, you will need to search for the "Update Manager" in the application list


It will atomically check for updates, after all the packages are updated you can click in "Install Now.


Or you could launch a Terminal and put the following command:

sudo apt-get update && sudo apt-get upgrade

The first time you do this it could take a lot of time.

Installing proprietary drivers


If your computer has a graphic card like nVidia or AMD or a wireless connexion you must install some drivers to make it work properly. If your wireless doesn't work you might want to install the driver using a wired connexion.


After searching for the "Driver Manager" go to the application and choose the driver that you want to activate. You need to restart your computer afterwards.


Enabling proprietary packages and installing proprietary software


If you want to install some proprietary packages like libraries to play MP3, or to install software developed by Microsoft, like Skype, you don't need to enable repositories. LinuxMint enables them by default.


You can see the Software Sources if you want.



Medibuntu

For legal reasons Linux Mint is not allowed to include some codecs, fonts, software automatically. You have to enable Medibuntu packages. You just use this command for doing that:

sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

That way you can have access to all (or almost) the propietary packages that you may want/have to use

sudo apt-get install app-install-data-medibuntu apport-hooks-medibuntu


I don't like Cinnamon, show me something else

If you get tired of Cinnamon you could try some other desktops. Here I will show you some other options.


Warning: Don't do this with the Cinnamon version, it will break your desktop.

Gnome 3: the Gnome team recently released version 3.8.1 which many people seem to like. And let's admit that New is always better... Maybe not...

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell



KDE 4: the KDE recently released version 4.10.3, this desktop is my second choice after Unity. I used it for a while and is fast, stable and the graphics with OpenGL are sick. With this command you're actually changing the flavor of your Ubuntu to add Kubuntu:

sudo apt-get install kde-full



MATE: it started as a fork of Gnome 2. Very interesting and pretty nice too.

sudo apt-get install mate-desktop mate-common mate-core



There are many other options out there in the wild but I haven't given them a long try. Here are some examples: XFCE, LXDE, Awesome, Xmonad... among others.
 

Internet




Google Chrome o Chromium: if you don't like Firefox you can install Google Chrome by going to their download page.
After you installed the right package for your distribution you can use this command (adapt it with the name of your package:

sudo dpkg -i google-chrome-stable_current_amd64.deb

or you could just open the folder where you save the file and double-click it. But the command line is more fun, let's admit it.

If you want to install Chromium instead:

sudo apt-get install chromium-browser

Transmission

If you want to download some files from the Internet using a Bit Torrent client there is one installed by default with Ubuntu. Transmission is a light-weight bit torrent client that will do just the job. You can set it up as you want but it doesn't have a lot of options.


There are many options for Linux, like KTorrent, Deluge...

Geary

If you want to install another client for your e-mail I think you could try to install Geary. Here is how it looks:


To install it:

sudo add-apt-repository ppa:yorba/ppa
sudo apt-get update
sudo apt-get install geary

Multimedia


There are some interesting programs to play multimedia, audio, video... But before doing some installation we want to make sure that we have the right codecs installed.

sudo apt-get install non-free-codecs libxine1-ffmpeg gxine mencoder totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0

A frequent problem you find in different forums is how to play DVDs in Linux Mint/Linux. DVDs use a special encryption protocol, you have to install a library for decryption, run this command that will install this library and execute a configuration file:

sudo apt-get install libdvdcss2 && sudo /usr/share/doc/libdvdread4/./install-css.sh

VLC



VLC is a great media player that can read EVERYTHING, and I really mean it.

sudo apt-get install vlc

 Clementine

If you're looking for an alternative to Rhythmbox because you don't like or if you miss some functionalities like an equalizer or a little more personalization; Clementine is a great option.
Go to the Download Page of Clementine and choose the latest version for Ubuntu and the architecture that you use (in my case Ubuntu 12.10 64-bit). Then from a Terminal try to install it, you will run into some errors of dependencies, but just use the second command to solve this, and you are good to go.

sudo dpkg -i clementine_1.1.1~quantal_amd64.deb

sudo apt-get install -f




GIMP

If you like photography and you don't want to spend a lot of money in Photoshop you can try out GIMP. I use it every day and it comes with a lot of functionalities.


Just run the following command:

sudo apt-get install gimp

If you want to edit RAW files from your camera you will need this extra package:

sudo apt-get install gimp-ufraw


This will let GIMP edit the RAW file after it imports it.


Inkscape

If you want to do some vector drawing Inkscape is a great piece of software, very easy to use. Here is an example I made in a free sunday.

sudo apt-get install inkscape


OpenShot

If you want to do some video editing in Linux, I think the best option right now could be OpenShot.

sudo apt-get install openshot

Just heard Steam came for Linux?

That's right boy, Steam launched its client for Linux a few months ago and it looks pretty awesome.

If you want to install it the easiest way is to download the .deb from Steam.
Then run the following commands:

sudo dpkg -i steam_latest.deb

You will run into some dependencies errors. Just correct them with:

sudo apt-get install -f

Then Steam will launch and it will update.

This is how it looks, pretty sweet if you ask me:


Messenger


Pidgin

I have tried Empathy but I had some troubles with my MSN account. Pidgin is a great alternative and it supports many protocols, like MSN, Facebook, Google Talk...

sudo apt-get install pidgin

Skype

In order to install Skype in Linux Mint you have to install the independent packages  as seen at the beginning of this blog.

sudo apt-get install skype


Cloud and backup


Dropbox

Most people have a cloud account with some server. You can share files, make a backups in the cloud, or just have your files available from anywhere you want. You have to go to the download page and again you can run this command (adapting it to your distribution):

sudo dpkg -i dropbox_1.6.0_amd64.deb

Backups

Something that I love about Linux Mint (and other distros) is that they have their own backup manager. You can setup your backups to put them in the Cloud or in a FTP server or simply put it in a hard drive.
You search in your applications for "Backup"  and then you can configure
your backup as you like.



Some tools and indicators for your system


Jupiter

An interesting tool that allows you to save some energy of your laptop. It also indicates you the state of the computer.

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter

Archive Management Apps

If you frequently download files from the internet and you want to uncompress or compress here is a command that has everything you may want to install.

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

Note: If you install the rar, unrar package you will be able to read comic books in .cbr format with Evince.


I still need some Windows programs

Wine

If you need to install some Windows software that isn't available for Linux you can use Wine emulator. It is not going to work for everything but you can do a lot of stuff like installing Microsoft Office.


sudo apt-get install wine



Virtual Box

If Wine doesn't work you may want to create a virtual machine and install some programs in it. The problem is that you must have a Windows ISO.
Download the package from Oracle's site, choose the installer for Ubuntu Raring and again from the terminal (adapting it to your own):

sudo dpkg -i virtualbox-4.2_4.2.10-84104~Ubuntu~raring_amd64.deb

Programming (a.k.a "Why don't you compile?")


For people who use their machine for writing code, here is a list that you use for installing some basic packages for programming:

Essentials

First of all you want to install some basic packages that allows you to compile, this packages include gcc for example

sudo apt-get install build-essential

¿gcc is too old school?

Clang is a great compiler for C and C++, it has the same syntax that gcc but it has a nice output:

sudo apt-get install clang

Geany


A simple IDE that recognizes some languages.

sudo apt-get install geany

Eclipse

For programming with Java the only thing that you need to do (because it will install Java at the same time) is install Eclipse.

sudo apt-get install eclipse

OpenGL

If you're planning to do some programming using OpenGL you must install the "freeglut" package:

sudo apt-get install freeglut3-dev

Cleaning everything that you wont use anymore


After you're done installing everything that you always wanted run this commands to clean your packages and to uninstall everything that you don't need anymore:

sudo apt-get autoremove
sudo apt-get autoclean

And you're good to go. Enjoy your new install!

Did you like this post? Here is what you can expect from my blog. Don't forget to add me to your circles in G+ or to follow me on Twitter: @RobertoXMed

If you can and if you want, don't forget to Donate so I can keep up the good work.