2

I am running lubuntu-desktop (quantal quetzal) which I installed after having started with the standard ubuntu install. It all works fine but when I run an application from the command line I get warnings in the terminal. For example emacs gives me

** (emacs:25391): WARNING **: Invalid borders specified for theme pixmap:
    /usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png,
borders don't fit within the image

** (emacs:25391): WARNING **: Invalid borders specified for theme pixmap:
    /usr/share/themes/Lubuntu-default/gtk-2.0/images/scrollbar_vertical.png,
borders don't fit within the image

Is there a way to stop this or is there another way to run emacs that works better for lubuntu-desktop?

2
  • is there any effected functionality, or just the error message? You can use emacs in the terminal with emacs -nw (no window).
    – philshem
    Dec 4, 2012 at 3:00
  • I get this message when I run smplayer from the command line (using the ppa - ppa.launchpad.net/rvm/smplayer/ubuntu )
    – Menachem
    Feb 26, 2013 at 18:41

3 Answers 3

4

I've been having this issue even in Lubuntu 13.04 Raring, and using apt-get to install the lubuntu-artwork packages in the other answers here did nothing for me. I did a lot of digging, running in circles, and guesswork before I found a solution.

The problem here is that the parameters used to define the scrollbar images to GTK are wrong - specifically, the border values given total up to a larger space than the image's dimensions (as the warnings state).

Solution

To fix this, you'll need to:

  1. Open /usr/share/themes/Lubuntu-default/gtk-2.0/scrollbar.rc with elevated permissions (e.g. sudo emacs).
  2. The first two Image definitions (containing null.png) will have a border argument defined. Change both of these to have values of {1, 1, 1, 1}.
  3. The next few Image definitions are for the scrollbar itself, in its normal and prelit states.
    • For the horizontal scrollbars, change the border to {6, 6, 4, 4}.
    • For the vertical scrollbars, change the border to {4, 4, 6, 6}.

Technical Reasoning

I came across this tutorial on GTK2's pixmap engine which explained to me what the various arguments given in the pixmap's gtkrc arguments meant. What the border argument seems to do is define how many pixels of the image should be preserved from the respective edge of the image before the rest of them are stretched to fit the widget (though an image with larger borders than the widget containing it will be squashed anyway; making the vertical scrollbar 12px big resulted in a squashed scrollbar).

The order of the numbers are {left, right, top, bottom}. null.png is a 2x2 image, so to make the borders fit within the image, each side should be 1 pixel. A left of 1 + a right of 1 = 2. Same for the top and bottom. The vertical scrollbar image is an 8x18 image. The given border dimensions of {6, 6, 6, 6} total a width larger than 8 pixels. For the horizontal scrollbar (which is 18x8), that's a height greater than 8 pixels.

In short, a border argument where the sum of the left and right or top and bottom border values are greater than the dimensions of the image will cause that warning.

1
  • I found myself with the same problem, but borders were ok. So I looked more throughly into the logs, and I saw a previous error stating that svg was in a wrong format, and thus later borders were invalid. That was I was executing a 32 bit app in a 64 bit environment, and some 32 bit packages were missing. In my Linux Mint everything was fixed by executing apt-get install librsvg2-common:i386 librsvg2-2:i386 gtk2-engines-pixbuf:i386
    – jesjimher
    Aug 11, 2017 at 10:08
2

This bug report says it is an issue with the theme, not the specific program running: https://bugs.launchpad.net/qbittorrent/+bug/789905

This page says the solution is to run sudo apt-get install lubuntu-.: http://www.richelbilderbeek.nl/CppMiscErrorInvalidBordersSpecifiedForThemePixmap.htm

I ran this solution and the problem went away (I was experiencing the problem when running smplayer [from the ppa] from the command line), but it seems like a bit of an overkill. I'm not sure which specific package was needed to install, since this command installed 17 packages for me:

blubuntu-look blubuntu-session-splashes blubuntu-theme blubuntu-wallpapers chromium-codecs-ffmpeg-extra gtk2-engines-murrine human-theme ldm ldm-lubuntu-theme lubuntu-artwork-10-04 lubuntu-artwork-10-10 lubuntu-artwork-11-04 lubuntu-artwork-11-10 lubuntu-artwork-12-04 lubuntu-elementary-icon-theme lubuntu-restricted-addons lubuntu-restricted-extras


dpkg -S '/usr/share/themes/Lubuntu-default/gtk-2.0/images/null.png' tells me that null.png comes fromthe lubuntu-artwork package, so it is probably that one.

0

I'm running Kubuntu 12.10 and emacs package from

sudo add-apt-repository ppa:cassou/emacs

and I get

Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `gtk-toolbar-style' of type `GtkToolbarStyle' from rc file value "((GString*) 0x1357640)" of type `GtkToolbarStyle'

on start-up.

Before using the package I used to build emacs myself. And I had no warnings. So I guess the warnings are due to the package. Any way I can't see any problems with emacs even with this warning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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