Category: Operating Systems

Making Eclipse look good on Linux

These are the steps I followed to customize Eclipse CDT UI on Linux:

  1. Install Red Hat Liberation fonts which are free/liberated Windows fonts available for any OS and readily available in Fedora’s repositories so they are very easy to install via yum.
  2. Change font properties with the following settings:
    • Application/Document/Desktop font: Liberation Sans, size 10
    • Window title font: Liberation Sans Bold, size 10
    • Fixed with font: Liberation Mono, 10
    • Font rendering: Best contrast
    • Under “Details”:
      • Resolution: 100 dpi
      • Smoothing: Grayscale
      • Hinting: Full
  3. Create an /~/.gtkrc-2.0 file with the following content:
    style "gtkcompact" {
    font_name=" Liberation Sans 10"
    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=0
    GtkMenuItem::horizontal_padding=4
    GtkToolbar::internal-padding=0
    GtkToolbar::space-size=0
    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=8
    GtkTreeView::fixed-height-mode=TRUE
    GtkWidget::focus_padding=0
    }
    class "GtkWidget" style "gtkcompact"
    
    style "gtkcompactextra" {
    xthickness=0
    ythickness=0
    }
    
    class "GtkToolbar" style "gtkcompactextra"
    class "GtkPaned" style "gtkcompactextra"
    
  4. Change every fixed font in Windows->Preferences->General->Appearance->Colors and Font with Liberation Mono 10
  5. Disable bold font in Windows->Preferences->C/C++->Editor->Syntax Coloring
Advertisements

SUN linker takes order parameters into account

While I was compiling a program written by a colleague of mine I encountered this strange error:

/opt/SUNWspro/bin/CC -o program program.o -lcurl -L/opt/libcurl/lib
ld: fatal: library -lcurl: not found
ld: fatal: File processing errors. No output written to program

The library was at the right place and everything seemed right until I checked the documentation and I discovered…

$man ld
...
-L path

Adds path to the library search directories. ld searches
for libraries first in any directories specified by the
-L options and then in the standard directories. This
option is useful only if the option precedes the -l
options to which the -L option applies.
The environment
variable LD_LIBRARY_PATH can be used to supplement the
library search path. See LD_LIBRARY_PATH under ENVIRON-
MENT VARIABLES.
...

So the correct version was the following:

/opt/SUNWspro/bin/CC -o program program.o -L/opt/libcurl/lib -lcurl