Category: Software Livre

M d Y

Netbeans 6.5.1, Line-spacing


Hello,

I was using NetBeans in Ubuntu 9.04 when i started a new project and I realized that the line-spacing is so fucking bigger. To fix this you have to do this:

Edit the file "org-netbeans-modules-editor-settings-CustomPreferences.xml"

$ pico org-netbeans-modules-editor-settings-CustomPreferences.xml

This file will be in:

/home/user/.netbeans/6.5/config/Editors/Preferences

If the file and the directory exists just add the following lines:

<entry javaType="java.lang.Float" name="line-height-correction"
xml:space="preserve">
<value><![CDATA[0.75]]></value>
</entry>

If don't you have to create the directory "Preferences":
$ mkdir Preferences
(In /home/user/.netbeans/6.5/config/Editors)

$ cd Preferences

And create the file:

$ pico org-netbeans-modules-editor-settings-CustomPreferences.xml

Add the following lines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
<editor-preferences>
<entry javaType="java.lang.String" name="code-template-expand-key" xml:space="preserve">
<value><![CDATA[TAB]]></value>
</entry>
<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
<value><![CDATA[0.75]]></value>
</entry>
</editor-preferences>

Save, restart netbeans and enjoy it. ;)

Good Night,
Matheus

Portuguese Version

References:
http://my.opera.com/Nobita2708/blog/show.dml/2914020
http://www.linux4all.net/how_to_change_line_height_in_netbeans_editor
http://www.cs.wcupa.edu/rkline/netbeans-lin.html
http://www.google.com.br/search?hl=pt-BR&q=line+spacing+ubuntu+netbeans&btnG=Pesquisar&meta=

M d Y

Ubuntu 9.04, 64 Bits with Java.


Hi,

I was trying to access my back account but I could not due to problems with the java. Talking with a friend, he told me what i have to install to get it working. If you want to use Java in Ubuntu 64bits you have to use "sun-java-plugin". To install it use this command:

sudo apt-get install sun-java6-plugin

See you,
Matheus

PS: Forgive me for publishing just a little. I was traveling and now I have some tests in university.

M d Y

Ubuntu 9.04, reducing your boot time.


Hey, searching around the internet, i find some ways to decrease the boot time. All of them were for older versions, tham i decided to try it in new Ubuntu 9.04 (Jaunty Jackalope) and i get 22seconds boot time.

I used the bum (sudo apt-get install bum) to remove some things that i don't use.
This thins are:
acpid - Controls energy/buttons in pc/Laptop. If you don't use notebook or a keyboard with hotkeys you can remove it.
acpi-support - Like above.
hotkey-setup - Similar above.
anacron - This system runs processes periodically. You could remove it, and use cron.
atd - Like cron, Task Scheduler.
bluetooth - Bluetooth support
usplash - Without this, you don't see a beautifull loading screen when booting.
dns-clean - Used by dial-up connections.
pppd-dns - Used by dial-up connections.
saned - A lib for scanners.

Remember, i removed this things, like bluetooth and acpid because i don't use it. You shouldn't remove it, if you use. You must choose what item to remove according to your system.

Use:
$ sudo pico /boot/grub/menu.lst
and remove splash.

kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=5be10a48-2c12-4165-8957-81c7a15274e5 ro quie splash
turned
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=5be10a48-2c12-4165-8957-81c7a15274e5 ro quie

Reboot the system and executed the profiler. Press "e" in grub to edit, add to line that starts with "kernel" the word profile (add it in the end). Press "B" to boot. Wait a while, your boot is going to be slow. After this, reboot and see your boot time in bootchart.

If you want you can use Concurrent boot. To use it you have to edit /etc/init.d/rc
$sudo pico /etc/init.d/rc

And change
CONCURRENCY=none
to
CONCURRENCY=shell

