Configuring GNU Screen Status Bar

With default GNU Screen configuration in Gentoo (I have no experience with other Linux distributions) you get no visible user interface for the tool. To get a status bar that displays host name, list of screen windows with some usability information, system load and current date and time, you can put following line in file ~/.screenrc:

hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'

You can find more information about status configuration in GNU Screen Manual.


Development Version of Netbeans in Gentoo

Today I just found some time to ask for Gentoo overlay to put there my latest ebuilds for development version of Netbeans, that is for nightly builds of Netbeans 7.0. You can find the overlay at If you do not know how to use Gentoo overlays, you can find needed information in Overlay guide.

It is safe to give Netbeans 7.0 development a try on Gentoo as Netbeans 7.0 installs in separate slot so you can have in your system both Netbeans 7.0 and 6.9.1 and even older versions. Up to that, though it is still development version, it is pretty stable and I use it myself for my work for several weeks (maybe even months, my poor memory) already.

You might also notice that I have split the single ebuild into several ebuilds, one ebuild for each Netbeans cluster plus one for Netbeans JavaDoc. I decided to do so for several reasons.

First, for me, it’s much easier to manage Netbeans ebuilds when I can rebuild just single cluster instead of whole Netbeans on each change in ebuilds etc. I can also emerge several clusters in parallel using emerge --jobs switch. That saves some time and does not load my laptop much anyway as javac does not utilize parallel compilation.

Second, for users adding/removing clusters to/from current installation does not require complete rebuild of Netbeans anymore but you emerge or unmerge just the cluster(s) that you want, so you save some time on this. Also, the same as above applies, you can emerge several clusters in parallel and save some time.

And third, there are some applications that are built on top of Netbeans Platform, like VisualVM, so these can easily reuse dev-java/netbeans-platform package without need to pull in whole Netbeans with its huge list of dependencies.

This set of ebuilds supports applying custom patches to the Netbeans sources as the previous ebuild does. You just have to set up NETBEANS70_PATCHES_DIR variable so that it points to directory where you have the patches that you want to apply. I have this line in /etc/make.conf:


If you like to tweak Netbeans to your needs, you might also want to read my article on .

Tags: ,

NetBeans And System Tomcat

At this moment, NetBeans and Tomcat does not work together with each other in Gentoo out of the box. You need to do minor tweak to make it work, but it’s really easy:

# adds user to tomcat group
gpasswd -a user tomcat
# NetBeans expects conf directory in Catalina home
ln -s /etc/tomcat-6/ /usr/share/tomcat-6/conf
# if you want NetBeans to create manager account, you need this
chmod g+w /etc/tomcat-6/tomcat-users.xml

You might need to relogin/restart after gpasswd to get the new user group applied to your user in your desktop environment.

Tags: , ,

NetBeans, IcedTea And Fonts

I bought new laptop and while installing Gentoo on it, I decided to try IcedTea instead of Sun-JDK. But when running NetBeans using IcedTea, the fonts were of serif type which on my resolution was not much readable. Anyway, the solution is easy. Just create symlink to in the IcedTea installation:

cd /opt/icedtea6-bin-1.8.0/jre/lib/
ln -s

When you start NetBeans after this change, the used font will be of sans serif type which is much more readable. More info about this issue can be found at Gentoo Bugzilla.

Tags: ,

Speeding Up emerge

When working on NetBeans ebuilds, it’s often about doing some modifications, then emerging the ebuild … and then finding another problem (it’s most often caused by “playing” with dependencies). What speads the emerge up significantly is using tmpfs for /var/tmp/portage, which is the directory where portage compiles application. Using part of your RAM for emerge is also generally useful for any emerge tasks as it makes it work faster. Here is how to use tmpfs for /var/tmp/portage:

mount -t tmpfs -o size=6G,mode=775,uid=portage,gid=portage tmpfs /var/tmp/portage/

Specify size that you want or can afford to share max from your RAM. After this, your emerge commands will be faster because instead of writing files to disk and reading from disk, most of the operations are performed in memory.

If you want to mount it permanently, you can put something like this below to your /etc/fstab file:

tmpfs /var/tmp/portage tmpfs size=6G,mode=775,uid=portage,gid=portage 1 2

This will automatically mount it on each system boot.