Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install and use a patched version of liboverlay-scrollbar that matches my personal preferences. I've successfully downloaded lp:ayatana-scrollbar and ./autogen.sh; make; sudo make installed it.

Here's the problem. Taking a look at ldd /usr/bin/*, it doesn't look like any applications actually use liboverlay-scrollbar*.so. And even when I use something like:

export LD_LIBRARY_PATH="/usr/local/lib/:/usr/lib/"
export LIBOVERLAY_SCROLLBAR=1
gedit

The scrollbar-using application I call seems to blithely ignore my /usr/local/lib libraries and use the system-installed ayatana scrollbars. My GTK+ libs are stock Ubuntu, so I'm assuming I don't need to patch and recompile the graphical toolkit.

Could anyone post a step-by-step process for installing overlay scrollbars from source?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You may check out an easy tutorial at http://developer.ubuntu.com/packaging/html/fixing-a-bug.html

Here is a simple tutorial:

  1. Get Ubuntu's overlay scrollbar

    bzr branch ubuntu:overlay-scrollbar overlay-scrollbar.dev
    cd overlay-scrollbar.dev
    
  2. Make some modifications
  3. Compile and install

    ./autogen.sh
    make
    sudo make install
    
  4. Modify a symlink

    sudo ln -f -s /usr/lib/liboverlay-scrollbar-0.2.so.0 /usr/local/lib/liboverlay-scrollbar-0.2.so.0
    
  5. (optional) Document the fix and build a package

    dch -i
    bzr builddeb
    
share|improve this answer
    
Note, that steps 3-4 may be skipped, as bzr builddeb will create a correct package, which should be installed –  Vadim Rutkovsky Jan 26 '12 at 19:13
add comment

I'm not entirely certain, as I'm not very fluent in C, but it seems like the patched GTK that Ubuntu uses to load the scrollbars has been hardcoded to look in /usr/lib/ only.

From the patch:

+  gchar *flag = (gchar*) g_getenv ("LIBOVERLAY_SCROLLBAR");    
+   
+  /* check if LIBOVERLAY_SCROLLBAR is set to 0 or an empty value   
+     and disable the feature in this case */   
+  if (flag != NULL && (*flag == '\0' || *flag == '0')) 
+    return;    
+   
+  /* default extension library to use for this release */  
+  gchar *path = "/usr/lib/liboverlay-scrollbar-0.2.so.0";  
+   
+  module = g_module_open (path, G_MODULE_BIND_LOCAL);  
+  if (module == NULL)  
+    return;

If I were you, I apply my patch to the source package of liboverlay-scrollbar.

Grab the source with bzr: bzr branch lp:ubuntu/overlay-scrollbar

Patch the source, edit debian/changelog (You can just add a +myversion1 to the existing version string or add a whole new changelog entry. The key thing is to make sure you have a higher version number the package in the archive). Then run bzr builddeb to build the Debian packages.

share|improve this answer
1  
Excellent, thanks! I'll gladly give you the bounty, but before accepting, would you mind me editting your post to suggest redirecting the /usr/lib/liboverlayscrollbar*.so.0 symblink instead? That's a much less invasive approach in my opinion. Also, to convert this into a "step by step" guide rather than just resolving my particular roadblock? –  Jacob Johan Edwards Jan 22 '12 at 7:48
    
Hello, I've awarded you the bounty for solving my particular problem, but accepted Vadim Rutkovsky for answering the complete question. Thank you very much. –  Jacob Johan Edwards Jan 26 '12 at 18:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.