Save and restart. Verify your boot time and decide if you want to use it or not. (Probabily if you don't change boot order in rcX.d, You will not see difference.)

Usei o sudo bum (apt-get install bum) para remover algumas coisas que eu não usava.
As coisas removidas foram as seguintes:
acpid - Serve para gerenciar a energia/controles do pc/laptop. Se você não usa um notebook ou teclado com teclas te atalho pode remover.
acpi-support - Para notebooks. Como o de cima.
hotkey-setup - Semelhante ao anterior.
anacron - Este sistema roda processos periodicamente. Você pode remove-lo e colocar serviços criticos para cron
atd - Como o cron, esse também é um agendador de tarefas.
bluetooth - Suporte a Bluetooth
usplash - Remove a tela bonitinha de loading, aparecendo um monte de mensagens na tela. (remover splash da grub tbm. Abaixo)
dns-clean - Utilizado para conexões dial-up.
pppd-dns - Utilizado para conexões dial-up.
saned - Biblioteca para scanners.

Lembrando que removi pois não utilizava certos dispositivos, como bluetooth, agendador de tarefas e notebook. Voce deve ver se remove ou não de acordo com seu sistema.

For now just this, but when i have time I want to rebuild my kernel and see the diferences. Stay calm, i will keep you informed.

Matheus Bratfisch

References:
http://www.extremetech.com/article2/0,2845,2114124,00.asp
http://wiki.ubuntu-br.org/AcelerandoBoot#head-c8957311083b70f08301d9339d1dea3c54c1c9ae
http://caarlos0.wordpress.com/2009/02/09/boot-do-ubuntu-intrepid-em-20-segundos-d/

M d Y

Ubuntu, VirtualBox 2.2 and USB


Hello,

Now, with this new version of ubuntu, i will post alot about it while I'm trying configurations. I don't want to teach how to install VirtualBox 2.2, because it's a package .deb and is so easy to install it (Download Sun VirtualBox). In this post I want to remember that we should select the option "Enable IO APIC" in "Settings - General - Advanced". (My version of WinXp doesn't work without it). So if you system is not booting, verify this option. Now let's go to enable USB in your Virtual machine.

You have to install "Guest Additions", use the menu "Devices - Install Guest Additions". (Don't forget to mount it on your cd in virtualbox)

After you install it go to console:

$ grep vbox /etc/group
The result is something similar to this: vboxusers:x:gid:user

(If your user is not there, add it "System - Administration - Users and groups")

Edit the file "mountkernfs.sh":
$ sudo pico /etc/init.d/mountkernfs.sh

Go to the end of do_start(), and before the } add this line:
domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=GID,devmode=644

(Replace the GID with your GID)

Save the file, reboot the computer and use your usb in your virtualmachine.

The site that make me try this way is http://www.davidgrant.ca/virtualbox_usb_windows_xp_guest_ubuntu_hardy. This website don't says it works on Ubuntu 9.04 (Jaunty), so i tried and it worked.

I hope this is useful,
Matheus

PS: You have to select the device you want to use in virtual machine in "Device - USB DEVICES"

M d Y

Ubuntu 9.04, bootChart.


Hello,

I decided to stay in computer a little more, and have a test with this fresh installation of Ubuntu 9.04. Some people say that the boot would be faster in this new version, so I decided to verify this. I remember in my last instalation (Ubuntu 8.10) with fresh install I got 31 seconds on boot, after some modifications it reduces to 21 seconds. In this version, as promised the boot time decreased. I got 26 seconds. When I have some time i'm going to try to do some optimizations and decrease it more.

To verify the time I used Bootchart. You can get it using:

$ sudo apt-get install bootchart

Or you can go to menu "System -> Administradion -> Synaptic Package Manager" and search for it.

BootChart Image, BootChart logs.

Good night,
Matheus

M d Y

Ubuntu 9.04, up and running.


Hello guys,

In the last thursday the Ubuntu 9.04 was released. I decided to try the 64 bits version, I didn`t used EXT4 (but I thought alot). The installation was complete in 20 minutes (fast, right?). I like the design of the new login screen. I didn`t have any big problem until now, it have a closed nvidia driver and flash. Tomorrow I intend to try eclipse, java, etc.

The Java version is:

x-warrior@x-warrior-desktop:~$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu7)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Matheus Bratfisch