Saturday, November 30, 2013

How to format ubuntu

Tips:
Do NOT use internet during the installation. Update everything later.

My last configurations (during the ubuntu installation):
order - description - size - file system - Mount point
1 - main linux system - 70GB - ext4 - / (root)
2 - other win/linux system - 70GB - don't use the partition -
3 - swap - 10 GB - swap -
4 - efi (this is for the partion table index, or something like) - 1GB - efi -
5 - home - the rest - ext4 - /home

After installing,
http://lucastipss.blogspot.com/2013/11/what-to-do-after-installing-ubuntu.html

How to install a video board (MY GPU nVidia GT 630M)

[this process was accomplished on Linux Ubuntu 12.04 LTS]


Just run on terminal:
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings


Note:
Some time later the installation, an icon on top bar appeared, asking to install additional driver "NVIDIA accelerated graphics driver (post-release updates) (version 319-updates)" DON'T INSTALL THIS!

This was a tutorial extracted from:
http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/ 

FOR UBUNTU 14.04 LTS
Install the recommended driver from "additional driver" native support.
Don't forget to set this configurations, for power savings and lower the temperature: https://help.ubuntu.com/community/PowerManagement/ReducedPower


FOR UBUNTU 12.04 LTS
The process above didn't work pretty well. The unity was converted to a 2d old one.

Then, install bumblebee:
  1. sudo add-apt-repository ppa:bumblebee/stable
  2. Enable the Universe and Multiverse repositories (for bumblebee and nvidia packages respectively).
  3. sudo apt-get update
  4. Install Bumblebee using the default proprietary nvidia driver for 12.04 - 13.04 :
    sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
    • And for 13.10 :
    sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
  5. Reboot 
From:
https://wiki.ubuntu.com/Bumblebee

What to do after installing ubuntu

