Friday, January 13, 2012

Make Eclipse look better on Ubuntu

  • Compact the look and fix unreadable selected entry in content assist in some themes (e.g. Ambience) by creating a new text file called "gtkrc" (a stylesheet file for GTK apps) with the following content:- 
gtk-color-scheme = "selected_text_color:#000000"
style "compact"
{
  GtkButton::default_border={0,0,0,0}
  GtkButton::default_outside_border={0,0,0,0}
  GtkButtonBox::child_min_width=0
  GtkButtonBox::child_min_heigth=0
  GtkButtonBox::child_internal_pad_x=0
  GtkButtonBox::child_internal_pad_y=0
  GtkMenu::vertical-padding=1
  GtkMenuBar::internal_padding=1
  GtkMenuItem::horizontal_padding=4
  GtkToolbar::internal-padding=1
  GtkToolbar::space-size=1
  GtkOptionMenu::indicator_size=0
  GtkOptionMenu::indicator_spacing=0
  GtkPaned::handle_size=4
  GtkRange::trough_border=0
  GtkRange::stepper_spacing=0
  GtkScale::value_spacing=0
  GtkScrolledWindow::scrollbar_spacing=0
  GtkExpander::expander_size=10
  GtkExpander::expander_spacing=0
  GtkTreeView::vertical-separator=0
  GtkTreeView::horizontal-separator=0
  GtkTreeView::expander-size=12
  GtkTreeView::fixed-height-mode=TRUE
  GtkWidget::focus_padding=0

  font_name="Liberation Sans,Sans Regular 8"
  text[SELECTED] = @selected_text_color
}
class "GtkWidget" style "compact"
style "compact2"
{
  xthickness=1
  ythickness=1
}
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2" 
  • To use the above stylesheet with Eclipse (my version is Indigo - 3.7.1), run Eclipse like this:-
GTK2_RC_FILES=$GTK2_RC_FILES:/somewhere_1/gtkrc /somewhere_2/eclipse
  • Make tooltip readable by using #000000 as its foreground colour (tooltip_fg_color) and #f5f5b5 as background (tooltip_bg_color) in the following files:- 
/usr/share/themes/<your-current-theme>/gtk-3.0/settings.ini
/usr/share/themes/<your-current-theme>/gtk-3.0/gtk.css
/usr/share/themes/<your-current-theme>/gtk-2.0/gtkrc
  • Install Eclipse theme colour plugin and may want to try my TumCode theme which keeps the number of colours to the minimum.
     
  • Replace the default "Monospace" font with "Liberation Mono" and optionally reduce the font size to 8 or 9.
Windows -> Preferences -> General -> Appearance -> Colors and Fonts
(for Java Editor Text Font, Javadoc display font, Properties File Editor Text Font, etc.)

Here is how it looks after the above changes:-

Refs
http://blog.xam.dk/?p=70 
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity
http://blog.valotas.com/2010/02/eclipse-on-linux-make-it-look-good.html

Sunday, December 25, 2011

Merry Christmas and a Happy New Year

I would like to wish you all a Merry Christmas and a Prosperous New Year. May the season bring you and your family joy and peace.

Friday, December 16, 2011

An error occurred while dispatching a duplicated socket: this handle is now leaked in the process

The error kept coming up in the System event logs on Microsoft Windows Small Business Server (SBS) 2011.

To fix this, change maxPendingAccepts from 2 to 10 in SMSvcHost.exe.config

<net.tcp maxPendingAccepts="10" ... >

Refs
http://blogs.msdn.com/b/andreal/archive/2009/04/05/net-tcp-ip-port-sharing.aspx

Monday, December 12, 2011

VirtualBox: Failed to access the USB subsystem

To fix this error, just add the user name to the "vboxusers" group but the User Accounts manager in Ubuntu 11.10 is quite terrible, too simple to be useful so use a command line to do this instead:-
sudo usermod -a -G vboxusers <user-name>
The other option is to install and run the old Accounts manager.
sudo apt-get install gnome-system-tools
users-admin
Refs
http://www.liberiangeek.net/2011/10/add-users-to-existing-groups-in-ubuntu-11-10-oneiric-ocelot-2/
http://linux-software-news-tutorials.blogspot.com/2011/11/restore-old-account-manager-in-ubuntu.html

Friday, December 9, 2011

Unable to locate theme engine in module_path: "pixmap"

I got the following warning when running the update-java tool.
(gksudo:5045): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
To fix it, run
sudo apt-get install gtk2-engines-pixbuf
Refs
https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/853232

Wednesday, November 30, 2011

No sound after upgrading to 64-bit Ubuntu 11.10

After upgrading from 32-bit Ubuntu 11.10 to the 64-bit version, the sound system stopped working.

To fix this issue, I ran
rm -rvf ~/.pulse/ 
Interestingly, it worked straight away without re-login.

Refs
http://ubuntuforums.org/showthread.php?t=1845555

Thursday, November 10, 2011

Evoluation failed to append to mbox

After upgrading Evolution to version 3.2.0, I kept getting this message after sending an email from any of my mail accounts:-
The reported error was "Failed to append to mbox:///home/tom/.local/share/evolution/mail/local#Sent: Invalid folder URI 'mbox:///home/tom/.local/share/evolution/mail/local#Sent' Appending to local 'Sent' folder instead.". 
I fixed it by going to
Edit menu -> Preferences -> Mail Accounts 
-> Select a mail account -> Edit -> Defaults -> Revert
Refs
http://ubuntuforums.org/showthread.php?t=1839990