Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

[Linux] How to speed up Android Emulator

  • 0
If you are using the android AVD emulator under linux, you may have noticed that its performance is very poor. However, to speed up the android emulator you can use Intels Hardware-assisted Virtualization (hypervisor). This How-To describes the necessary steps to enable Hardware-assisted virtualization on (X)ubuntu 13.10.

First you need to install KVM:
Check if your processor actually supports hardware virtualization:
 $ egrep -c '(vmx|svm)' /proc/cpuinfo  
A return value "0" means that your processor does NOT support hardware virtualization.
Now install cpu-checker:
 $ sudo apt-get install cpu-checker  
and check if your cpu supports KVM:
 $kvm-ok  
Now you need to enable Virtualization in the BIOS setup of your machine.
Now you have all the requirements fulfilled to install KVM:
 $ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils  
After the installation you need to add your user to the "kvm" and "libvirtd" group:
 $ sudo adduser your_user_name kvm  
 $ sudo adduser your_user_name libvirtd  
Now it's time to reboot your machine, or simple logout and login again.
Start Eclipse and create a new Virtual device. Under CPU/ABI you should now be able to select "Intel Atom (x84)". If not you may want to install the "Intel x86 Atom System Image" for your desired Android API with the Android SDK Manager in eclipse.

To start the emulator use the command:
 $ <SDK directory>/tools/emulator-x86 -avd Your_AVD_Name -qemu -m 2047 -enable-kvm  
I recommend that you create a little bash script which uses the command above to start your AVD.


Note: if you want to start the AVD from eclipse do the following:
1) In Eclipse, click your Android project folder and then select Run > Run Configurations...
2) Select your Android project run configuration or create a new configuration.
3) Click the Target tab.
4) Select your AVD device.
5) In the Additional Emulator Command Line Options field, enter:
 -qemu -m 2047 -enable-kvm  

-- Sources: Ubuntu Documentation Intel Blog Post

Making Eclipse look more beautiful on Linux

  • 0
You may have noticed that Eclipse, other than on the windows OS, looks kind of clumpsy on Linux. This is because the fonts are too heavy and big, at least for my taste.

Changing the font size via Window --> Preferences only affects the Editor font sizes. But that's not enough. So here's a workaround to change the font size of all the menus, dialogs, etc. in Eclipse on Linux.

In your home directory create a file named: ~/.gtkrc-eclipse with the following content:

 style "eclipse" {  
     font_name = "Sans Condensed 8"  
 }  
 class "GtkWidget" style "eclipse"  

Now you can start Eclipse with a this command:

 GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '<path to your eclipse bin>'  

Or if you want to create an Launcher icon use this command:

 env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '<path to your eclipse bin>'  

Now you should see way smaller fonts in the menus and dialogs of Eclipse.
But what's with the Tabs? They have still too large fonts. In order to change the font size of tabs, we have to tweak a little more:

In your eclipse installation directory go to:
 /plugins/org.eclipse.platform_*/css  

and open e4_default_gtk.css with your text editor.
Here you can see a section similar to this:

 .MPartStack {  
      font-size: 9;  
      swt-simple: false;  
      swt-mru-visible: false;  
 }  

Simply change the font size or erase this line.
Restart eclipse and obtain the results.

--
This workaround was tested on Xubuntu 13.10 and LMDE Cinnamon with Eclipse Kepler.

installing javaHL 1.7.x in order to use subclipse 1.8.x on Ubuntu

  • 0
If you tried to install the current subclipse 1.8.x plugin and installed the javaHL library like in recommended on the subclipse wiki page you may come up with the error that javaHL 1.7.x is required there is a solution.

First remove you already installed javaHL library:

sudo apt-get purge libsvn-java

Because the current version of the javaHL libraries are not in the ubuntu repositories add the following ppa using the commands:

 sudo apt-add-repository ppa:dominik-stadler/subversion-1.7  
 sudo apt-get update  
Finally install the library:
 sudo apt-get install libsvn-java  
The Error should be gone on next eclipse startup. :)

Source: http://www.sidewaysforward.com/2012/02/upgrading-to-svnjavahl-1-7-x-in-ubuntu/



unusable dark menu bar in netbeans 7.1.2 running on ubuntu 12.04

If you installed Netbeans IDE on the current Ubuntu Version 12.04 LTS and you cannot find the menubar, this is because it has a dark theme with dark fonts.
This is how to fix it:

locate the "netbeans.conf" file. Usually this file can be found under "<netbeans-location>/etc" .
In this file there should be a line starting with "netbeans_default_options".
Add the following argument to it: --laf Metal


Finally restart the netbeans IDE.

Window Docoration vanished when using Emerald (Ubuntu 11.04)

  • 0
For some reason the Window Decoration disappears when using Emerald as Window Decorator under Ubuntu 11.04. Emerald crashes with a segmentation fault.

I found a solution:
To get rid of this error you can update emerald from ppa:malteworld/compiz.
open a terminal and type in:

 sudo add-apt-repository ppa:malteworld/compiz  
 sudo apt-get update  
 sudo apt-get upgrade  
Hope this helps ;)

source:

[Ubuntu 10.04] Lenovo SL500 Trackpoint Scrolling

  • 1

I’m using Ubuntu (here 10.04 LTS) on a Lenovo SL500 notebook and recognized that it’s not possible to scroll via the trackpoint because the mid-button does not work! To solve this create a new file: /etc/X11/Xsession.d/85mouse Within this file copy these few lines:
 xinput set-prop “TPPS/2 IBM TrackPoint” “Evdev Wheel Emulation” 1 xinput set-prop “TPPS/2 IBM TrackPoint” “Evdev Wheel Emulation Button” 2 xinput set-prop “TPPS/2 IBM TrackPoint” “Evdev Wheel Emulation Timeout” 200 xinput set-prop “TPPS/2 IBM TrackPoint” “Evdev Wheel Emulation Axes” 6 7 4 5  
Save the file and restart Ubuntu. Then the mid-button and so scrolling should work correctly :) If you want to be able to configuring your trackpoint and mousepad you can install a little program called “gpointing-device-settings” by opening a terminal and typing: sudo apt-get install gpointing-device-settings

UBUNTU 10.04 GRUB 1.98 save last selection on startup

I was up to configuring the Item Ordering in the Linux Bootloader “Grub” once again. I came across a really cool option, which makes Grub remembering the last itemselection on startup. For example if you start your computer and select the ubuntu os, grub will remember this selection for the next startup. It’s a good way for having just the selection of the os you are using frequently. So here is how you get things working: start a terminal and open the file /etc/default/grub with root access by tiping in:

sudo nano /etc/default/grub

This file is the main configurationpoint for Grub. You should find a line which looks like this:

GRUB_DEFAULT=0 Here you can set the item which will be selected as default on startup. To make Grub remember you last selection on every startup change this line to:

GRUB_DEFAULT=saved Next you have to add one additional key line GRUB_SAVEDEFAULT=true to enable this functionality.

So this is it! Save the file and get out of the nano editor. There’s just one thing left. You have to update the Grub-Configuration by starting the grub updater. Do so by typing in: sudo update-grub After this you can reboot your system and check the results :)