Change keyboard numpad key from comma to dot (at "keyboard layout options):
Do it customizing the "numeric keypad delete key behavior" from default to "four level key with dot". (On Ubuntu 13.10+, http://mikewilliamson.wordpress.com/2014/03/31/changing-keyboard-layout-options-in-ubuntu-14-04/)
Above step not necessary anyone, for ubuntu 14.04 lts.

Install terminator:
sudo apt-get install terminator

Update ctrl+alt+T shortcut:
Search for keyboard, go to tab shortcut. Then create a new shortcut (it will override the default).

Install the GPU:
http://lucastipss.blogspot.com.br/2013/11/how-to-install-my-gpu-nvidia-gt-630m.html

Make the power savings and low temperature configs:
https://help.ubuntu.com/community/PowerManagement/ReducedPower

Configure the two-finger scroll:
Search for "Mouse and Touchpad"

Install Pre load (to speed up the computer using memory pre loads):
sudo apt-get install preload

Install java
http://lucastipss.blogspot.com.br/2013/11/how-to-installupdate-java.html

Install KeePass
http://lucastipss.blogspot.com.br/2013/12/how-to-install-keepass.html

Customize firefox
http://lucastipss.blogspot.ch/2015/07/features-installed-on-firefox.html  

Thursday, November 28, 2013

Ubuntu: How to prevent your computer from lock/suspend/hibernate?

[this process was accomplished using Ubuntu 12.04 LTS]

Install this program, called "Caffeine". It prevents the computer from locking/suspending/hibernating by simulating some key pressing events.

TO INSTALL:
On terminal:
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

Then just run and configure like you want.

Done!

Tuesday, November 26, 2013

Friday, November 22, 2013

Java: Working with Date

The best tutorial I've found:
http://www.blog.edersonlima.net/?p=144

How to connect your galaxy (or android +4.0) for mass storage transfer?

[process accomplished on Ubuntu 12.04 LTS and Galaxy S2 with Android 4.0.3]

Just go to (with the USB cable disconnected):
Configurações > Conexões sem fios e redes > Utilitários USB

Click on "Conectar memória ao PC".

Then follow the instructions and voilá.

Done!

With it doesn't resolve the problem, I found other tutorials to try:
http://askubuntu.com/questions/87667/getting-mtp-enabled-devices-to-work-with-ubuntu/308366#308366

http://askubuntu.com/questions/247943/are-there-any-plans-to-improve-mtp-support-on-future-ubuntu-releases

Thursday, November 14, 2013

About Eclipse

To automatically indent a code:
Select all the code > ctrl + i

To collapse all the capable blocks:
ctrl + alt + NUM_KEYPAD_DIVIDE

To expand all the collapsed blocks:
ctrl + alt + NUM_KEYPAD_MULTIPLAY

To display the line number:
Preferences > General > Editors > Text Editors
and check "Show line numbers"

To change the color scheme, use this tutorial:
http://eclipsecolorthemes.org/?view=plugin

Installing Android Studio

[process accomplished in Ubuntu 12.04 LTS]

To use Android Studio, simply extract the zipped files and execute the file bin/studio.sh

It will be asked for the java jdk.
http://lucastipss.blogspot.com.br/2013/12/java-default-sdk-folder.html

Done!

Tuesday, November 12, 2013

Android: How to install and import Library Support v7 to your project

[process accomplished using Ubuntu 12.04 LTS + Eclipse (from ADT Bundle)]


  1. Make sure you have downloaded the Android Support Library using the SDK Manager.
  2. Create a library project and ensure the required JAR files are included in the project's build path:
    1. Select File > Import.
    2. Select Existing Android Code Into Workspace and click Next. (without copying files)
    3. Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to <sdk>/extras/android/support/v7/appcompat/.
    4. Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
    5. In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path. (don't import v4 now. It could be create incompatibilities if your project already imported it).
    6. Right-click the library project folder and select Build Path > Configure Build Path.
    7. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.(don't check v4 now. It could be create incompatibilities if your project already did it).
    8. Uncheck Android Dependencies.
    9. Click OK to complete the changes.
You now have a library project for your selected Support Library that you can use with one or more application projects.
Add the library to your application project:
  1. In the Project Explorer, right-click your project and select Properties.
  2. In the category panel on the left side of the dialog, select Android.
  3. In the Library pane, click the Add button.
  4. Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  5. In the properties window, click OK.


A picture is worth a thousand words: enter image description here


You can follow this link too:

http://developer.android.com/tools/support-library/setup.html#download



Friday, November 8, 2013

How to customize NetBeans?

[this process was accomplished on Netbeans 7.3.1]

You can download a theme on internet, at sites like this.

The last one I used was Icarus.

And before that, was sublime style.

To install, just go to tools > options and click on "Import", at the botton.

To alter the font size, tools > options > Fonts & Colors > Font, and choose your preference.

Wednesday, November 6, 2013

Ubuntu: How to add an application icon to the launcher?

[this process was accomplished using Ubuntu 12.04 LTS]

Install the program alacarte (it's currently name is "Main Menu"):

sudo apt-get install alacarte

Then, just open it and add a new item to the category you want.

Done!

You could also do this process adding a .desktop file manually. To do that, follow this link:

http://askubuntu.com/questions/224004/how-to-add-programs-to-the-launcher

Monday, November 4, 2013

How to install SDL?

[This process was accomplished using Ubuntu 12.04 LTS + NetBeans 7.3.1]

First, you need to install the sdl library. Just go through the terminal:
sudo aptitude install libsdl1.2-dev

For others OS, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/index.php


To set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL

More on:
http://forums.netbeans.org/topic41614.html
http://forums.netbeans.org/post-29474.html


For other IDEs, look at here:
http://lazyfoo.net/SDL_tutorials/lesson01/linux/index.php


To test if it worked, run the following code:
#include "SDL/SDL.h"
int main( int argc, char* args[] ) {
 SDL_Init( SDL_INIT_EVERYTHING ); //Start SDL
 SDL_Quit(); //Quit SDL
 return 0;
}  


Installing SDL Extensions:

to load images of various extensions
sudo aptitude install libsdl-image1.2-dev
 
to work with fonts
sudo aptitude install libsdl-ttf2.0-dev

to work with 16-bit sounds
sudo aptitude install libsdl-mixer1.2-dev

For other OS:
http://lazyfoo.net/SDL_tutorials/lesson03/index.php

Set up on Netbeans:
On the project you want to use it, go to "Project Properties -> Build -> Linker -> Libraries -> Add Option -> Other option ", and enter:
-lSDL_image 
-lSDL_ttf
-lSDL_mixer 

You need to add the header files to the project:

#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include "SDL/SDL_mixer.h" 

Done!